Skip to content

Conversation

@smarterclayton
Copy link
Contributor

@smarterclayton smarterclayton commented Feb 25, 2020

When a file:// argument is provided as the source for oc adm release
mirror, do a digest lookup within that repo for any image referenced
by the payload, and if found use the local directory as the source.
This allows releases to be mirrored to disk and then oc adm release
mirror to be used to push it back with:

oc adm release mirror file://openshift/release:4.3.1 --to REPO

where before it would fail with "invalid image reference".

Ensure that when file:// is used the correct instructions are printed
for mirroring.

Fix the mirror command provided to users to put the wildcard in
quotes (to avoid bash shell expansion).

@openshift-ci-robot
Copy link

@smarterclayton: This pull request references Bugzilla bug 1806779, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

Bug 1806779: Allow a file:// release argument to release mirror

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.

@openshift-ci-robot openshift-ci-robot added the bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. label Feb 25, 2020
@openshift-ci-robot
Copy link

@smarterclayton: This pull request references Bugzilla bug 1806779, which is valid.

Details

In response to this:

Bug 1806779: Allow a file:// release argument to release mirror

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.

@openshift-ci-robot openshift-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Feb 25, 2020
@smarterclayton
Copy link
Contributor Author

/assign @wking

Found these while reviewing the documentation and fielding questions from folks trying the offline mode.

@smarterclayton
Copy link
Contributor Author

/cherry-pick release-4.4

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 25, 2020
@openshift-cherrypick-robot

@smarterclayton: once the present PR merges, I will cherry-pick it on top of release-4.4 in a new PR and assign it to you.

Details

In response to this:

/cherry-pick release-4.4

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.

@smarterclayton
Copy link
Contributor Author

/cherry-pick release-4.3

@openshift-cherrypick-robot

@smarterclayton: once the present PR merges, I will cherry-pick it on top of release-4.3 in a new PR and assign it to you.

Details

In response to this:

/cherry-pick release-4.3

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.

@smarterclayton
Copy link
Contributor Author

4.4 bug is 1806780 and 4.3 bug is 1806782

When a file:// argument is provided as the source for oc adm release
mirror, do a digest lookup within that repo for any image referenced
by the payload, and if found use the local directory as the source.
This allows releases to be mirrored to disk and then oc adm release
mirror to be used to push it back with:

  oc adm release mirror file://openshift/release:4.3.1 --to REPO

where before it would fail with "invalid image reference".

Ensure that when file:// is used the correct instructions are printed
for mirroring.

Fix the mirror command provided to users to put the wildcard in
quotes (to avoid bash shell expansion).
@smarterclayton
Copy link
Contributor Author

/retest

1 similar comment
@smarterclayton
Copy link
Contributor Author

/retest

Copy link
Contributor

@soltysh soltysh left a comment

Choose a reason for hiding this comment

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

One question, but this lgtm
/lgtm

if len(o.From) > 0 {
src := o.From
srcRef, err := imagereference.Parse(src)
srcRef, err := imagesource.ParseReference(src)
Copy link
Contributor

Choose a reason for hiding this comment

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

This will also allow s3:// reference, not sure if you want to allow that?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think we do at some point, just haven't gotten a chance to get back to it. We're keeping the s3 in our pocket so we can mirror to static stuff like file. In theory s3 and file should always work everywhere.

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Feb 27, 2020
@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: smarterclayton, soltysh

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

The pull request process is described here

Details Needs approval from an approver in each of these files:
  • OWNERS [smarterclayton,soltysh]

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

@openshift-merge-robot openshift-merge-robot merged commit 11e9ccf into openshift:master Feb 27, 2020
@openshift-ci-robot
Copy link

@smarterclayton: All pull requests linked via external trackers have merged. Bugzilla bug 1806779 has been moved to the MODIFIED state.

Details

In response to this:

Bug 1806779: Allow a file:// release argument to release mirror

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.

@openshift-cherrypick-robot

@smarterclayton: new pull request created: #327

Details

In response to this:

/cherry-pick release-4.4

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.

@openshift-cherrypick-robot

@smarterclayton: new pull request created: #328

Details

In response to this:

/cherry-pick release-4.3

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.

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. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants