Skip to content

OCPBUGS-84253: improve JSON unmarshalling for secret decoding#5877

Merged
openshift-merge-bot[bot] merged 1 commit intoopenshift:release-4.21from
cheesesashimi:zzlotnik/secret-backporting-4.21
Apr 30, 2026
Merged

OCPBUGS-84253: improve JSON unmarshalling for secret decoding#5877
openshift-merge-bot[bot] merged 1 commit intoopenshift:release-4.21from
cheesesashimi:zzlotnik/secret-backporting-4.21

Conversation

@cheesesashimi
Copy link
Copy Markdown
Member

@cheesesashimi cheesesashimi commented Apr 23, 2026

This is a manual backport of #5813 since the changes could not be applied cleanly.

This tolerates the credHelpers and credsStore fields which should be
ignored and discarded after decoding.

Assisted-By: Claude Sonnet 4.5
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 23, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 2683efe1-69df-4751-b135-ea9da2138517

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 23, 2026
@cheesesashimi
Copy link
Copy Markdown
Member Author

/jira cherrypick OCPBUGS-79425

@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@cheesesashimi: Jira Issue OCPBUGS-79425 has been cloned as Jira Issue OCPBUGS-84253. Will retitle bug to link to clone.

WARNING: Unexpected sprint field type []interface {} on source issue. Please update sprint manually on clone.

/retitle OCPBUGS-84253: improve JSON unmarshalling for secret decoding

Details

In response to this:

/jira cherrypick OCPBUGS-79425

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 changed the title improve JSON unmarshalling for secret decoding OCPBUGS-84253: improve JSON unmarshalling for secret decoding Apr 23, 2026
@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/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Apr 23, 2026
@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@cheesesashimi: This pull request references Jira Issue OCPBUGS-84253, which is invalid:

  • release note text must be set and not match the template OR release note type must be set to "Release Note Not Required". For more information you can reference the OpenShift Bug Process.
  • expected dependent Jira Issue OCPBUGS-79425 to be in one of the following states: VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA), but it is MODIFIED 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.

Details

In response to this:

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.

@cheesesashimi
Copy link
Copy Markdown
Member 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 Apr 23, 2026
@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@cheesesashimi: This pull request references Jira Issue OCPBUGS-84253, which is valid. The bug has been moved to the POST state.

7 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.21.z) matches configured target version for branch (4.21.z)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)
  • release note type set to "Release Note Not Required"
  • dependent bug Jira Issue OCPBUGS-79425 is in the state Verified, which is one of the valid states (VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA))
  • dependent Jira Issue OCPBUGS-79425 targets the "4.22.0" version, which is one of the valid target versions: 4.22.0
  • bug has dependents
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.

@cheesesashimi
Copy link
Copy Markdown
Member Author

/cherrypick release-4.20

@openshift-cherrypick-robot
Copy link
Copy Markdown

@cheesesashimi: once the present PR merges, I will cherry-pick it on top of release-4.20 in a new PR and assign it to you.

Details

In response to this:

/cherrypick release-4.20

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.

Copy link
Copy Markdown
Member

@isabella-janssen isabella-janssen left a comment

Choose a reason for hiding this comment

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

/label backport-risk-assessed
/lgtm

This backport looks good.

@openshift-ci openshift-ci Bot added the backport-risk-assessed Indicates a PR to a release branch has been evaluated and considered safe to accept. label Apr 23, 2026
@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Apr 23, 2026
@openshift-merge-bot
Copy link
Copy Markdown
Contributor

Scheduling tests matching the pipeline_run_if_changed or not excluded by pipeline_skip_if_only_changed parameters:
/test e2e-aws-ovn
/test e2e-aws-ovn-upgrade
/test e2e-gcp-op-part1
/test e2e-gcp-op-part2
/test e2e-gcp-op-single-node
/test e2e-hypershift

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Apr 23, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cheesesashimi, isabella-janssen

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:
  • OWNERS [cheesesashimi,isabella-janssen]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@cheesesashimi
Copy link
Copy Markdown
Member Author

/retest-required

1 similar comment
@cheesesashimi
Copy link
Copy Markdown
Member Author

/retest-required

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Apr 24, 2026

@cheesesashimi: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-gcp-op-ocl 3f77590 link false /test e2e-gcp-op-ocl

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.

@djoshy
Copy link
Copy Markdown
Contributor

djoshy commented Apr 27, 2026

/override ci/prow/e2e-aws-ovn ci/prow/e2e-aws-ovn-upgrade ci/prow/e2e-hypershift

Overriding as these are known issues affecting CI, unrelated to this PR.

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Apr 27, 2026

@djoshy: Overrode contexts on behalf of djoshy: ci/prow/e2e-aws-ovn, ci/prow/e2e-aws-ovn-upgrade, ci/prow/e2e-hypershift

Details

In response to this:

/override ci/prow/e2e-aws-ovn ci/prow/e2e-aws-ovn-upgrade ci/prow/e2e-hypershift

Overriding as these are known issues affecting CI, unrelated to this PR.

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.

Copy link
Copy Markdown
Contributor

@HarshwardhanPatil07 HarshwardhanPatil07 left a comment

Choose a reason for hiding this comment

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

