Improved handling with Registry file refs that don't share a common prefix with the bundle URL #184
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🗒️ Summary
Merge this if you dare to fix #178. This alters the way paths are written into checksum manifests and transfer manifests. Previously, we'd just find the index of the rightmost
/
in the bundle URL and assume that we could then strip that many characters off the beginning of all file refs associated with that bundle.This wasn't the case for
urn:nasa:pds:cassini_uvis_solarocc_beckerjarmak2023::1.0
, though. It had file refs that were in different parent paths altogether. In fact, 96 of the file refs shared the path as thebundle.xml
, but 86 were in different parents.Now, we find the prefix not based on the index of the rightmost
/
but by scanning all file refs and looking for the largest common prefix amongst them—stripping those out before writing the manifests.⚙️ Test Data and/or Report
Well, the built-in hooks confirmed everything's up-to-snuff, but to be extra explicit:
♻️ Related Issues