Skip to content

Conversation

@Leo6Leo
Copy link
Contributor

@Leo6Leo Leo6Leo commented Nov 19, 2025

This is a manual backport for #15522

…s the display name (openshift#15522)

* fix: Update CoreState type to include userResource for k8s API integration

* feat: Add userResource management to core actions and reducer

* feat: Introduce useUser hook for centralized user data management

* refactor: Replace direct user data fetching with centralized useUser hook in telemetry and masthead components

* test: auto generated the unit tests for useUser hook to validate user data retrieval and dispatch behavior

* feat: Enhance useUser hook to provide robust display name handling with fallbacks and add corresponding unit tests

* fix: apply the review feedback

* Apply suggestions from code review

Co-authored-by: logonoff <[email protected]>

* feat: run i18n

* feat: Add UserKind type import

* Apply suggestions from code review

Co-authored-by: logonoff <[email protected]>

* Update frontend/public/locales/en/public.json

Co-authored-by: logonoff <[email protected]>

* Update frontend/packages/console-dynamic-plugin-sdk/src/app/core/actions/core.ts

Co-authored-by: logonoff <[email protected]>

* feat: Import UserKind type in core actions

* refactor: Update GetUserResource type to use UserKind for improved type safety

* test: Update useUser.spec.ts to mock setUserResource and correct displayName expectation

* test: fixing the failing CI issue

---------

Co-authored-by: logonoff <[email protected]>
@openshift-ci-robot openshift-ci-robot added the jira/severity-moderate Referenced Jira bug's severity is moderate for the branch this PR is targeting. label Nov 19, 2025
@coderabbitai
Copy link

coderabbitai bot commented Nov 19, 2025

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.

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

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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

@openshift-ci-robot openshift-ci-robot added 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 Nov 19, 2025
@openshift-ci-robot
Copy link
Contributor

@Leo6Leo: This pull request references Jira Issue OCPBUGS-65793, 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.

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:

This is a manual backport for #15522

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 kyoto and vikram-raj November 19, 2025 17:30
@openshift-ci openshift-ci bot added component/core Related to console core functionality component/sdk Related to console-plugin-sdk component/shared Related to console-shared component/topology Related to topology kind/i18n Indicates issue or PR relates to internationalization or has content that needs to be translated labels Nov 19, 2025
@Leo6Leo Leo6Leo changed the title OCPBUGS-65793: OpenShift Console can only show user name instead of full name as the display name [release-4.20] OCPBUGS-65793: OpenShift Console can only show user name instead of full name as the display name Nov 19, 2025
@Leo6Leo
Copy link
Contributor Author

Leo6Leo commented Nov 19, 2025

/jira refresh

@openshift-ci-robot
Copy link
Contributor

@Leo6Leo: This pull request references Jira Issue OCPBUGS-65793, 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.

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:

/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.

@Leo6Leo
Copy link
Contributor Author

Leo6Leo commented Nov 19, 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 Nov 19, 2025
@openshift-ci-robot
Copy link
Contributor

@Leo6Leo: This pull request references Jira Issue OCPBUGS-65793, 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.20.z) matches configured target version for branch (4.20.z)
  • bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, POST)
  • release note text is set and does not match the template
  • dependent bug Jira Issue OCPBUGS-56892 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-56892 targets the "4.21.0" version, which is one of the valid target versions: 4.21.0
  • bug has dependents

Requesting review from QA contact:
/cc @yanpzhan

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 yanpzhan November 19, 2025 18:55
@yanpzhan
Copy link
Contributor

Checked on cluster launched against the pr, login with openid connect idp user, the full name is shown as expected.
/verified by @yanpzhan

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Nov 21, 2025
@openshift-ci-robot
Copy link
Contributor

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

In response to this:

Checked on cluster launched against the pr, login with openid connect idp user, the full name is shown as expected.
/verified by @yanpzhan

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 removed the verified Signifies that the PR passed pre-merge verification criteria label Nov 24, 2025
@Leo6Leo
Copy link
Contributor Author

