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-17714: Ensure errors are nil before closing registry to avoid… #680

Merged
merged 2 commits into from Aug 24, 2023

Conversation

lmzuccarelli
Copy link
Contributor

… panic

This fix ensures errors are nil before trying to close the registry, this will avoid a panic

Fixes # OCPBUGS-17714

Type of change

  • 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

Verified locally with the following registries.config and Image Set Config

  location = "registry.redhat.io"
  insecure = false
  blocked = false
  mirror-by-digest-only = false
  prefix = ""
  [[registry.mirror]]
    location = "localhost:5000"
    insecure = true

Image Set Config

kind: ImageSetConfiguration
mirror:
  operators:
    - catalog: oci://ocpbugs-17714
      packages:
      - name: aws-load-balancer-operator

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. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. labels Aug 24, 2023
@openshift-ci-robot
Copy link

@lmzuccarelli: This pull request references Jira Issue OCPBUGS-17714, 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 New, 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:

… panic

This fix ensures errors are nil before trying to close the registry, this will avoid a panic

Fixes # OCPBUGS-17714

Type of change

  • 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

Verified locally with the following registries.config and Image Set Config

 location = "registry.redhat.io"
 insecure = false
 blocked = false
 mirror-by-digest-only = false
 prefix = ""
 [[registry.mirror]]
   location = "localhost:5000"
   insecure = true

Image Set Config

kind: ImageSetConfiguration
mirror:
 operators:
   - catalog: oci://ocpbugs-17714
     packages:
     - name: aws-load-balancer-operator

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
Copy link

openshift-ci bot commented Aug 24, 2023

[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:

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 24, 2023
@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 Aug 24, 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 Aug 24, 2023
@openshift-ci
Copy link

openshift-ci bot commented Aug 24, 2023

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

@openshift-merge-robot openshift-merge-robot merged commit fcc58be into openshift:main Aug 24, 2023
5 checks passed
@openshift-ci-robot
Copy link

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

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

In response to this:

… panic

This fix ensures errors are nil before trying to close the registry, this will avoid a panic

Fixes # OCPBUGS-17714

Type of change

  • 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

Verified locally with the following registries.config and Image Set Config

 location = "registry.redhat.io"
 insecure = false
 blocked = false
 mirror-by-digest-only = false
 prefix = ""
 [[registry.mirror]]
   location = "localhost:5000"
   insecure = true

Image Set Config

kind: ImageSetConfiguration
mirror:
 operators:
   - catalog: oci://ocpbugs-17714
     packages:
     - name: aws-load-balancer-operator

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.

sherine-k pushed a commit to sherine-k/oc-mirror that referenced this pull request Aug 25, 2023
openshift#680)

* OCPBUGS-17714: Ensure errors are nil before closing registry to avoid panic

* Remove finalError check
openshift-merge-robot pushed a commit that referenced this pull request Aug 29, 2023
* Fix OCPBUGS-14402 - case where catalog is on a mirror from registries.conf (#682)

* OCPBUGS-17714: Ensure errors are nil before closing registry to avoid… (#680)

* OCPBUGS-17714: Ensure errors are nil before closing registry to avoid panic

* Remove finalError check

---------

Co-authored-by: Luigi Mario Zuccarelli <luzuccar@redhat.com>
@lmzuccarelli lmzuccarelli deleted the OCPBUGS-17714 branch January 4, 2024 14:31
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. 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.

None yet

5 participants