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

builder,dispatcher: Parse ADD --checksum #265

Merged
merged 2 commits into from
Nov 8, 2023

Conversation

jfroy
Copy link
Contributor

@jfroy jfroy commented Nov 6, 2023

Parse the new ADD --checksum flag.

See https://docs.docker.com/build/dockerfile/release-notes/#160.

This will be consumed by buildah. See containers/buildah#5135.

FROM scratch
ADD --checksum=sha256:5df80a9219a28d21f96e8c99e5406d19dbe65b9673a7724e587584b02143038c https://github.com/containers/podman/releases/download/v4.7.2/podman-remote-static-linux_amd64.tar.gz /

Parse the new ADD --checksum flag.

See https://docs.docker.com/build/dockerfile/release-notes/#160.

This will be consumed by buildah. See containers/buildah#5135.

```Dockerfile
FROM scratch
ADD --checksum=sha256:5df80a9219a28d21f96e8c99e5406d19dbe65b9673a7724e587584b02143038c https://github.com/containers/podman/releases/download/v4.7.2/podman-remote-static-linux_amd64.tar.gz /
```

Signed-off-by: Jean-Francois Roy <jf@devklog.net>
@openshift-ci openshift-ci bot requested review from mrunalp and nalind November 6, 2023 20:35
@openshift-ci openshift-ci bot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Nov 6, 2023
Copy link
Contributor

openshift-ci bot commented Nov 6, 2023

Hi @jfroy. Thanks for your PR.

I'm waiting for a openshift member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@nalind
Copy link
Member

nalind commented Nov 6, 2023

Thanks for this!

/ok-to-test

Can you have the dockerclient.ClientExecutor implementation (somewhere around dockerclient/client.go's line 879) complain when its methods are passed new fields which it doesn't know what to do with, sort of like the Run() method complains about flags that it doesn't implement? If we don't remember to do that, it'll just start quietly ignoring flags that it used to produce errors over before, and users of the imagebuilder CLI might come to think that those options actually work. That is an oversight that has come back to bite us before.

@openshift-ci openshift-ci bot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Nov 6, 2023
@jfroy
Copy link
Contributor Author

jfroy commented Nov 6, 2023

Thanks for this!

/ok-to-test

Can you have the dockerclient.ClientExecutor implementation (somewhere around dockerclient/client.go's line 879) complain when its methods are passed new fields which it doesn't know what to do with, sort of like the Run() method complains about flags that it doesn't implement? If we don't remember to do that, it'll just start quietly ignoring flags that it used to produce errors over before, and users of the imagebuilder CLI might come to think that those options actually work. That is an oversight that has come back to bite us before.

Yeah I was worried about imagebuilder itself now silently ignoring the flag. I don't quite have the time to actually implement the flag in this project, but at least rejecting it is necessary. In particular, it will give a dangerous false sense of security if it is silently ignored.

Signed-off-by: Jean-Francois Roy <jf@devklog.net>
@nalind
Copy link
Member

nalind commented Nov 6, 2023

/approve

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 6, 2023
Copy link
Contributor

@TomSweeneyRedHat TomSweeneyRedHat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
and happy greeen test buttons

@rhatdan
Copy link
Contributor

rhatdan commented Nov 8, 2023

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Nov 8, 2023
Copy link
Contributor

openshift-ci bot commented Nov 8, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jfroy, nalind, rhatdan

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link
Contributor

openshift-ci bot commented Nov 8, 2023

@jfroy: all tests passed!

Full PR test history. Your PR dashboard.

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. I understand the commands that are listed here.

@openshift-merge-bot openshift-merge-bot bot merged commit b27edc0 into openshift:master Nov 8, 2023
2 checks passed
@jfroy jfroy deleted the parse-add-checksum branch November 8, 2023 21:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants