openshift / oc-mirror

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

OCPBUGS-42416: Only generate release config map when releases are sp… #931

Closed lmzuccarelli closed 2 months ago

lmzuccarelli commented 2 months ago

…ecified

Description

This bug fix addresses the issue when there is no platform (releases) specifed in the ImageSetConfig it should not attempt to generate the signature config map files.

Fixes # OCPBUGS-42416

Type of change

How Has This Been Tested?

Tested locally

Use this ImageSetConfig to verify

kind: ImageSetConfiguration
apiVersion: mirror.openshift.io/v2alpha1
mirror:
  operators:
  - catalog: registry.redhat.io/redhat/redhat-operator-index:v4.16
    packages:
    - name: multiarch-tuning-operator
      minVersion: 0.9.0
      maxVersion: 0.9.0

Perform a mirror to disk workflow

Once completed perform a disk to mirror workflow

Expected Outcome

No mention of signature config map generation

2024/09/25 10:49:37  [WARN]   : ⚠️  --v2 flag identified, flow redirected to the oc-mirror v2 version. This is Tech Preview, it is still under development and it is not production ready.
2024/09/25 10:49:37  [INFO]   : 👋 Hello, welcome to oc-mirror
2024/09/25 10:49:37  [INFO]   : ⚙️  setting up the environment for you...
2024/09/25 10:49:37  [INFO]   : 🔀 workflow mode: diskToMirror 
2024/09/25 10:49:43  [INFO]   : 🕵️  going to discover the necessary images...
2024/09/25 10:49:43  [INFO]   : 🔍 collecting release images...
2024/09/25 10:49:43  [INFO]   : 🔍 collecting operator images...
2024/09/25 10:49:52  [INFO]   : 🔍 collecting additional images...
2024/09/25 10:49:52  [INFO]   : 🚀 Start copying the images...
2024/09/25 10:49:52  [INFO]   : images to copy 4 
 ✓   1/4 : (0s) docker://gcr.io/kubebuilder/kube-rbac-proxy:v0.13.1@sha256:d4883d7c622683b3319b5e6b3a7edfbf2594c18060131a8bf64504805f875522 
 ✓   2/4 : (0s) docker://registry.redhat.io/multiarch-tuning/multiarch-tuning-rhel9-operator@sha256:118500bb10296469335b260ba28fb67785d05b1f9d0aab7dbf1d1b243620ed8f 
 ✓   3/4 : (0s) docker://registry.redhat.io/multiarch-tuning/multiarch-tuning-operator-bundle@sha256:b7c0e2ac16ea027d5af85e3ee10556e2f4cb5cbda956e432b63030ba688262cb 
 ✓   4/4 : (1s) docker://registry.redhat.io/redhat/redhat-operator-index:v4.16 
2024/09/25 10:49:53  [INFO]   : === Results ===
2024/09/25 10:49:53  [INFO]   : ✅ 4 / 4 operator images mirrored successfully
2024/09/25 10:49:53  [INFO]   : 📄 Generating IDMS file...
2024/09/25 10:49:53  [INFO]   : ying/working-dir/cluster-resources/idms-oc-mirror.yaml file created
2024/09/25 10:49:53  [INFO]   : 📄 Generating ITMS file...
2024/09/25 10:49:53  [INFO]   : ying/working-dir/cluster-resources/itms-oc-mirror.yaml file created
2024/09/25 10:49:53  [INFO]   : 📄 Generating CatalogSource file...
2024/09/25 10:49:53  [INFO]   : ying/working-dir/cluster-resources/cs-redhat-operator-index-v4-16.yaml file created
2024/09/25 10:49:53  [INFO]   : mirror time     : 16.316465947s
2024/09/25 10:49:53  [INFO]   : 👋 Goodbye, thank you for using oc-mirror
openshift-ci-robot commented 2 months ago

@lmzuccarelli: No Jira issue with key OCPBGUGS-42416 exists in the tracker at https://issues.redhat.com/. Once a valid jira issue is referenced in the title of this pull request, request a refresh with /jira refresh.

