RHEL-14922: accept a config blob alongside the "changes" slice when committing#20657
Conversation
pkg/bindings/containers/types.go
Outdated
There was a problem hiding this comment.
I think it would make more sense to accepts an io.Reader here instead.
There was a problem hiding this comment.
Had to make it a *io.Reader to make the generator happy.
There was a problem hiding this comment.
Yeah I think the generator could use some improvements, IMO a pointer to a interface makes things harder to use and more likely to cause nil derefs.
Anyway this shouldn't really block your work.
pkg/domain/entities/containers.go
Outdated
There was a problem hiding this comment.
Had to make it a *io.Reader to make the generator happy.
pkg/bindings/containers/commit.go
Outdated
There was a problem hiding this comment.
you can add schema:"-" to the type then it will not be added via ToParams()
There was a problem hiding this comment.
Ah, thanks, I wouldn't have guessed that.
88dcb4f to
130fe7f
Compare
|
/override Build Each Commit |
|
@nalind: /override requires failed status contexts, check run or a prowjob name to operate on.
Only the following failed contexts/checkruns were expected:
If you are trying to override a checkrun that has a space in it, you must put a double quote on the context. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
/override "Build Each Commit" |
|
@nalind: Overrode contexts on behalf of nalind: Build Each Commit DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
a011559 to
8b7478b
Compare
|
/retitle RHEL-14922: accept a config blob alongside the "changes" slice when committing |
8b7478b to
ea7b1de
Compare
pkg/domain/entities/containers.go
Outdated
There was a problem hiding this comment.
This struct is used for the REST API as well - will this break given that io.Reader can't really be serialized over the network?
There was a problem hiding this comment.
Changed it back to a []byte.
77c513a to
08c51ea
Compare
|
Ephemeral COPR build failed. @containers/packit-build please check. |
|
LGTM |
There was a problem hiding this comment.
Can we point users to a specification of the configuration?
There was a problem hiding this comment.
It varies between OCI and Docker image formats. I don't think there's a stable location to point to for the Docker config blob format (the engine API documentation is close, but it includes the API version number) , and the OCI version is missing some interesting fields. If it wasn't being exercised in tests that I'm about to add, I could pretty easily be talked into dropping the option.
Actually, maybe even after I add the tests to the PR....
There was a problem hiding this comment.
Well, as written, it's a JSON-encoded copy of the structure defined at https://github.com/containers/image/blob/main/manifest/docker_schema2.go#L67. Would a pointer to that be useful enough to someone who hasn't spent time staring at that code at some point already?
There was a problem hiding this comment.
Okay, added. Pointed at the currently-newest tag instead of main in case the line number changes.
bd40243 to
7289285
Compare
…tting Use ParseUserNamespace instead of ParseNamespace to parse a passed-in user namespace setting. Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
When committing containers to create new images, accept a container config blob being passed in the body of the API request by adding a Config field to our API structures. Populate it from the body of requests that we receive, and use its contents as the body of requests that we make. Make the libpod commit endpoint split changes values at newlines, just like the compat endpoint does. Pass both the config blob and the "changes" slice to buildah's Commit() API, so that it can handle cases where they overlap or conflict. Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
7289285 to
dbbe72e
Compare
|
Changed a line in the description of the |
Be specific that the `-v` flag only affects RUN instructions. The previous wording left it ambiguous, and people might have concluded that it applied to ADD and COPY as well. Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
dbbe72e to
fa0aa91
Compare
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: nalind, rhatdan The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/cherry-pick v4.9.1-rhel |
|
@nalind: new pull request created: #21547 DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
/cherry-pick v4.9 |
|
@nalind: new pull request created: #21549 DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Does this PR introduce a user-facing change?
Fixes #13770.