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

Update routing flow for creating accelerator/hardware profile on custom notebook image table #3688

Merged

Conversation

DaoDaoNoCode
Copy link
Member

@DaoDaoNoCode DaoDaoNoCode commented Jan 28, 2025

JIRA: RHOAIENG-1458

Description

Create separate routes for creating accelerator profile and hardware profile on the notebook image table. In that case, when creating it, the navigation could be more reasonable and clear.

Take hardware profile as an example, click on "Create profile" on any row
Screenshot 2025-01-27 at 7 59 34 PM

Now the creation page still sits under the notebook image settings context - You can check the breadcrumb and the side nav highlight
Screenshot 2025-01-27 at 8 00 13 PM

Click on "Cancel", it will take you back to the notebook settings table
When successfully creating, it will take you back to the notebook image table and show a notification with a link
Screenshot 2025-01-27 at 8 02 22 PM

Clicking on the link, it will take you to the edit page of that hardware profile
Screenshot 2025-01-27 at 8 03 16 PM

It's the same flow for accelerator profile if the hardware profile is disabled

How Has This Been Tested?

  1. Disable hardware profile
  2. Create a notebook image
  3. Add accelerator identifier for that image
  4. Click on "Create profile" button on that image row
  5. Test the navigation, check whether it's still under notebook image context
  6. Try to cancel to see if it returns back to the notebook image table
  7. Try to create a profile to see if it returns back to the notebook image table and show a notification
  8. Click on the link on the notification to see if it navigates to the edit accelerator profile page
  9. Enable hardware profile and repeat step 4-8 and verify

Test Impact

N/A, there are currently no test cases for this row, not sure if it's worth the effort for the accelerator profile, we can do that later for the hardware profile.

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)

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.

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 Jan 28, 2025

Codecov Report

Attention: Patch coverage is 92.59259% with 2 lines in your changes missing coverage. Please review.

Project coverage is 84.16%. Comparing base (bc58475) to head (2af4c7e).
Report is 14 commits behind head on main.

Files with missing lines Patch % Lines
.../screens/manage/ManageAcceleratorProfileFooter.tsx 87.50% 1 Missing ⚠️
...areProfiles/manage/ManageHardwareProfileFooter.tsx 88.88% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3688      +/-   ##
==========================================
- Coverage   84.16%   84.16%   -0.01%     
==========================================
  Files        1453     1454       +1     
  Lines       33865    33883      +18     
  Branches     9384     9390       +6     
==========================================
+ Hits        28503    28516      +13     
- Misses       5362     5367       +5     
Files with missing lines Coverage Δ
frontend/src/app/AppRoutes.tsx 94.33% <100.00%> (ø)
...end/src/pages/BYONImages/BYONImageAccelerators.tsx 13.04% <ø> (ø)
...src/pages/BYONImages/BYONImageHardwareProfiles.tsx 73.68% <ø> (ø)
frontend/src/pages/BYONImages/BYONImageRoutes.tsx 100.00% <100.00%> (ø)
...ofiles/screens/manage/ManageAcceleratorProfile.tsx 100.00% <100.00%> (ø)
.../manage/ManageAcceleratorProfileDetailsSection.tsx 100.00% <ø> (ø)
.../pages/acceleratorProfiles/screens/manage/types.ts 100.00% <ø> (ø)
.../hardwareProfiles/manage/ManageHardwareProfile.tsx 100.00% <100.00%> (ø)
.../screens/manage/ManageAcceleratorProfileFooter.tsx 79.54% <87.50%> (+0.05%) ⬆️
...areProfiles/manage/ManageHardwareProfileFooter.tsx 82.92% <88.88%> (+0.06%) ⬆️

... and 12 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 bc58475...2af4c7e. Read the comment docs.

Copy link
Member

@Gkrumbach07 Gkrumbach07 left a comment

Choose a reason for hiding this comment

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

looks good to me

/lgtm

Copy link
Contributor

openshift-ci bot commented Jan 30, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Gkrumbach07

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 dc692b5 into opendatahub-io:main Jan 30, 2025
29 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.

3 participants