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

RHOAIENG-14811 The userdID was not correctly transferred to the frontend #3387

Merged
merged 1 commit into from
Oct 28, 2024

Conversation

pilhuhn
Copy link
Contributor

@pilhuhn pilhuhn commented Oct 25, 2024

Closes https://issues.redhat.com/browse/RHOAIENG-14811
We now get the userID from the status api endpoint if set.
This builds on RHOAIENG-9480/PR #3107.
This closes the first try in #3362

Description

The previous code did not correctly pass the userID from the backend around in the frontend.
The backend already has it correctly on a 2.14 cluster and provides it via /api/status call.

How Has This Been Tested?

Manual test in dev-mode running npm run start:dev:ext against an instance on Dev-Sandbox and a non-Sandbox one.

Then looking at the console output for the the Identify event

Identify event triggered: {... "userID":"b09067a69...99"}

If the userID looks like this (whith chars) it is an anonymous one. If it is numeric (may be negative) and short (probably < 8 digits), then it is a web-user-id.

Request review criteria:

Self checklist (all need to be checked):

  • The developer has manually tested the changes and verified that the changes work
  • Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).
  • The developer has added tests or explained why testing cannot be added (unit or cypress tests for related changes)

After the PR is posted & before it merges:

  • The developer has tested their solution on a cluster by using the image produced by the PR to main

cc @andrewballantyne

Copy link

codecov bot commented Oct 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.04%. Comparing base (d9788f8) to head (5b5924c).
Report is 13 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3387      +/-   ##
==========================================
- Coverage   85.08%   85.04%   -0.05%     
==========================================
  Files        1329     1329              
  Lines       29931    29929       -2     
  Branches     8200     8201       +1     
==========================================
- Hits        25466    25452      -14     
- Misses       4465     4477      +12     
Files with missing lines Coverage Δ
...c/concepts/analyticsTracking/useSegmentTracking.ts 64.28% <100.00%> (-2.39%) ⬇️
...end/src/concepts/analyticsTracking/useTrackUser.ts 70.58% <100.00%> (-29.42%) ⬇️
frontend/src/redux/actions/actions.ts 66.66% <ø> (ø)
frontend/src/redux/reducers/appReducer.ts 44.73% <ø> (ø)
frontend/src/redux/selectors/user.ts 100.00% <100.00%> (ø)
frontend/src/redux/types.ts 100.00% <ø> (ø)

... and 3 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d9788f8...5b5924c. Read the comment docs.

@christianvogt
Copy link
Contributor

/lgtm
/approve

tested against my dev sandbox instance and another odh cluster instance. Sandbox cluster included my numeric user ID.

Copy link
Contributor

openshift-ci bot commented Oct 28, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: christianvogt

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-merge-bot openshift-merge-bot bot merged commit 62268db into opendatahub-io:main Oct 28, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants