Skip to content

[release-4.22] OCPBUGS-134589: Preserve revealed Secret values across page rerenders - #17443

Open
rhamilto wants to merge 1 commit into
openshift:release-4.22from
rhamilto:OCPBUGS-134589
Open

rhamilto wants to merge 1 commit into
openshift:release-4.22from
rhamilto:OCPBUGS-134589

Conversation

@rhamilto

Copy link
Copy Markdown
Member

Analysis / Root cause:
Recreating the detailsPage wrapper while rendering remounts the Secret details view and resets the reveal toggle. Revealed Secret values can therefore become hidden during page rerenders.

Solution description:
Backport #17436 to release-4.22. Pass SecretDetails directly to navFactory.details to retain component identity. Resolve the secret.tsx import conflict by preserving the release-4.22 imports and removing the unused detailsPage import.

Includes the original regression test for rerenders, resource updates, and explicitly hiding values.

Screenshots / screen recording:

Test setup:
Use an OpenShift 4.22 cluster and a Secret containing data. Open Workloads → Secrets and select the Secret.

Test cases:

  • Reveal values and verify they remain visible across page rerenders and Secret resource updates.
  • Click Hide values and verify that values are masked again.
  • Regression test: frontend/public/components/tests/secret.spec.tsx.
  • git diff --check passed.
  • Local Jest execution could not start: installed dependencies are missing graphql-tag/loader, required by the release-4.22 Jest transform.
  • Local ESLint validation could not run with the installed dependencies (see Additional info).

Browser conformance:

  • Chrome
  • Firefox
  • Safari (or Epiphany on Linux)

Additional info:
Fixes https://redhat.atlassian.net/browse/OCPBUGS-134589

Backport of #17436 (original fix: #17412).

The installed frontend dependencies do not match release-4.22. Automated tests and lint require the release branch dependencies or CI validation. No user-facing strings or public SDK APIs changed.

Reviewers and assignees:
/assign rhamilto

Pass SecretDetails directly to the tab factory to retain its component
identity. Recreating the detailsPage wrapper during rendering remounted
the view and reset the reveal toggle.

Backport openshift#17436 to release-4.22, preserving the release branch imports
when resolving the secret.tsx conflict. Include the original regression
coverage for page rerenders, resource updates, and hiding values.

Fixes https://redhat.atlassian.net/browse/OCPBUGS-134589

(cherry picked from commit c90913e)
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Pipeline controller notification

This PR uses the pipeline controller for second-stage tests. Selection and triggering follow the repository configuration.

Use /test ? to list jobs and /pipeline help for commands.

@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 Oct 28, 2026
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@rhamilto: This pull request references Jira Issue OCPBUGS-134589, which is invalid:

  • expected dependent Jira Issue OCPBUGS-133720 to be in one of the following states: VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA), but it is ON_QA 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:

Analysis / Root cause:
Recreating the detailsPage wrapper while rendering remounts the Secret details view and resets the reveal toggle. Revealed Secret values can therefore become hidden during page rerenders.

Solution description:
Backport #17436 to release-4.22. Pass SecretDetails directly to navFactory.details to retain component identity. Resolve the secret.tsx import conflict by preserving the release-4.22 imports and removing the unused detailsPage import.

Includes the original regression test for rerenders, resource updates, and explicitly hiding values.

Screenshots / screen recording:

Test setup:
Use an OpenShift 4.22 cluster and a Secret containing data. Open Workloads → Secrets and select the Secret.

Test cases:

  • Reveal values and verify they remain visible across page rerenders and Secret resource updates.
  • Click Hide values and verify that values are masked again.
  • Regression test: frontend/public/components/tests/secret.spec.tsx.
  • git diff --check passed.
  • Local Jest execution could not start: installed dependencies are missing graphql-tag/loader, required by the release-4.22 Jest transform.
  • Local ESLint validation could not run with the installed dependencies (see Additional info).

Browser conformance:

  • Chrome
  • Firefox
  • Safari (or Epiphany on Linux)

Additional info:
Fixes https://redhat.atlassian.net/browse/OCPBUGS-134589

Backport of #17436 (original fix: #17412).

The installed frontend dependencies do not match release-4.22. Automated tests and lint require the release branch dependencies or CI validation. No user-facing strings or public SDK APIs changed.

Reviewers and assignees:
/assign rhamilto

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 TheRealJon and sg00dwin October 28, 2026 13:43
@openshift-ci openshift-ci Bot added the component/core Related to console core functionality label Oct 28, 2026
@openshift-ci

openshift-ci Bot commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rhamilto

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 Oct 28, 2026
@rhamilto

Copy link
Copy Markdown
Member Author

/retest

@openshift-ci

openshift-ci Bot commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

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

This branch has not been deployed

No deployments
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. component/core Related to console core functionality jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants