Skip to content

OCPBUGS-70265: Fix errors.As usage for NoDataInSecretError#444

Merged
openshift-merge-bot[bot] merged 1 commit intoopenshift:mainfrom
elfosardo:fix-errors-usage-422
Jan 7, 2026
Merged

OCPBUGS-70265: Fix errors.As usage for NoDataInSecretError#444
openshift-merge-bot[bot] merged 1 commit intoopenshift:mainfrom
elfosardo:fix-errors-usage-422

Conversation

@elfosardo
Copy link
Copy Markdown

The errors.As calls were using new(*NoDataInSecretError) which creates a **NoDataInSecretError, but the error is a value type. This prevented the error from being matched, causing PreprovisioningNetworkData to return an error instead of empty data when the networkData key is missing from a secret.

(cherry picked from commit 4c5261b)

The errors.As calls were using new(*NoDataInSecretError) which creates
a **NoDataInSecretError, but the error is a value type. This prevented
the error from being matched, causing PreprovisioningNetworkData to
return an error instead of empty data when the networkData key is
missing from a secret.

Signed-off-by: Riccardo Pittau <elfosardo@gmail.com>
(cherry picked from commit 4c5261b)
@openshift-ci-robot openshift-ci-robot added jira/severity-critical Referenced Jira bug's severity is critical for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. labels Dec 30, 2025
@openshift-ci-robot
Copy link
Copy Markdown

@elfosardo: This pull request references Jira Issue OCPBUGS-70265, which is invalid:

  • expected the bug to target the "4.22.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.

Details

In response to this:

The errors.As calls were using new(*NoDataInSecretError) which creates a **NoDataInSecretError, but the error is a value type. This prevented the error from being matched, causing PreprovisioningNetworkData to return an error instead of empty data when the networkData key is missing from a secret.

(cherry picked from commit 4c5261b)

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 openshift-ci-robot added the jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. label Dec 30, 2025
@elfosardo
Copy link
Copy Markdown
Author

/hold

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

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

Requesting review from QA contact:
/cc @jadhaj

Details

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 review from hroyrh, jadhaj and zaneb December 30, 2025 09:14
@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented Dec 30, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: elfosardo

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details 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 Dec 30, 2025
@jadhaj
Copy link
Copy Markdown

jadhaj commented Dec 30, 2025

/verified by @jadhaj

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Dec 30, 2025
@openshift-ci-robot
Copy link
Copy Markdown

@jadhaj: This PR has been marked as verified by @jadhaj.

Details

In response to this:

/verified by @jadhaj

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.

@elfosardo
Copy link
Copy Markdown
Author

this works, waiting for the upstream change to merge metal3-io#2890

@dtantsur
Copy link
Copy Markdown
Member

dtantsur commented Jan 5, 2026

/lgtm
/test okd-scos-images

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jan 5, 2026
@elfosardo
Copy link
Copy Markdown
Author

/unhold
/override ci/prow/okd-scos-images

@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 Jan 7, 2026
@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented Jan 7, 2026

@elfosardo: Overrode contexts on behalf of elfosardo: ci/prow/okd-scos-images

Details

In response to this:

/unhold
/override ci/prow/okd-scos-images

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.

@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented Jan 7, 2026

@elfosardo: all tests passed!

Full PR test history. Your PR dashboard.

Details

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 118ad31 into openshift:main Jan 7, 2026
9 checks passed
@openshift-ci-robot
Copy link
Copy Markdown

@elfosardo: Jira Issue Verification Checks: Jira Issue OCPBUGS-70265
✔️ This pull request was pre-merge verified.
✔️ All associated pull requests have merged.
✔️ All associated, merged pull requests were pre-merge verified.

Jira Issue OCPBUGS-70265 has been moved to the MODIFIED state and will move to the VERIFIED state when the change is available in an accepted nightly payload. 🕓

Details

In response to this:

The errors.As calls were using new(*NoDataInSecretError) which creates a **NoDataInSecretError, but the error is a value type. This prevented the error from being matched, causing PreprovisioningNetworkData to return an error instead of empty data when the networkData key is missing from a secret.

(cherry picked from commit 4c5261b)

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-merge-robot
Copy link
Copy Markdown

Fix included in accepted release 4.22.0-0.nightly-2026-01-14-031657

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-critical Referenced Jira bug's severity is critical 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. verified Signifies that the PR passed pre-merge verification criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants