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/frontend] fix bulk update injects #1628

Merged
merged 5 commits into from
Oct 14, 2024
Merged

Conversation

savacano28
Copy link
Contributor

@savacano28 savacano28 commented Oct 8, 2024

Proposed changes

  • Add other endpoint to bulk update in order to just update properties available on bulk update.

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...

@savacano28 savacano28 added the filigran team use to identify PR from the Filigran team label Oct 8, 2024
@savacano28 savacano28 self-assigned this Oct 8, 2024
Copy link

codecov bot commented Oct 8, 2024

Codecov Report

Attention: Patch coverage is 0% with 9 lines in your changes missing coverage. Please review.

Project coverage is 32.36%. Comparing base (9dfb5ce) to head (e3ba65d).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
...rc/main/java/io/openbas/rest/inject/InjectApi.java 0.00% 9 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1628      +/-   ##
============================================
- Coverage     32.38%   32.36%   -0.03%     
  Complexity     1508     1508              
============================================
  Files           545      545              
  Lines         14110    14119       +9     
  Branches        844      844              
============================================
  Hits           4569     4569              
- Misses         9327     9336       +9     
  Partials        214      214              

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

@savacano28 savacano28 marked this pull request as ready for review October 8, 2024 08:28
@Dimfacion Dimfacion self-requested a review October 11, 2024 11:11
@PreAuthorize("isScenarioPlanner(#scenarioId)")
public Inject bulkUpdateInjectForScenario(
@PathVariable String scenarioId,
@PathVariable String injectId,
Copy link
Member

Choose a reason for hiding this comment

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

I'm gonna be super annoying but in a bulk update endpoint, shouldn't we send the list of injects to update in one call instead of having many calls viewed as bulk ? Since this endpoint is dedicated to those kind of calls, that would make sense and prevent us from calling a lot of times the API for almost the same call with just the inject id changing ...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You are right! I'll modify it, thank you!

@savacano28 savacano28 marked this pull request as draft October 11, 2024 11:46
@savacano28 savacano28 force-pushed the bugfix/fix-bulk-update branch from 0ff5216 to 156f174 Compare October 11, 2024 11:49
@savacano28 savacano28 force-pushed the bugfix/fix-bulk-update branch from ed54fba to e3ba65d Compare October 14, 2024 08:51
@savacano28 savacano28 marked this pull request as ready for review October 14, 2024 09:36
@savacano28 savacano28 merged commit db39652 into master Oct 14, 2024
7 checks passed
@savacano28 savacano28 deleted the bugfix/fix-bulk-update branch October 16, 2024 14:55
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.

Adding / replacing / removing inject teams in bulk also remove all attached document
2 participants