openshift / oc-mirror

Lifecycle manager for internet-disconnected OpenShift environments
Apache License 2.0
82 stars 80 forks source link

OCPBUGS-32547: Fix delete generation for mirror to mirror flow #848

Closed lmzuccarelli closed 1 month ago

lmzuccarelli commented 1 month ago

Description

This a fix addresses the bug raised for delete images generation for the mirror to mirror flow

Fixes # OCPBUGS-32547

Type of change

How Has This Been Tested?

Executed the following isc

kind: ImageSetConfiguration
apiVersion: mirror.openshift.io/v2alpha1
mirror:
  platform:
    channels:
    - name: stable-4.14
      minVersion: 4.14.22
      maxVersion: 4.14.22
  operators:
    - catalog: registry.redhat.io/redhat/redhat-operator-index:v4.14
      packages:
      - name: aws-load-balancer-operator
    - catalog: oci:///home/lzuccarelli/go/src/github.com/openshift/oc-mirror/rhopi4-14
      targetTag: "v14"
      targetCatalog: "lmz/catalog"
      packages:
      - name: windows-machine-config-operator
    - catalog: oci:///home/lzuccarelli/go/src/github.com/openshift/oc-mirror/rhopi4-14
      packages:
      - name: cincinnati-operator

Then ensured a mirror to mirror workflow using this command

bin/oc-mirror --config ocpbugs-32547.yaml --workspace file://ocpbugs-32547 --v2 docker://localhost:5000/ocpbugs-32547 --dest-tls-verify=false

Created a delete-isc.yaml from the isc as described above

Once completed I executed the following to generate the delete files.

bin/oc-mirror delete --config delete-32547.yaml --workspace file://ocpbugs-32547 --v2 --generate docker://localhost:5000/ocpbugs-32547 --dest-tls-verify=false

And finally actually doing a delete of the remote registry

bin/oc-mirror delete --config delete-32547.yaml --delete-yaml-file ocpbugs-32547/working-dir/delete/delete-images.yaml --v2 docker://localhost:5000/ocpbugs-32547 --dest-tls-verify=false --force-cache-delete

Expected Outcome

openshift-ci-robot commented 1 month ago

@lmzuccarelli: This pull request references Jira Issue OCPBUGS-32547, which is invalid:

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

