-
Notifications
You must be signed in to change notification settings - Fork 31
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
build-release: Validate collections MANIFEST.json and FILES.json against repository tag #321
Comments
I have bits of code that might be helpful:
Ideally we would be able to check out the git version of the collection and then compare if the files match what we have in FILES.json. I suspect some challenges like repositories tagging in various different formats (or not at all) but it is hopefully not impossible. |
|
Thanks for the tip @felixfontein, I didn't even realize that command existed. I tried it really quickly and I need to dig further to understand exactly what it does (and how it does it) but at first glance:
My understanding is that it downloads the version of the collection you have installed and verifies that it matches. Pretend the following scenario:
The contents of the tarball and the contents of the 1.9.0 tag would be different with mismatched checksums. Another example would be how https://github.com/CheckPointSW/CheckPointAnsibleMgmtCollection doesn't have a This would avoid mistakes, bugs or worse: unintended or malicious code changes. |
I created an issue about the misleading help text for ansible-galaxy collection verify: ansible/ansible#76087 |
Yeah, if the tag isn't published that won't work. Verify is for checking an installed collection against a published one (not source repository). Regarding the scenario in #321 (comment), how about using the |
I thought it would be worth mentioning that there's an interesting tangential improvement planned in ansible-core 2.13: From asking around, my understanding is that it will allow to trigger the build of a collection based on a git ref. In other words, instead of building a collection locally and then uploading the resulting tarball, the While we may not be able to leverage it right away in the community galaxy, we can look forward to it when it eventually is migrated to galaxyng. |
I created a RFC in #556. It needs some work, but I wanted to get the discussion started. |
Two files are added to a built collection tarball: FILES.json and MANIFEST.json.
We should validate:
Samples of these files below:
The text was updated successfully, but these errors were encountered: