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

AGENT-326: Fix releaseImage mirror handling with unit test #6275

Merged

Conversation

bfournie
Copy link
Contributor

@bfournie bfournie commented Aug 29, 2022

Based on #6272, this fixes the mirror generation to handle release images that include the sha256 checksum, e.g:
quay.io/openshift-release-dev/ocp- release@sha256:300bce8246cf880e792e106607925de0a404484637627edf5f517375517d54a4

Based on openshift#6272, this
fixes the mirror generation to handle release images that
include the sha256 checksum, e.g:
quay.io/openshift-release-dev/ocp-release@sha256:300bce8246cf880e792e106607925de0a404484637627edf5f517375517d54a4
@openshift-ci openshift-ci bot requested review from andfasano and zaneb August 29, 2022 17:04
@bfournie
Copy link
Contributor Author

/cc @celebdor

@openshift-ci openshift-ci bot requested a review from celebdor August 29, 2022 17:05
@bfournie
Copy link
Contributor Author

/retest

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Aug 30, 2022

@bfournie: 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.

// include the tag with the build release image
if len(source) == 4 {
// Has Sha256
releaseImageMirror = fmt.Sprintf("%s%s:%s", config.Mirror, source[2], source[3])
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: this could be slightly simplified to: releaseImageMirror = fmt.Sprintf("%s@sha256:%s", config.Mirror, source[3])

@andfasano
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Aug 30, 2022
} else if len(source) == 3 {
releaseImageMirror = fmt.Sprintf("%s:%s", config.Mirror, source[2])
}
}
Copy link
Member

Choose a reason for hiding this comment

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

Pre-existing issue, but it's a bit surprising that we don't return or break here, so we're always choosing the last matching mirror on the list.

@zaneb zaneb changed the title Agent 326: Fix releaseImage mirror handling with unit test AGENT-326: Fix releaseImage mirror handling with unit test Aug 30, 2022
@zaneb
Copy link
Member

zaneb commented Aug 31, 2022

/approve

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Aug 31, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: zaneb

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

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 31, 2022
@openshift-merge-robot openshift-merge-robot merged commit e4fba40 into openshift:agent-installer Aug 31, 2022
@bfournie bfournie deleted the release-image-mirror branch August 31, 2022 14:57
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants