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] avoid useless operations during batched replace (#6297) #6354

Merged
merged 10 commits into from Mar 19, 2024

Conversation

marieflorescontact
Copy link
Member

@marieflorescontact marieflorescontact commented Mar 14, 2024

Proposed changes

  • In the case of a REPLACE relationship (with a marking, label, etc.) we check if the toId contained in value is not already in the element's relationships.

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
  • I added/update the relevant documentation (either on github or on notion)
  • Where necessary I refactored code to improve the overall quality

Further comments

If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...

Copy link

codecov bot commented Mar 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 66.97%. Comparing base (d857cc0) to head (20ecacd).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6354      +/-   ##
==========================================
+ Coverage   66.76%   66.97%   +0.20%     
==========================================
  Files         541      541              
  Lines       64542    64557      +15     
  Branches     5306     5313       +7     
==========================================
+ Hits        43091    43234     +143     
+ Misses      21451    21323     -128     

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

const actionContext = {
field: 'object-marking',
type: 'RELATION',
values: [MARKING_TLP_AMBER]
Copy link
Member

Choose a reason for hiding this comment

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

RCA on the counter issues: this id here is supposed to be an internal id and not a standard id. In the task manager the new check compares to an internal id.

Copy link
Member Author

Choose a reason for hiding this comment

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

fixed

@labo-flg labo-flg changed the title [backend] check value before replace (#6297) [backend] avoid useless operations during batched replace (#6297) Mar 19, 2024
@marieflorescontact marieflorescontact marked this pull request as ready for review March 19, 2024 12:59
@marieflorescontact marieflorescontact self-assigned this Mar 19, 2024
@marieflorescontact marieflorescontact merged commit 9c63947 into master Mar 19, 2024
8 checks passed
@marieflorescontact marieflorescontact deleted the issue/6297 branch March 19, 2024 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants