Skip to content

CMR-11367: Update business validation rules for collection ingest to fold behind the collection-granule-consistency-toggle#2463

Open
eudoroolivares2016 wants to merge 4 commits into
masterfrom
CMR-11367-test
Open

CMR-11367: Update business validation rules for collection ingest to fold behind the collection-granule-consistency-toggle#2463
eudoroolivares2016 wants to merge 4 commits into
masterfrom
CMR-11367-test

Conversation

@eudoroolivares2016

@eudoroolivares2016 eudoroolivares2016 commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Overview

What is the objective?

In CMR-11242 we added a feature toggle to allow users to ingest granules that have mismatched keywords into collections to unblock that ingest pipeline. Within this scope we also need to disable the rule preventing collections to be ingested in cases where the granule keywords differ.

What are the changes?

Conditionally include the validation rules for projects, instruments parents, and child instruments behind the validation
toggle for granule-collection consistency

I use the lein cljfmt fix to format the files according to common clojure convention

What areas of the application does this impact?

Ingest app

Testing

To test this ingest a collection and granule pair that have the same (project, instrument, platform) data then update those values and do a subsequent collection ingest request it should succeed. Note if doing this off local
you might need to do a (cfg/set-enforce-granule-collection-consistency! false) in the repl and then reload namespaces. Alternatively you can just locally update the defconfig value at compile time more similar to how it works in prod

Required Checklist

Build Link: https://ci.earthdata.nasa.gov/browse/CN2-CSN21021-2

  • New and existing unit and int tests pass locally and remotely
  • clj-kondo has been run locally and all errors in changed files are corrected
  • I have commented my code, particularly in hard-to-understand areas
  • I have made changes to the documentation (if necessary)
  • My changes generate no new warnings

Additional Checklist

  • I have removed unnecessary/dead code and imports in files I have changed
  • 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
    • reduced number of system state resets by updating fixtures. Ex) (use-fixtures :each (ingest/reset-fixture {})) to be :once instead of :each

@eudoroolivares2016 eudoroolivares2016 changed the title Cmr 11367 test CMR-11367: Update buisenss validation rules for collection ingest to fold behind the collection-granule-consistency-toggle Jul 14, 2026
@codecov-commenter

codecov-commenter commented Jul 14, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 78.57143% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 57.90%. Comparing base (55d37e5) to head (e2abd7f).

Files with missing lines Patch % Lines
...cmr/ingest/validation/business_rule_validation.clj 78.57% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2463      +/-   ##
==========================================
- Coverage   57.91%   57.90%   -0.01%     
==========================================
  Files        1073     1073              
  Lines       74616    74618       +2     
  Branches     2174     2170       -4     
==========================================
- Hits        43212    43210       -2     
- Misses      29378    29379       +1     
- Partials     2026     2029       +3     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.


[]
(concat
[aa/additional-attribute-searches tiling-validation/deleted-tiling-searches

@eereiter eereiter Jul 15, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

line up tiling-validation below aa/additional-attribute-searches

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Moved really not sure how that even happened

@eereiter eereiter left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

just line up tiling-validation below aa/additional-attribute-searches

@eudoroolivares2016
eudoroolivares2016 marked this pull request as ready for review July 15, 2026 15:08
@eudoroolivares2016 eudoroolivares2016 changed the title CMR-11367: Update buisenss validation rules for collection ingest to fold behind the collection-granule-consistency-toggle CMR-11367: Update business validation rules for collection ingest to fold behind the collection-granule-consistency-toggle Jul 15, 2026
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.

5 participants