Switch ldap-server build to hermetic mode#99
Open
lubomir wants to merge 1 commit into
Open
Conversation
- Replace fedora-minimal base image with python:3.12-slim, removing the need for microdnf and RPM dependency management - Add requirements.in listing direct dependencies (ldaptor, twisted) - Add requirements.txt generated with pip-compile --generate-hashes, pinning all transitive dependencies with cryptographic hashes - Update Containerfile to install from the locked requirements.txt using --require-hashes for supply-chain integrity - Enable hermetic mode in both Tekton pipeline definitions and set prefetch-input to pip so Cachi2 prefetches PyPI packages before the hermetic build Closes #95 Generated-By: OpenCode (google-vertex-anthropic/claude-sonnet-4-6@default)
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #99 +/- ##
=======================================
Coverage 83.69% 83.69%
=======================================
Files 13 13
Lines 1325 1325
=======================================
Hits 1109 1109
Misses 216 216
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
Author
|
Hermeto is trying to prefetch the root-level requirements.txt. That is bound to fail. The pipeline must be configured so that hermeto interacts only with the new requirements.txt for the ldap-server image. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Switch the
ldap-servercontainer build to hermetic mode by replacing thefedora-minimalbase image withpython:3.12-slimand locking all pip dependencies with cryptographic hashes.Changes
integration-tests/images/ldap-server/requirements.in– lists the two direct runtime dependencies (ldaptor,twisted).integration-tests/images/ldap-server/requirements.txt– pip-compiled lock file with--hash=annotations for every package (direct and transitive). Regenerate withpip-compile --generate-hasheswhen dependencies change.integration-tests/images/ldap-server/Containerfile– switches base image fromregistry.fedoraproject.org/fedora-minimal:44topython:3.12-slim; removes themicrodnfinstallation steps; installs dependencies viapip install --require-hashes -r requirements.txt..tekton/ldap-server-pull-request.yamland.tekton/ldap-server-push.yaml– addhermetic: "true"andprefetch-input: pipto the top-levelspec.paramsblock, enabling Cachi2 pip prefetch and network-isolated builds without any structural pipeline changes.