In response to [this](https://github.com/openshift/oc-mirror/pull/848): ># Description > >This a fix addresses the bug raised for delete images generation for the mirror to mirror flow > >Fixes # OCPBUGS-32547 > >## Type of change > >- [x] Bug fix (non-breaking change which fixes an issue) >- [ ] New feature (non-breaking change which adds functionality) >- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) >- [ ] This change requires a documentation update > ># How Has This Been Tested? > >Executed all unit tests > >## Expected Outcome >All unit and e2e should pass Instructions for interacting with me using PR comments are available [here](https://prow.ci.openshift.org/command-help?repo=openshift%2Foc-mirror). If you have questions or suggestions related to my behavior, please file an issue against the [openshift-eng/jira-lifecycle-plugin](https://github.com/openshift-eng/jira-lifecycle-plugin/issues/new) repository.
openshift-ci[bot] commented 1 month ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: lmzuccarelli

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: - ~~[OWNERS](https://github.com/openshift/oc-mirror/blob/main/OWNERS)~~ [lmzuccarelli] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
lmzuccarelli commented 1 month ago

/jira refresh

openshift-ci-robot commented 1 month ago

@lmzuccarelli: This pull request references Jira Issue OCPBUGS-32547, which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug * bug is open, matching expected state (open) * bug target version (4.16.0) matches configured target version for branch (4.16.0) * bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact: /cc @zhouying7780

In response to [this](https://github.com/openshift/oc-mirror/pull/848#issuecomment-2100470545): >/jira refresh Instructions for interacting with me using PR comments are available [here](https://prow.ci.openshift.org/command-help?repo=openshift%2Foc-mirror). If you have questions or suggestions related to my behavior, please file an issue against the [openshift-eng/jira-lifecycle-plugin](https://github.com/openshift-eng/jira-lifecycle-plugin/issues/new) repository.
openshift-ci-robot commented 1 month ago

@lmzuccarelli: This pull request references Jira Issue OCPBUGS-32547, which is valid.

3 validation(s) were run on this bug * bug is open, matching expected state (open) * bug target version (4.16.0) matches configured target version for branch (4.16.0) * bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact: /cc @zhouying7780

In response to [this](https://github.com/openshift/oc-mirror/pull/848): ># Description > >This a fix addresses the bug raised for delete images generation for the mirror to mirror flow > >Fixes # OCPBUGS-32547 > >## Type of change > >- [x] Bug fix (non-breaking change which fixes an issue) >- [ ] New feature (non-breaking change which adds functionality) >- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) >- [ ] This change requires a documentation update > ># How Has This Been Tested? > >Executed the following isc > >``` >kind: ImageSetConfiguration >apiVersion: mirror.openshift.io/v2alpha1 >mirror: > platform: > channels: > - name: stable-4.14 > minVersion: 4.14.22 > maxVersion: 4.14.22 > operators: > - catalog: registry.redhat.io/redhat/redhat-operator-index:v4.14 > packages: > - name: aws-load-balancer-operator > - catalog: oci:///home/lzuccarelli/go/src/github.com/openshift/oc-mirror/rhopi4-14 > targetTag: "v14" > targetCatalog: "lmz/catalog" > packages: > - name: windows-machine-config-operator > - catalog: oci:///home/lzuccarelli/go/src/github.com/openshift/oc-mirror/rhopi4-14 > packages: > - name: cincinnati-operator >``` > >Then ensured a mirror to mirror workflow using this command > >``` >bin/oc-mirror --config ocpbugs-32547.yaml --workspace file://ocpbugs-32547 --v2 docker://localhost:5000/ocpbugs-32547 --dest-tls-verify=false >``` > >Created a delete-isc.yaml from the isc as described above > >Once completed I executed the following to generate the delete files. > >``` >bin/oc-mirror delete --config delete-32547.yaml --workspace file://ocpbugs-32547 --v2 --generate docker://localhost:5000/ocpbugs-32547 --dest-tls-verify=false >``` > >And finally actually doing a delete of the remote registry > >``` >bin/oc-mirror delete --config delete-32547.yaml --delete-yaml-file ocpbugs-32547/working-dir/delete/delete-images.yaml --v2 docker://localhost:5000/ocpbugs-32547 --dest-tls-verify=false --force-cache-delete >``` > >## Expected Outcome >- All indicated steps should **not** fail >- All unit and e2e should pass Instructions for interacting with me using PR comments are available [here](https://prow.ci.openshift.org/command-help?repo=openshift%2Foc-mirror). If you have questions or suggestions related to my behavior, please file an issue against the [openshift-eng/jira-lifecycle-plugin](https://github.com/openshift-eng/jira-lifecycle-plugin/issues/new) repository.
lmzuccarelli commented 1 month ago

/test images

lmzuccarelli commented 1 month ago

/test images

lmzuccarelli commented 1 month ago

/retest

zhouying7780 commented 1 month ago

/label qe-approved

sherine-k commented 1 month ago

/lgtm

openshift-ci[bot] commented 1 month ago

@lmzuccarelli: all tests passed!

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
openshift-ci-robot commented 1 month ago

@lmzuccarelli: Jira Issue OCPBUGS-32547: All pull requests linked via external trackers have merged:

Jira Issue OCPBUGS-32547 has been moved to the MODIFIED state.

In response to [this](https://github.com/openshift/oc-mirror/pull/848): ># Description > >This a fix addresses the bug raised for delete images generation for the mirror to mirror flow > >Fixes # OCPBUGS-32547 > >## Type of change > >- [x] Bug fix (non-breaking change which fixes an issue) >- [ ] New feature (non-breaking change which adds functionality) >- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) >- [ ] This change requires a documentation update > ># How Has This Been Tested? > >Executed the following isc > >``` >kind: ImageSetConfiguration >apiVersion: mirror.openshift.io/v2alpha1 >mirror: > platform: > channels: > - name: stable-4.14 > minVersion: 4.14.22 > maxVersion: 4.14.22 > operators: > - catalog: registry.redhat.io/redhat/redhat-operator-index:v4.14 > packages: > - name: aws-load-balancer-operator > - catalog: oci:///home/lzuccarelli/go/src/github.com/openshift/oc-mirror/rhopi4-14 > targetTag: "v14" > targetCatalog: "lmz/catalog" > packages: > - name: windows-machine-config-operator > - catalog: oci:///home/lzuccarelli/go/src/github.com/openshift/oc-mirror/rhopi4-14 > packages: > - name: cincinnati-operator >``` > >Then ensured a mirror to mirror workflow using this command > >``` >bin/oc-mirror --config ocpbugs-32547.yaml --workspace file://ocpbugs-32547 --v2 docker://localhost:5000/ocpbugs-32547 --dest-tls-verify=false >``` > >Created a delete-isc.yaml from the isc as described above > >Once completed I executed the following to generate the delete files. > >``` >bin/oc-mirror delete --config delete-32547.yaml --workspace file://ocpbugs-32547 --v2 --generate docker://localhost:5000/ocpbugs-32547 --dest-tls-verify=false >``` > >And finally actually doing a delete of the remote registry > >``` >bin/oc-mirror delete --config delete-32547.yaml --delete-yaml-file ocpbugs-32547/working-dir/delete/delete-images.yaml --v2 docker://localhost:5000/ocpbugs-32547 --dest-tls-verify=false --force-cache-delete >``` > >## Expected Outcome >- All indicated steps should **not** fail >- All unit and e2e should pass Instructions for interacting with me using PR comments are available [here](https://prow.ci.openshift.org/command-help?repo=openshift%2Foc-mirror). If you have questions or suggestions related to my behavior, please file an issue against the [openshift-eng/jira-lifecycle-plugin](https://github.com/openshift-eng/jira-lifecycle-plugin/issues/new) repository.
openshift-bot commented 1 month ago

[ART PR BUILD NOTIFIER]

This PR has been included in build oc-mirror-plugin-container-v4.17.0-202405132002.p0.g42dd3ce.assembly.stream.el9 for distgit oc-mirror-plugin. All builds following this will include this PR.

openshift-merge-robot commented 1 month ago

Fix included in accepted release 4.16.0-0.nightly-2024-05-14-095225