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

loosen restriction on required bundle/collection file naming #637

Merged
merged 10 commits into from
May 5, 2023

Conversation

al-niessner
Copy link
Contributor

🗒️ Summary

Brief summary of changes if not sufficiently described by commit messages.

⚙️ Test Data and/or Report

One of the following should be included here:

  • Reference to regression test included in code (preferred wherever reasonable)
  • Attach test data here + outputs of tests

♻️ Related Issues

@al-niessner
Copy link
Contributor Author

@jordanpadams

Okay, this one looks deceptively simple. It seems that the bundle/collection token are passed to the crawler and this where it is used. While cutting them out is simple ,as everything then gets processed as a generic file, it may alter some higher up ordering that is not abundantly clear yet. Therefore this branch has become highly experimental and may need to go away or reverted back to the current checksum and started over.

Used unix command line find to locate a bunch of "bundle" and "collection" in the Java code. Began extracting them where they related to filenaming - probably missed some but will find them later. Removing them concentrated checking if bundle or collection into AggregateManager (rename of BundleManager since it also encapsulates collections even before this change) where a URL can be identified as bundle or collection.

Determining bundle and collection now means verifying the <product_class> has the correct content. It is more robust than filenaming anyway.

These changes allow bundles and collections to be named anything. The test for this issue now works but need to push it back through the build to see if breaks anything else.
@sonatype-lift
Copy link
Contributor

sonatype-lift bot commented May 4, 2023

🛠 Lift Auto-fix

Some of the Lift findings in this PR can be automatically fixed. You can download and apply these changes in your local project directory of your branch to review the suggestions before committing.1

# Download the patch
curl https://lift.sonatype.com/api/patch/github.com/NASA-PDS/validate/637.diff -o lift-autofixes.diff

# Apply the patch with git
git apply lift-autofixes.diff

# Review the changes
git diff

Want it all in a single command? Open a terminal in your project's directory and copy and paste the following command:

curl https://lift.sonatype.com/api/patch/github.com/NASA-PDS/validate/637.diff | git apply

Once you're satisfied, commit and push your changes in your project.

Footnotes

  1. You can preview the patch by opening the patch URL in the browser.

@al-niessner al-niessner marked this pull request as ready for review May 4, 2023 21:52
@jordanpadams jordanpadams changed the title Issue 561: do not require bundle/collection in file name loosen restriction on required bundle/collection file naming May 5, 2023
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.

2 participants