Checked for duplicates
Yes - I've already checked
🐛 Describe the bug
Running registry-manager set-archive-status -lidvid <bundle-lid> (with a bare LID, not a full LIDVID) does not cascade the status update to the bundle's associated collections and their products. The command silently does nothing — the bundle itself is not updated, and neither are any collections or products.
Additionally, even when providing a valid bundle LIDVID, if the cascade logic fails to find collection references, it silently exits without updating collections.
Two related root causes found in code review:
1. Silent failure when a LID is provided instead of a LIDVID
The -lidvid parameter requires a full LIDVID (e.g., urn:nasa:pds:bundle::1.0), not a bare LID. Internally, ProductService.updateArchiveStatus() calls dao.getProductClass(lidvid), which does a direct GET-by-document-ID lookup in Elasticsearch/OpenSearch. Since document IDs are stored as LIDVIDs, a bare LID results in a 404. The 404 is silently treated as "not found" — the code logs a WARN-level "Unknown LIDVID" message and returns without updating anything. No actionable error is shown to the user.
2. Cascade from bundle → collections may silently fail
The cascade logic for Product_Bundle calls dao.getCollectionIds(bundleLidvid) to fetch ref_lid_collection / ref_lidvid_collection fields from the bundle document. If these fields are absent or empty, getCollectionIds() returns a LidvidSet with empty sets (not null), so the null-guard does not trigger. updateCollections() is then called with an empty set, silently updating nothing. The only output is a total updated-count of 1 (just the bundle), with no warning that no collections were found.
🕵️ Expected behavior
- When a bare LID (without
::version) is provided to -lidvid, the tool should either:
- Automatically resolve it to the latest LIDVID (consistent with how
getLatestLidVids() works for collection resolution), or
- Emit a clear, user-visible error message instructing the user to provide a full LIDVID.
- When cascading from a bundle fails to find any collection references, the tool should emit a visible WARNING indicating that no collections were found/updated, so the user knows to investigate.
- Help text / documentation should explicitly state that providing a bundle LIDVID cascades updates to all associated collections and products.
📜 To Reproduce
- Harvest a bundle with associated collections and products into the registry.
- Run:
registry-manager set-archive-status -lidvid urn:nasa:pds:<bundle-lid> -status archived (bare LID, no ::version)
- Observe: no products are updated; only a WARN "Unknown LIDVID" log appears (only visible if log level is WARN or lower)
- Check registry — bundle, collections, and products are all unchanged.
🖥 Environment Info
- Software: registry-loader (harvest + registry-manager)
- Backend: Elasticsearch / OpenSearch
📚 Version of Software Used
Current main branch
🩺 Test Data / Additional context
This was reported by a user who:
- Ran
set-archive-status targeting bundle LIDs expecting cascade to collections/products
- Found it had no effect
- Manually ran the command against each individual collection LID as a workaround
- Was left with a state where some collections were
staged while the bundle was archived
🦄 Related requirements
N/A
For Internal Dev Team To Complete
⚙️ Engineering Details
🎉 Integration & Test
Checked for duplicates
Yes - I've already checked
🐛 Describe the bug
Running
registry-manager set-archive-status -lidvid <bundle-lid>(with a bare LID, not a full LIDVID) does not cascade the status update to the bundle's associated collections and their products. The command silently does nothing — the bundle itself is not updated, and neither are any collections or products.Additionally, even when providing a valid bundle LIDVID, if the cascade logic fails to find collection references, it silently exits without updating collections.
Two related root causes found in code review:
1. Silent failure when a LID is provided instead of a LIDVID
The
-lidvidparameter requires a full LIDVID (e.g.,urn:nasa:pds:bundle::1.0), not a bare LID. Internally,ProductService.updateArchiveStatus()callsdao.getProductClass(lidvid), which does a direct GET-by-document-ID lookup in Elasticsearch/OpenSearch. Since document IDs are stored as LIDVIDs, a bare LID results in a 404. The 404 is silently treated as "not found" — the code logs a WARN-level "Unknown LIDVID" message and returns without updating anything. No actionable error is shown to the user.2. Cascade from bundle → collections may silently fail
The cascade logic for
Product_Bundlecallsdao.getCollectionIds(bundleLidvid)to fetchref_lid_collection/ref_lidvid_collectionfields from the bundle document. If these fields are absent or empty,getCollectionIds()returns aLidvidSetwith empty sets (notnull), so the null-guard does not trigger.updateCollections()is then called with an empty set, silently updating nothing. The only output is a total updated-count of 1 (just the bundle), with no warning that no collections were found.🕵️ Expected behavior
::version) is provided to-lidvid, the tool should either:getLatestLidVids()works for collection resolution), or📜 To Reproduce
registry-manager set-archive-status -lidvid urn:nasa:pds:<bundle-lid> -status archived(bare LID, no::version)🖥 Environment Info
📚 Version of Software Used
Current main branch
🩺 Test Data / Additional context
This was reported by a user who:
set-archive-statustargeting bundle LIDs expecting cascade to collections/productsstagedwhile the bundle wasarchived🦄 Related requirements
N/A
For Internal Dev Team To Complete
⚙️ Engineering Details
🎉 Integration & Test