RHOAIENG-50913-Part 2: A workbench cannot be stopped if it's hardware profile doesn't exist - #7175
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
useFetch never sets loaded=true when a fetch errors, so the condition loaded && loadError was impossible to satisfy. This prevented the hardware profile annotation removal patches from being generated, causing workbench stop/start to fail when the hardware profile was deleted. Also add cy.wait for the hardware profile 404 fetch in the start test to ensure the async response is processed before clicking. Made-with: Cursor
dca1d9b to
30d7ac4
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## stable-2.x #7175 +/- ##
==============================================
- Coverage 68.05% 67.93% -0.12%
==============================================
Files 2230 2238 +8
Lines 50369 50847 +478
Branches 14086 14252 +166
==============================================
+ Hits 34280 34545 +265
- Misses 16089 16302 +213
... and 18 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: DaoDaoNoCode The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
d45da9a
into
opendatahub-io:stable-2.x
fix: remove loaded check in useDeletedHardwareProfilePatches (opendatahub-io#7175)
https://redhat.atlassian.net/browse/RHOAIENG-50913
Description
The
useDeletedHardwareProfilePatcheshook had a conditionloaded && loadErroradded in #6947 that was impossible to satisfy —useFetchonly setsloaded=trueon success, never on error. This prevented hardware profile annotation removal patches from being generated, blocking workbench stop/start when the hardware profile was deleted.Fix: remove the
loadedcheck.loadErrorbeing set already implies the fetch completed.hwnbbug.mp4
How Has This Been Tested?
Manually tested against RHOAI 2.25.4 cluster:
Test Impact
Existing Cypress tests cover both scenarios — no changes needed:
Should stop a running workbench with a deleted hardware profileShould start a stopped workbench with a deleted hardware profileRequest review criteria:
Self checklist (all need to be checked):
If you have UI changes:
After the PR is posted & before it merges:
main