In response to [this](https://github.com/openshift/oc-mirror/pull/931): >…ecified > ># Description > >This bug fix addresses the issue when there is no platform (releases) specifed in the ImageSetConfig it should not attempt to generate the signature config map files. > >Fixes # OCPBUGS-42416 > >## 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? > >Tested locally > >Use this ImageSetConfig to verify > >``` >kind: ImageSetConfiguration >apiVersion: mirror.openshift.io/v2alpha1 >mirror: > operators: > - catalog: registry.redhat.io/redhat/redhat-operator-index:v4.16 > packages: > - name: multiarch-tuning-operator > minVersion: 0.9.0 > maxVersion: 0.9.0 > >``` > >Perform a mirror to disk workflow > >Once completed perform a disk to mirror workflow > > >## Expected Outcome > >No mention of signature config map generation > >``` >2024/09/25 10:49:37 [WARN] : ⚠️ --v2 flag identified, flow redirected to the oc-mirror v2 version. This is Tech Preview, it is still under development and it is not production ready. >2024/09/25 10:49:37 [INFO] : 👋 Hello, welcome to oc-mirror >2024/09/25 10:49:37 [INFO] : ⚙️ setting up the environment for you... >2024/09/25 10:49:37 [INFO] : 🔀 workflow mode: diskToMirror >2024/09/25 10:49:43 [INFO] : 🕵️ going to discover the necessary images... >2024/09/25 10:49:43 [INFO] : 🔍 collecting release images... >2024/09/25 10:49:43 [INFO] : 🔍 collecting operator images... >2024/09/25 10:49:52 [INFO] : 🔍 collecting additional images... >2024/09/25 10:49:52 [INFO] : 🚀 Start copying the images... >2024/09/25 10:49:52 [INFO] : images to copy 4 > ✓ 1/4 : (0s) docker://gcr.io/kubebuilder/kube-rbac-proxy:v0.13.1@sha256:d4883d7c622683b3319b5e6b3a7edfbf2594c18060131a8bf64504805f875522 > ✓ 2/4 : (0s) docker://registry.redhat.io/multiarch-tuning/multiarch-tuning-rhel9-operator@sha256:118500bb10296469335b260ba28fb67785d05b1f9d0aab7dbf1d1b243620ed8f > ✓ 3/4 : (0s) docker://registry.redhat.io/multiarch-tuning/multiarch-tuning-operator-bundle@sha256:b7c0e2ac16ea027d5af85e3ee10556e2f4cb5cbda956e432b63030ba688262cb > ✓ 4/4 : (1s) docker://registry.redhat.io/redhat/redhat-operator-index:v4.16 >2024/09/25 10:49:53 [INFO] : === Results === >2024/09/25 10:49:53 [INFO] : ✅ 4 / 4 operator images mirrored successfully >2024/09/25 10:49:53 [INFO] : 📄 Generating IDMS file... >2024/09/25 10:49:53 [INFO] : ying/working-dir/cluster-resources/idms-oc-mirror.yaml file created >2024/09/25 10:49:53 [INFO] : 📄 Generating ITMS file... >2024/09/25 10:49:53 [INFO] : ying/working-dir/cluster-resources/itms-oc-mirror.yaml file created >2024/09/25 10:49:53 [INFO] : 📄 Generating CatalogSource file... >2024/09/25 10:49:53 [INFO] : ying/working-dir/cluster-resources/cs-redhat-operator-index-v4-16.yaml file created >2024/09/25 10:49:53 [INFO] : mirror time : 16.316465947s >2024/09/25 10:49:53 [INFO] : 👋 Goodbye, thank you for using oc-mirror > >``` 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 2 months 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
openshift-ci-robot commented 2 months ago

@lmzuccarelli: This pull request references Jira Issue OCPBUGS-42416, 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.18.0) matches configured target version for branch (4.18.0) * bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact: /cc @zhouying7780

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/931): >…ecified > ># Description > >This bug fix addresses the issue when there is no platform (releases) specifed in the ImageSetConfig it should not attempt to generate the signature config map files. > >Fixes # OCPBUGS-42416 > >## 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? > >Tested locally > >Use this ImageSetConfig to verify > >``` >kind: ImageSetConfiguration >apiVersion: mirror.openshift.io/v2alpha1 >mirror: > operators: > - catalog: registry.redhat.io/redhat/redhat-operator-index:v4.16 > packages: > - name: multiarch-tuning-operator > minVersion: 0.9.0 > maxVersion: 0.9.0 > >``` > >Perform a mirror to disk workflow > >Once completed perform a disk to mirror workflow > > >## Expected Outcome > >No mention of signature config map generation > >``` >2024/09/25 10:49:37 [WARN] : ⚠️ --v2 flag identified, flow redirected to the oc-mirror v2 version. This is Tech Preview, it is still under development and it is not production ready. >2024/09/25 10:49:37 [INFO] : 👋 Hello, welcome to oc-mirror >2024/09/25 10:49:37 [INFO] : ⚙️ setting up the environment for you... >2024/09/25 10:49:37 [INFO] : 🔀 workflow mode: diskToMirror >2024/09/25 10:49:43 [INFO] : 🕵️ going to discover the necessary images... >2024/09/25 10:49:43 [INFO] : 🔍 collecting release images... >2024/09/25 10:49:43 [INFO] : 🔍 collecting operator images... >2024/09/25 10:49:52 [INFO] : 🔍 collecting additional images... >2024/09/25 10:49:52 [INFO] : 🚀 Start copying the images... >2024/09/25 10:49:52 [INFO] : images to copy 4 > ✓ 1/4 : (0s) docker://gcr.io/kubebuilder/kube-rbac-proxy:v0.13.1@sha256:d4883d7c622683b3319b5e6b3a7edfbf2594c18060131a8bf64504805f875522 > ✓ 2/4 : (0s) docker://registry.redhat.io/multiarch-tuning/multiarch-tuning-rhel9-operator@sha256:118500bb10296469335b260ba28fb67785d05b1f9d0aab7dbf1d1b243620ed8f > ✓ 3/4 : (0s) docker://registry.redhat.io/multiarch-tuning/multiarch-tuning-operator-bundle@sha256:b7c0e2ac16ea027d5af85e3ee10556e2f4cb5cbda956e432b63030ba688262cb > ✓ 4/4 : (1s) docker://registry.redhat.io/redhat/redhat-operator-index:v4.16 >2024/09/25 10:49:53 [INFO] : === Results === >2024/09/25 10:49:53 [INFO] : ✅ 4 / 4 operator images mirrored successfully >2024/09/25 10:49:53 [INFO] : 📄 Generating IDMS file... >2024/09/25 10:49:53 [INFO] : ying/working-dir/cluster-resources/idms-oc-mirror.yaml file created >2024/09/25 10:49:53 [INFO] : 📄 Generating ITMS file... >2024/09/25 10:49:53 [INFO] : ying/working-dir/cluster-resources/itms-oc-mirror.yaml file created >2024/09/25 10:49:53 [INFO] : 📄 Generating CatalogSource file... >2024/09/25 10:49:53 [INFO] : ying/working-dir/cluster-resources/cs-redhat-operator-index-v4-16.yaml file created >2024/09/25 10:49:53 [INFO] : mirror time : 16.316465947s >2024/09/25 10:49:53 [INFO] : 👋 Goodbye, thank you for using oc-mirror > >``` 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 2 months 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).
zhouying7780 commented 2 months ago