Pre-merge Verification: Passed
Cluster version: 4.21.0-0-2026-04-30-044908-test-ci-ln-0pz1k6k-latest

Executed test case OCP-88709 - Using credHelpers in global pull-secret

MCO handles pull secrets with credsStore/credHelpers correctly: propagates them to nodes, doesn't degrade, and cleanly reverts when removed. No degradation happened in the machine-config ClusterOperator

Steps Performed:

  1. Saved original pull secret to /tmp/pull-secret.json
harshpat@harshpat-thinkpadp1gen4i:~/Downloads$ oc get secret pull-secret -n openshift-config --template="{{index .data \".dockerconfigjson\" | base64decode}}"  > /tmp/pull-secret.json
  1. Modified pull secret
harshpat@harshpat-thinkpadp1gen4i:~/Downloads$ jq '. + {"credsStore": "fake-store", "credHelpers": {"fake.registry.example.com": "fake-helper"}}' /tmp/pull-secret.json > /tmp/pull-secret-credhelpers.json

  1. Applied modified secret
harshpat@harshpat-thinkpadp1gen4i:~/Downloads$ oc set data secret pull-secret -n openshift-config --from-file=.dockerconfigjson=/tmp/pull-secret-credhelpers.json
secret/pull-secret data updated

  1. Verified on worker node
...
  },
  "credsStore": "fake-store",
  "credHelpers": {
    "fake.registry.example.com": "fake-helper"
  }
}
  1. Verified MCO health
harshpat@harshpat-thinkpadp1gen4i:~/Downloads$ oc get co machine-config
NAME             VERSION                                                AVAILABLE   PROGRESSING   DEGRADED   SINCE   MESSAGE
machine-config   4.21.0-0-2026-04-30-044908-test-ci-ln-0pz1k6k-latest   True        False         False      49m  


  1. Restored original pull secret
harshpat@harshpat-thinkpadp1gen4i:~/Downloads$ oc set data secret pull-secret -n openshift-config --from-file=.dockerconfigjson=/tmp/pull-secret.json
secret/pull-secret data updated

  1. Verified on worker node
...
    "quay.io/metal3-io": {
      "auth": "ZHVhbndlaTMzOmRIK3gzaytvcXlyQ1AvNkFIdE5acmsxeW5LcXVCYnpMR3JaNFdsQS9YdkJrZHAzUmFxVUduQ1ovWkxvRVhMRVQK"
    },
    "quay.io/openshift-art": {
      "auth": "b3BlbnNoaWZ0LWFydCtmYmNfZnJhZ21lbnRfcHVzaGVyOkY0VVdNRVFQRjVCNjZGTDJLMEg1NjlaVTZIVVlNSDU5Skw1UlhEREk1OERUVzU1QjNSQjRRMjQ2QzNKVFhLCg=="
    }
  }
}

  1. Verified MCO health
harshpat@harshpat-thinkpadp1gen4i:~/Downloads$ oc get co machine-config
NAME             VERSION                                                AVAILABLE   PROGRESSING   DEGRADED   SINCE   MESSAGE
machine-config   4.21.0-0-2026-04-30-044908-test-ci-ln-0pz1k6k-latest   True        False         False      59m 

Executed these test cases too:

success "[sig-mco] MCO Author:sregidor-NonPreRelease-Longduration-Medium-57595-[OnCLayer] Use empty pull-secret[Disruptive] [Serial]"
SUCCESS! 8m49.637678232s "[sig-mco] MCO ocb Author:sregidor-NonPreRelease-Medium-79172-OCB Inherit from global pull secret if baseImagePullSecret field is not specified [Disruptive] [Serial]"
SUCCESS! 3m57.140869402s "[sig-mco] MCO Author:mhanss-NonPreRelease-Longduration-High-42680-[P2] change pull secret in the openshift-config namespace [Serial]"
success "[sig-mco] MCO ocb Author:sregidor-ConnectedOnly-Longduration-NonPreRelease-High-83137-OCB use OutputImage CurrentImagePullSecret [Disruptive] [Serial]"

@HarshwardhanPatil07
Copy link
Copy Markdown
Contributor

/verified by @HarshwardhanPatil07

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

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

Details

In response to this:

/verified by @HarshwardhanPatil07

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-bot openshift-merge-bot Bot merged commit a2e5802 into openshift:release-4.21 Apr 30, 2026
16 of 17 checks passed
@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@cheesesashimi: Jira Issue Verification Checks: Jira Issue OCPBUGS-84253
✔️ 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-84253 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:

This is a manual backport of #5813 since the changes could not be applied cleanly.

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

@cheesesashimi: #5877 failed to apply on top of branch "release-4.20":

Applying: improve JSON unmarshalling for secret decoding
Using index info to reconstruct a base tree...
M	pkg/secrets/secrets_test.go
Falling back to patching base and 3-way merge...
Auto-merging pkg/secrets/secrets_test.go
CONFLICT (content): Merge conflict in pkg/secrets/secrets_test.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Patch failed at 0001 improve JSON unmarshalling for secret decoding

Details

In response to this:

/cherrypick release-4.20

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.

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. backport-risk-assessed Indicates a PR to a release branch has been evaluated and considered safe to accept. 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. verified Signifies that the PR passed pre-merge verification criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.