Common-Metadata-Repository
Common-Metadata-Repository copied to clipboard
CMR-9848: When submitting multiple associations, if one fails CMR returns a 400 but still makes the other associations
Overview
What is the feature/fix?
Return proper status when processing association requests.
What is the Solution?
When processing association request, only return 400 status when ALL associations fail, rather than when ANY association fails. This includes all generic associations and regular associations, except for tag association. When I changed tag associations return status from 400 to 200 with only partial failure, for some mysterious reason, some ACL related stuff failed in the build, which I really don't see any connection with the fix. I'm writing a separate ticket for the tag association part since I don't have time to fix it.
What areas of the application does this impact?
CMR search.
Checklist
- [x ] I have updated/added unit and int tests that prove my fix is effective or that my feature works
- [ x] New and existing unit and int tests pass locally and remotely
- [ ] clj-kondo has been run locally and all errors corrected
- [ ] I have removed unnecessary/dead code and imports in files I have changed
- [x ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [x ] I have made corresponding changes to the documentation
- [ x] My changes generate no new warnings
- [ ] I have cleaned up integration tests by doing one or more of the following:
- migrated any are2 tests to are3 in files I have changed
- de-duped, consolidated, removed dead int tests
- transformed applicable int tests into unit tests
- refactored to reduce number of system state resets by updating fixtures (use-fixtures :each (ingest/reset-fixture {})) to be :once instead of :each
Codecov Report
Attention: Patch coverage is 13.33333% with 104 lines in your changes missing coverage. Please review.
Project coverage is 29.33%. Comparing base (
52695c6) to head (4d479d4). Report is 1 commits behind head on master.
:exclamation: There is a different number of reports uploaded between BASE (52695c6) and HEAD (4d479d4). Click for more details.
HEAD has 20 uploads less than BASE
Flag BASE (52695c6) HEAD (4d479d4) 23 3
Additional details and impacted files
@@ Coverage Diff @@
## master #2174 +/- ##
===========================================
- Coverage 58.23% 29.33% -28.90%
===========================================
Files 1056 996 -60
Lines 71009 67739 -3270
Branches 2026 1156 -870
===========================================
- Hits 41353 19873 -21480
- Misses 27768 46761 +18993
+ Partials 1888 1105 -783
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.