-
Notifications
You must be signed in to change notification settings - Fork 109
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
tools/osbuild-mpp: add mpp-resolve-ostree-commits helper #1399
tools/osbuild-mpp: add mpp-resolve-ostree-commits helper #1399
Conversation
The last commit is an attempt to add a test for this. I'm not sure the best way to go about doing that, but maybe let's use that as a starting point for discussion on how? |
27eb85f
to
81627ef
Compare
for the CI failure:
The |
For testing we generally use resources and content that we control and can update when we need to. For RPMs we snapshot repositories. For containers we have one or two in the gitlab registry of our project. We never figured out the equivalent for ostree commits. We would need to host a commit in a repo somewhere where we know it wont change until we want to update the tests. |
The problem in a nutshell. ostree repositories are just files on a webserver to be clear though. That said, if it helps it's really easy to "encapsulate" an ostree commit in a container image, and then unencapsulate it. So actually everywhere we accept a direct ostree commit reference as input, we could also accept an encapsulated container, and then un-encapsulate it early on in the build process. |
don't worry 😄 there's a PR for that coming soon, but really we just |
I think it's okay to skip automated testing until we get this feature. A manual test should suffice for now. |
I think you are saying we can just drop the |
Similar to the cleanups in 4e99e80, let's start using the library code for the calls to ostree here.
Similar to the cleanups in 4e99e80, let's start using the library code for the calls to ostree here.
This moves the setup_remote function from the ostree source into util/ostree. This is prep for sharing this function with an mpp helper in the future.
This will make it easier to resolve OSTree refs into commits similar to how mpp-resolve-images works for container image references to SHA256 digests.
81627ef
to
aed1112
Compare
dropped the |
This adds an early return to the `_process_ostree_commits` function to prevent an empty ostree commit object from being created in the deploy stage which causes violations to the deploy stage input schema.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I'm good to merge if @alexlarsson is happy with the outcome of the ref vs target thread.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks OK to me code-wise.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
See individual commits for rationale.