/label qe-approved

openshift-ci-robot commented 2 months ago

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

3 validation(s) were run on this bug * bug is open, matching expected state (open) * bug target version (4.18.0) matches configured target version for branch (4.18.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/931): >…ecified > ># Description > >This bug fix addresses the issue when there is no platform (releases) specifed in the ImageSetConfig it should not attempt to generate the signature config map files. > >Fixes # OCPBUGS-42416 > >## 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? > >Tested locally > >Use this ImageSetConfig to verify > >``` >kind: ImageSetConfiguration >apiVersion: mirror.openshift.io/v2alpha1 >mirror: > operators: > - catalog: registry.redhat.io/redhat/redhat-operator-index:v4.16 > packages: > - name: multiarch-tuning-operator > minVersion: 0.9.0 > maxVersion: 0.9.0 > >``` > >Perform a mirror to disk workflow > >Once completed perform a disk to mirror workflow > > >## Expected Outcome > >No mention of signature config map generation > >``` >2024/09/25 10:49:37 [WARN] : ⚠️ --v2 flag identified, flow redirected to the oc-mirror v2 version. This is Tech Preview, it is still under development and it is not production ready. >2024/09/25 10:49:37 [INFO] : 👋 Hello, welcome to oc-mirror >2024/09/25 10:49:37 [INFO] : ⚙️ setting up the environment for you... >2024/09/25 10:49:37 [INFO] : 🔀 workflow mode: diskToMirror >2024/09/25 10:49:43 [INFO] : 🕵️ going to discover the necessary images... >2024/09/25 10:49:43 [INFO] : 🔍 collecting release images... >2024/09/25 10:49:43 [INFO] : 🔍 collecting operator images... >2024/09/25 10:49:52 [INFO] : 🔍 collecting additional images... >2024/09/25 10:49:52 [INFO] : 🚀 Start copying the images... >2024/09/25 10:49:52 [INFO] : images to copy 4 > ✓ 1/4 : (0s) docker://gcr.io/kubebuilder/kube-rbac-proxy:v0.13.1@sha256:d4883d7c622683b3319b5e6b3a7edfbf2594c18060131a8bf64504805f875522 > ✓ 2/4 : (0s) docker://registry.redhat.io/multiarch-tuning/multiarch-tuning-rhel9-operator@sha256:118500bb10296469335b260ba28fb67785d05b1f9d0aab7dbf1d1b243620ed8f > ✓ 3/4 : (0s) docker://registry.redhat.io/multiarch-tuning/multiarch-tuning-operator-bundle@sha256:b7c0e2ac16ea027d5af85e3ee10556e2f4cb5cbda956e432b63030ba688262cb > ✓ 4/4 : (1s) docker://registry.redhat.io/redhat/redhat-operator-index:v4.16 >2024/09/25 10:49:53 [INFO] : === Results === >2024/09/25 10:49:53 [INFO] : ✅ 4 / 4 operator images mirrored successfully >2024/09/25 10:49:53 [INFO] : 📄 Generating IDMS file... >2024/09/25 10:49:53 [INFO] : ying/working-dir/cluster-resources/idms-oc-mirror.yaml file created >2024/09/25 10:49:53 [INFO] : 📄 Generating ITMS file... >2024/09/25 10:49:53 [INFO] : ying/working-dir/cluster-resources/itms-oc-mirror.yaml file created >2024/09/25 10:49:53 [INFO] : 📄 Generating CatalogSource file... >2024/09/25 10:49:53 [INFO] : ying/working-dir/cluster-resources/cs-redhat-operator-index-v4-16.yaml file created >2024/09/25 10:49:53 [INFO] : mirror time : 16.316465947s >2024/09/25 10:49:53 [INFO] : 👋 Goodbye, thank you for using oc-mirror > >``` 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.
sherine-k commented 2 months ago