Leo6Leo commented Nov 24, 2025

Fixing the failing test, no core code is modified, therefore retag the verified label.
/verified by @yanpzhan

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Nov 24, 2025
@openshift-ci-robot
Copy link
Contributor

@Leo6Leo: This PR has been marked as verified by @yanpzhan.

In response to this:

Fixing the failing test, no core code is modified, therefore retag the verified label.
/verified by @yanpzhan

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.

@Leo6Leo
Copy link
Contributor Author

Leo6Leo commented Nov 25, 2025

Getting the labels:
/assign @rhamilto @logonoff @krishagarwal278

@krishagarwal278
Copy link
Member

/lgtm

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

openshift-ci bot commented Nov 25, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: krishagarwal278, Leo6Leo, logonoff

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 Nov 25, 2025
@Leo6Leo
Copy link
Contributor Author

Leo6Leo commented Nov 26, 2025

/label backport-risk-assessed
/cherry-pick release-4.19

@openshift-cherrypick-robot

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

In response to this:

/label backport-risk-assessed
/cherry-pick release-4.19

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 openshift-ci bot added the backport-risk-assessed Indicates a PR to a release branch has been evaluated and considered safe to accept. label Nov 26, 2025
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 26, 2025

@Leo6Leo: 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 883425d into openshift:release-4.20 Nov 26, 2025
8 checks passed
@openshift-ci-robot
Copy link
Contributor

@Leo6Leo: Jira Issue Verification Checks: Jira Issue OCPBUGS-65793
✔️ 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-65793 has been moved to the MODIFIED state and will move to the VERIFIED state when the change is available in an accepted nightly payload. 🕓

In response to this:

This is a manual backport for #15522

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

@Leo6Leo: #15743 failed to apply on top of branch "release-4.19":

Applying: OCPBUGS-56892: Console can only show user name instead of full name as the display name (#15522)
Using index info to reconstruct a base tree...
M	frontend/packages/console-shared/src/hooks/__tests__/useTelemetry.spec.ts
M	frontend/packages/console-shared/src/hooks/useTelemetry.ts
M	frontend/packages/topology/src/components/export-app/__tests__/ExportApplicationModal.spec.tsx
M	frontend/public/components/masthead-toolbar.jsx
M	frontend/public/locales/en/public.json
Falling back to patching base and 3-way merge...
Auto-merging frontend/public/locales/en/public.json
CONFLICT (content): Merge conflict in frontend/public/locales/en/public.json
Auto-merging frontend/public/components/masthead-toolbar.jsx
CONFLICT (content): Merge conflict in frontend/public/components/masthead-toolbar.jsx
Auto-merging frontend/packages/topology/src/components/export-app/__tests__/ExportApplicationModal.spec.tsx
CONFLICT (content): Merge conflict in frontend/packages/topology/src/components/export-app/__tests__/ExportApplicationModal.spec.tsx
Auto-merging frontend/packages/console-shared/src/hooks/useTelemetry.ts
CONFLICT (content): Merge conflict in frontend/packages/console-shared/src/hooks/useTelemetry.ts
Auto-merging frontend/packages/console-shared/src/hooks/__tests__/useTelemetry.spec.ts
CONFLICT (content): Merge conflict in frontend/packages/console-shared/src/hooks/__tests__/useTelemetry.spec.ts
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 advice.mergeConflict false"
Patch failed at 0001 OCPBUGS-56892: Console can only show user name instead of full name as the display name (#15522)

In response to this:

/label backport-risk-assessed
/cherry-pick release-4.19

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

Fix included in accepted release 4.20.0-0.nightly-2025-11-27-212931

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. component/core Related to console core functionality component/sdk Related to console-plugin-sdk component/shared Related to console-shared component/topology Related to topology 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. kind/i18n Indicates issue or PR relates to internationalization or has content that needs to be translated 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.

10 participants