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

OCPBUGS-11371: fix: skips bundles with 'skips' field on head bundle #608

Merged
merged 4 commits into from
Apr 21, 2023

Conversation

aguidirh
Copy link
Contributor

@aguidirh aguidirh commented Apr 18, 2023

Description

When adding dependencies, the bundles in skips field of the head should not be considered as a valid bundles since they are not part of the upgradeGraph.

Fixes OCPBUGS-11371

Type of change

Please delete options that are not relevant.

  • 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?

ImageSetConfig

apiVersion: mirror.openshift.io/v1alpha2
kind: ImageSetConfiguration
mirror:
  operators:
    - catalog: registry.redhat.io/redhat/redhat-operator-index:v4.12

command:

./bin/oc-mirror -c /home/aguidi/go/src/github.com/aguidirh/oc-mirror/ocpbugs-11371.yaml --continue-on-error file://ocpbugs11371

Test Configuration:

  • Firmware version:
  • Hardware:
  • Toolchain:
  • SDK:

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@openshift-ci-robot openshift-ci-robot added jira/severity-important Referenced Jira bug's severity is important for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. labels Apr 18, 2023
@openshift-ci-robot
Copy link

@aguidirh: This pull request references Jira Issue OCPBUGS-11371, which is invalid:

  • expected the bug to target the "4.14.0" version, but it targets "4.13.0" instead

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:

Description

When adding dependencies the bundles in skips, replaces or skipRange fields should not be considered as a valid bundle.

Fixes OCPBUGS-11371

Type of change

Please delete options that are not relevant.

  • 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?

ImageSetConfig

apiVersion: mirror.openshift.io/v1alpha2
kind: ImageSetConfiguration
mirror:
 operators:
   - catalog: registry.redhat.io/redhat/redhat-operator-index:v4.12

command:

./bin/oc-mirror -c /home/aguidi/go/src/github.com/aguidirh/oc-mirror/ocpbugs-11371.yaml --continue-on-error file://ocpbugs11371

Test Configuration:

  • Firmware version:
  • Hardware:
  • Toolchain:
  • SDK:

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

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 jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. label Apr 18, 2023
@aguidirh aguidirh changed the title OCPBUGS-11371: fix: skips bundles with 'skips' or 'skipRange' or 'replace' field OCPBUGS-11371: fix: skips bundles with 'skips' field Apr 20, 2023
@openshift-ci-robot
Copy link

@aguidirh: This pull request references Jira Issue OCPBUGS-11371, which is invalid:

  • expected the bug to target the "4.14.0" version, but it targets "4.13.0" instead

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:

Description

When adding dependencies, the bundles in skips field of the head should not be considered as a valid bundles since they are not part of the upgradeGraph.

Fixes OCPBUGS-11371

Type of change

Please delete options that are not relevant.

  • 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?

ImageSetConfig

apiVersion: mirror.openshift.io/v1alpha2
kind: ImageSetConfiguration
mirror:
 operators:
   - catalog: registry.redhat.io/redhat/redhat-operator-index:v4.12

command:

./bin/oc-mirror -c /home/aguidi/go/src/github.com/aguidirh/oc-mirror/ocpbugs-11371.yaml --continue-on-error file://ocpbugs11371

Test Configuration:

  • Firmware version:
  • Hardware:
  • Toolchain:
  • SDK:

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

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.

@aguidirh
Copy link
Contributor Author

/jira refresh

@openshift-ci-robot openshift-ci-robot added jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. and removed jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Apr 20, 2023
@openshift-ci-robot
Copy link

@aguidirh: This pull request references Jira Issue OCPBUGS-11371, 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.14.0) matches configured target version for branch (4.14.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:

/jira refresh

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.

@aguidirh aguidirh changed the title OCPBUGS-11371: fix: skips bundles with 'skips' field OCPBUGS-11371: fix: skips bundles with 'skips' field on head bundle Apr 20, 2023
Copy link
Contributor

@lmzuccarelli lmzuccarelli left a comment

Choose a reason for hiding this comment

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

@aguidirh - the implementation looks nice and simple.

Good work on the various test scenarios - comprehensive !!!

@lmzuccarelli
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Apr 20, 2023
Copy link
Member

@dinhxuanvu dinhxuanvu left a comment

Choose a reason for hiding this comment

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

Overall, looks fine to me. Just some small nits. As we discussed offline, I would like to ask you to run some tests locally to ensure oc-mirror is still generating a proper and functional FBC with this change (compared to without this fix).

pkg/operator/diff/internal/diff.go Outdated Show resolved Hide resolved
pkg/operator/diff/internal/diff.go Show resolved Hide resolved
@aguidirh
Copy link
Contributor Author

/assign @dinhxuanvu

@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Apr 20, 2023
@openshift-ci
Copy link

openshift-ci bot commented Apr 20, 2023

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

Copy link
Member

@dinhxuanvu dinhxuanvu left a comment

Choose a reason for hiding this comment

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

/approve
/hold
Hold until Alex can do some local testing to ensure this change doesn't inadvertently break other operators.

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 20, 2023
@openshift-ci
Copy link

openshift-ci bot commented Apr 20, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: aguidirh, dinhxuanvu

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 Apr 20, 2023
@zhouying7780
Copy link

pre merge test done , can't hit the block now.

@zhouying7780
Copy link

/label qe-approved

@openshift-ci openshift-ci bot added the qe-approved Signifies that QE has signed off on this PR label Apr 20, 2023
@sherine-k
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Apr 21, 2023
@aguidirh
Copy link
Contributor Author

/unhold

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 21, 2023
@openshift-ci openshift-ci bot merged commit c745860 into openshift:main Apr 21, 2023
@openshift-ci-robot
Copy link

@aguidirh: Jira Issue OCPBUGS-11371: All pull requests linked via external trackers have merged:

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

In response to this:

Description

When adding dependencies, the bundles in skips field of the head should not be considered as a valid bundles since they are not part of the upgradeGraph.

Fixes OCPBUGS-11371

Type of change

Please delete options that are not relevant.

  • 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?

ImageSetConfig

apiVersion: mirror.openshift.io/v1alpha2
kind: ImageSetConfiguration
mirror:
 operators:
   - catalog: registry.redhat.io/redhat/redhat-operator-index:v4.12

command:

./bin/oc-mirror -c /home/aguidi/go/src/github.com/aguidirh/oc-mirror/ocpbugs-11371.yaml --continue-on-error file://ocpbugs11371

Test Configuration:

  • Firmware version:
  • Hardware:
  • Toolchain:
  • SDK:

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

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.

@aguidirh
Copy link
Contributor Author

/cherrypick release-4.13

@openshift-cherrypick-robot

@aguidirh: new pull request created: #617

In response to this:

/cherrypick release-4.13

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.

@aguidirh
Copy link
Contributor Author

/cherrypick release-4.12

@openshift-cherrypick-robot

@aguidirh: new pull request created: #618

In response to this:

/cherrypick release-4.12

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.

@indor79
Copy link

indor79 commented May 3, 2023

Will this also be cherrypicked to 4.11 ?

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. jira/severity-important Referenced Jira bug's severity is important for the branch this PR is targeting. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. qe-approved Signifies that QE has signed off on this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants