Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[backend] fix internal_id being removed during observable fullsync (#8986) #9218

Merged
merged 1 commit into from
Jan 15, 2025

Conversation

JeremyCloarec
Copy link
Contributor

@JeremyCloarec JeremyCloarec commented Dec 3, 2024

Proposed changes

  • internal_id was being upserted to an undefined value in the case of fullsync. We now only set an internal_id in addStixCyberObservable if the internal_id is not undefined

Related issues

Checklist

  • I consider the submitted work as finished
  • I tested the code for its functionality
  • I wrote test cases for the relevant uses case (coverage and e2e)
  • I added/update the relevant documentation (either on github or on notion)
  • Where necessary I refactored code to improve the overall quality

Further comments

@github-actions github-actions bot added the filigran team use to identify PR from the Filigran team label Dec 3, 2024
Copy link

codecov bot commented Dec 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 65.22%. Comparing base (dde5551) to head (4fe30e9).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #9218      +/-   ##
==========================================
- Coverage   65.22%   65.22%   -0.01%     
==========================================
  Files         630      630              
  Lines       60199    60201       +2     
  Branches     6741     6744       +3     
==========================================
- Hits        39267    39266       -1     
- Misses      20932    20935       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -216,6 +215,9 @@ export const addStixCyberObservable = async (context, user, input) => {
update,
...input[graphQLType]
};
if (internal_id) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could it be possible to have a case where internal_id from the input is undefined or null and we want to keep this null value ? Or it is sure that in any case we don't want it ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't undesrtand in which case we would have an internal_id in the observable input, it's not part of the schema. And internal_id is not part of the stream, right ? @JeremyCloarec

@richard-julien richard-julien force-pushed the master branch 5 times, most recently from b414944 to c7f4cb7 Compare January 13, 2025 09:27
@JeremyCloarec JeremyCloarec merged commit e32b9ec into master Jan 15, 2025
9 checks passed
@JeremyCloarec JeremyCloarec deleted the issue/8986 branch January 15, 2025 10:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
filigran team use to identify PR from the Filigran team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[livestream] renaming of observable creates a new one in perfect sync mode
3 participants