/lgtm

openshift-ci-robot commented 2 months ago

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

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

In response to [this](https://github.com/openshift/oc-mirror/pull/931): >…ecified > ># Description > >This bug fix addresses the issue when there is no platform (releases) specifed in the ImageSetConfig it should not attempt to generate the signature config map files. > >Fixes # OCPBUGS-42416 > >## 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? > >Tested locally > >Use this ImageSetConfig to verify > >``` >kind: ImageSetConfiguration >apiVersion: mirror.openshift.io/v2alpha1 >mirror: > operators: > - catalog: registry.redhat.io/redhat/redhat-operator-index:v4.16 > packages: > - name: multiarch-tuning-operator > minVersion: 0.9.0 > maxVersion: 0.9.0 > >``` > >Perform a mirror to disk workflow > >Once completed perform a disk to mirror workflow > > >## Expected Outcome > >No mention of signature config map generation > >``` >2024/09/25 10:49:37 [WARN] : ⚠️ --v2 flag identified, flow redirected to the oc-mirror v2 version. This is Tech Preview, it is still under development and it is not production ready. >2024/09/25 10:49:37 [INFO] : 👋 Hello, welcome to oc-mirror >2024/09/25 10:49:37 [INFO] : ⚙️ setting up the environment for you... >2024/09/25 10:49:37 [INFO] : 🔀 workflow mode: diskToMirror >2024/09/25 10:49:43 [INFO] : 🕵️ going to discover the necessary images... >2024/09/25 10:49:43 [INFO] : 🔍 collecting release images... >2024/09/25 10:49:43 [INFO] : 🔍 collecting operator images... >2024/09/25 10:49:52 [INFO] : 🔍 collecting additional images... >2024/09/25 10:49:52 [INFO] : 🚀 Start copying the images... >2024/09/25 10:49:52 [INFO] : images to copy 4 > ✓ 1/4 : (0s) docker://gcr.io/kubebuilder/kube-rbac-proxy:v0.13.1@sha256:d4883d7c622683b3319b5e6b3a7edfbf2594c18060131a8bf64504805f875522 > ✓ 2/4 : (0s) docker://registry.redhat.io/multiarch-tuning/multiarch-tuning-rhel9-operator@sha256:118500bb10296469335b260ba28fb67785d05b1f9d0aab7dbf1d1b243620ed8f > ✓ 3/4 : (0s) docker://registry.redhat.io/multiarch-tuning/multiarch-tuning-operator-bundle@sha256:b7c0e2ac16ea027d5af85e3ee10556e2f4cb5cbda956e432b63030ba688262cb > ✓ 4/4 : (1s) docker://registry.redhat.io/redhat/redhat-operator-index:v4.16 >2024/09/25 10:49:53 [INFO] : === Results === >2024/09/25 10:49:53 [INFO] : ✅ 4 / 4 operator images mirrored successfully >2024/09/25 10:49:53 [INFO] : 📄 Generating IDMS file... >2024/09/25 10:49:53 [INFO] : ying/working-dir/cluster-resources/idms-oc-mirror.yaml file created >2024/09/25 10:49:53 [INFO] : 📄 Generating ITMS file... >2024/09/25 10:49:53 [INFO] : ying/working-dir/cluster-resources/itms-oc-mirror.yaml file created >2024/09/25 10:49:53 [INFO] : 📄 Generating CatalogSource file... >2024/09/25 10:49:53 [INFO] : ying/working-dir/cluster-resources/cs-redhat-operator-index-v4-16.yaml file created >2024/09/25 10:49:53 [INFO] : mirror time : 16.316465947s >2024/09/25 10:49:53 [INFO] : 👋 Goodbye, thank you for using oc-mirror > >``` 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 2 months ago

[ART PR BUILD NOTIFIER]

Distgit: oc-mirror-plugin This PR has been included in build oc-mirror-plugin-container-v4.18.0-202409261340.p0.g206b058.assembly.stream.el9. All builds following this will include this PR.