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

added useGroup websocket #2830

Merged
merged 1 commit into from
May 28, 2024

Conversation

pnaik1
Copy link
Contributor

@pnaik1 pnaik1 commented May 21, 2024

Closes: https://issues.redhat.com/browse/RHOAIENG-5366

Description

Replaces groups.ts#listGroups with useGroups hook which is a wrapper on top of the dynamic-plugin-sdk useK8sWatchResource hook.

How Has This Been Tested?

Be a clusteradmin

  1. Go to the permission tab in the Data science project
  2. Check for the websocket message for the groups in the network inspector
  3. Click on add groups and check for the dropdown with group list present

As a adminuser , the dropdown is not visible

Test Impact

Unit test

Request review criteria:

Self checklist (all need to be checked):

  • The developer has manually tested the changes and verified that the changes work
  • Commits have been squashed into descriptive, self-contained units of work (e.g. 'WIP' and 'Implements feedback' style messages have been removed)
  • 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)

If you have UI changes:

  • Included any necessary screenshots or gifs if it was a UI change.
  • Included tags to the UX team if it was a UI/UX change (find relevant UX in the SMEs section).

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

Copy link

codecov bot commented May 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.52%. Comparing base (f957299) to head (7d58b63).
Report is 12 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2830      +/-   ##
==========================================
+ Coverage   77.42%   77.52%   +0.09%     
==========================================
  Files        1102     1109       +7     
  Lines       23203    23395     +192     
  Branches     5854     5890      +36     
==========================================
+ Hits        17965    18136     +171     
- Misses       5238     5259      +21     
Files Coverage Δ
frontend/src/api/k8s/groups.ts 100.00% <100.00%> (ø)
...ntend/src/pages/projects/ProjectDetailsContext.tsx 89.06% <100.00%> (-0.34%) ⬇️
...c/pages/projects/projectSharing/ProjectSharing.tsx 90.00% <100.00%> (ø)
frontend/src/utilities/const.ts 89.65% <100.00%> (+0.36%) ⬆️

... and 41 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 f957299...7d58b63. Read the comment docs.

Copy link
Contributor

@manaswinidas manaswinidas left a comment

Choose a reason for hiding this comment

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

Works fine for me. Can you update the PR description to test useGroups on the UI side? also change the test impact.

frontend/src/api/k8s/groups.ts Outdated Show resolved Hide resolved
frontend/src/api/k8s/groups.ts Outdated Show resolved Hide resolved
frontend/src/api/k8s/groups.ts Outdated Show resolved Hide resolved
@pnaik1
Copy link
Contributor Author

pnaik1 commented May 28, 2024

Updated the PR accordingly

Copy link
Contributor

@manaswinidas manaswinidas left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci bot added the lgtm label May 28, 2024
frontend/src/api/k8s/__tests__/groups.spec.ts Outdated Show resolved Hide resolved
frontend/src/api/k8s/__tests__/groups.spec.ts Show resolved Hide resolved
frontend/src/api/k8s/__tests__/groups.spec.ts Show resolved Hide resolved
frontend/src/api/k8s/groups.ts Outdated Show resolved Hide resolved
frontend/src/api/k8s/groups.ts Outdated Show resolved Hide resolved
@christianvogt
Copy link
Contributor

Tested opening the group dropdown and adding a new group using OpenShift Console in another window and observing the list being updated immediately.

/lgtm
/approve

Copy link
Contributor

openshift-ci bot commented May 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 20247a6 into opendatahub-io:main May 28, 2024
8 checks passed
@pnaik1 pnaik1 deleted the useGroup-websocket branch July 22, 2024 14:22
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.

3 participants