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-52258: pkg/cvo/updatepayload: Context around ValidateDirectory calls #1166

Merged

Conversation

wking
Copy link
Member

@wking wking commented Mar 3, 2025

These usually either succeed or give os.IsNotExist, but in some cases can return errors like:

Unable to download and prepare the update: stat /etc/cvo/updatepayloads/7WNaprXJNWTsPAepCHJ00Q/release-manifests/release-metadata: permission denied.

To make it easier to debug those situations, this commit adds context to errors near ValidateDirectory calls, so it's more clear that the issue is the CVO's attempts to read /etc/cvo/... failing, and not an error with the version-... Pod, registry access, etc.

Also while I'm in this space, I've replaced the old errors.Wrap in ImageForShortName with fmt.Errorf(...%w, ...), now that the Go standard libraries support error-wrapping like that. One fewer 3rd-party dependency call-site.

These usually either succeed or give os.IsNotExist, but in some cases
can return errors like [1]:

  Unable to download and prepare the update: stat /etc/cvo/updatepayloads/7WNaprXJNWTsPAepCHJ00Q/release-manifests/release-metadata: permission denied.

To make it easier to debug those situations, this commit adds context
to errors near ValidateDirectory calls, so it's more clear that the
issue is the CVO's attempts to read /etc/cvo/... failing, and not an
error with the version-... Pod, registry access, etc.

Also while I'm in this space, I've replaced the old errors.Wrap in
ImageForShortName with fmt.Errorf(...%w, ...), now that the Go
standard libraries support error-wrapping like that.  One fewer
3rd-party dependency call-site.

[1]: https://issues.redhat.com/browse/OCPBUGS-52258
@openshift-ci-robot openshift-ci-robot added jira/severity-moderate Referenced Jira bug's severity is moderate for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Mar 3, 2025
@openshift-ci-robot
Copy link
Contributor

@wking: This pull request references Jira Issue OCPBUGS-52258, which is invalid:

  • expected the bug to target the "4.19.0" version, but no target version was set

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:

These usually either succeed or give os.IsNotExist, but in some cases can return errors like:

Unable to download and prepare the update: stat /etc/cvo/updatepayloads/7WNaprXJNWTsPAepCHJ00Q/release-manifests/release-metadata: permission denied.

To make it easier to debug those situations, this commit adds context to errors near ValidateDirectory calls, so it's more clear that the issue is the CVO's attempts to read /etc/cvo/... failing, and not an error with the version-... Pod, registry access, etc.

Also while I'm in this space, I've replaced the old errors.Wrap in ImageForShortName with fmt.Errorf(...%w, ...), now that the Go standard libraries support error-wrapping like that. One fewer 3rd-party dependency call-site.

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci bot requested review from DavidHurta and petr-muller March 3, 2025 23:23
@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 3, 2025
@wking
Copy link
Member Author

wking commented Mar 3, 2025

/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. and removed jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Mar 3, 2025
@openshift-ci-robot
Copy link
Contributor

@wking: This pull request references Jira Issue OCPBUGS-52258, 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.19.0) matches configured target version for branch (4.19.0)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @jiajliu

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci bot requested a review from jiajliu March 3, 2025 23:25
@jiajliu
Copy link

jiajliu commented Mar 4, 2025

cc @JianLi-RH

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Mar 4, 2025
Copy link
Contributor

openshift-ci bot commented Mar 4, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: petr-muller, wking

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

@JianLi-RH
Copy link

/label qe-approved

@openshift-ci openshift-ci bot added the qe-approved Signifies that QE has signed off on this PR label Mar 7, 2025
@openshift-ci-robot
Copy link
Contributor

@wking: This pull request references Jira Issue OCPBUGS-52258, which is valid.

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

No GitHub users were found matching the public email listed for the QA contact in Jira ([email protected]), skipping review request.

In response to this:

These usually either succeed or give os.IsNotExist, but in some cases can return errors like:

Unable to download and prepare the update: stat /etc/cvo/updatepayloads/7WNaprXJNWTsPAepCHJ00Q/release-manifests/release-metadata: permission denied.

To make it easier to debug those situations, this commit adds context to errors near ValidateDirectory calls, so it's more clear that the issue is the CVO's attempts to read /etc/cvo/... failing, and not an error with the version-... Pod, registry access, etc.

Also while I'm in this space, I've replaced the old errors.Wrap in ImageForShortName with fmt.Errorf(...%w, ...), now that the Go standard libraries support error-wrapping like that. One fewer 3rd-party dependency call-site.

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD ff3778c and 2 for PR HEAD b4119c2 in total

1 similar comment
@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD ff3778c and 2 for PR HEAD b4119c2 in total

@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD 6ca3650 and 1 for PR HEAD b4119c2 in total

@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD 6ca3650 and 2 for PR HEAD b4119c2 in total

Copy link
Contributor

openshift-ci bot commented Mar 8, 2025

@wking: 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-sigs/prow repository. I understand the commands that are listed here.

@openshift-merge-bot openshift-merge-bot bot merged commit 431ea6c into openshift:main Mar 8, 2025
14 checks passed
@openshift-ci-robot
Copy link
Contributor

@wking: Jira Issue OCPBUGS-52258: All pull requests linked via external trackers have merged:

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

In response to this:

These usually either succeed or give os.IsNotExist, but in some cases can return errors like:

Unable to download and prepare the update: stat /etc/cvo/updatepayloads/7WNaprXJNWTsPAepCHJ00Q/release-manifests/release-metadata: permission denied.

To make it easier to debug those situations, this commit adds context to errors near ValidateDirectory calls, so it's more clear that the issue is the CVO's attempts to read /etc/cvo/... failing, and not an error with the version-... Pod, registry access, etc.

Also while I'm in this space, I've replaced the old errors.Wrap in ImageForShortName with fmt.Errorf(...%w, ...), now that the Go standard libraries support error-wrapping like that. One fewer 3rd-party dependency call-site.

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 openshift-eng/jira-lifecycle-plugin repository.

@wking wking deleted the ValidateDirectory-context branch March 8, 2025 03:46
@openshift-bot
Copy link
Contributor

[ART PR BUILD NOTIFIER]

Distgit: cluster-version-operator
This PR has been included in build cluster-version-operator-container-v4.19.0-202503080439.p0.g431ea6c.assembly.stream.el9.
All builds following this will include this PR.

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-moderate Referenced Jira bug's severity is moderate 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.

6 participants