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

Add 'digest' field to PushInfo provider. #591

Merged
merged 6 commits into from
Dec 5, 2018

Conversation

ceason
Copy link
Contributor

@ceason ceason commented Dec 2, 2018

This PR adds a 'digest' field to PushInfo provider. The field's value is a <File> containing the to-be-published image digest.

I rearranged the container_pusher implementation function a bit, to emphasize that the digester needs to receive the same arguments as the pusher.

@k8s-ci-robot
Copy link

Hi @ceason. Thanks for your PR.

I'm waiting for a bazelbuild 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.

Copy link
Contributor

@nlopezgi nlopezgi left a comment

Choose a reason for hiding this comment

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

change looks good overall, but we need tests, and I just noticed we have no tests at all for container_push. I'll figure out hot to add a generic test for container_push that you can then extend. However, to test this PR, I think the easiest path is to make the image_digest an explicit output of container_push so that we can do bazel build <some container_push target> and then check that the output digest file was produced with some expected values with a file_test. I'll get back in a bit once I figure out how to best add a test for container_push, but you can get started on making the file an output.

@nlopezgi
Copy link
Contributor

nlopezgi commented Dec 3, 2018

Also, please ignore the buildkite failures, there's an upstream issue with buildkite that is impacting all bazelbuild projects which should be fixed soon.

@nlopezgi
Copy link
Contributor

nlopezgi commented Dec 3, 2018

created #595 to add a test

@nlopezgi
Copy link
Contributor

nlopezgi commented Dec 4, 2018

Test for container_push has been added, let me know if you need help setting up a test to validate your PR.

@ceason
Copy link
Contributor Author

ceason commented Dec 4, 2018

Thanks, I've added the named output and should be able to get to the test a bit later today or some time tomorrow.

@nlopezgi
Copy link
Contributor

nlopezgi commented Dec 4, 2018

Thanks, setting up the test should not be hard, let me know if you run into issues or have questions.

@ceason
Copy link
Contributor Author

ceason commented Dec 4, 2018

I've added a file_test. Thanks for the suggestion -- named output+file_test was definitely the easy path :)

Copy link
Contributor

@nlopezgi nlopezgi left a comment

Choose a reason for hiding this comment

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

thanks for adding the test, surprisingly, it passed on BuildKite CI (I was expecting this to fail as I thought we needed to explicitly start up the local registry, but looks like it just works as it is, so I can remove the e2e test I added in an upcoming PR)

@k8s-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: ceason, nlopezgi
To fully approve this pull request, please assign additional approvers.
We suggest the following additional approvers:

If they are not already assigned, you can assign the PR to them by writing /assign in a comment when ready.

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

@k8s-ci-robot k8s-ci-robot removed the lgtm label Dec 5, 2018
@k8s-ci-robot
Copy link

New changes are detected. LGTM label has been removed.

@nlopezgi nlopezgi merged commit 5eb0728 into bazelbuild:master Dec 5, 2018
smukherj1 added a commit to smukherj1/rules_docker that referenced this pull request Jan 10, 2019
This fixes bazelbuild#609. Also added end to end test to verify bundle pusher and
regular pusher upload legal images.
smukherj1 added a commit to smukherj1/rules_docker that referenced this pull request Jan 10, 2019
This fixes bazelbuild#609. Also added end to end test to verify bundle pusher and
regular pusher upload legal images.
smukherj1 added a commit to smukherj1/rules_docker that referenced this pull request Jan 11, 2019
This fixes bazelbuild#609. Also added end to end test to verify bundle pusher and
regular pusher upload legal images.
smukherj1 added a commit that referenced this pull request Jan 11, 2019
* Fix container bundle pusher broken by #591

This fixes #609. Also added end to end test to verify bundle pusher and
regular pusher upload legal images.

* Fix typo & formatting

* Address review comments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants