MLflow e2e fixes #7397
Conversation
* Add Mlflow experiments e2e tests Signed-off-by: Nana Nosirova <10577112+nananosirova@users.noreply.github.com> * Address comments Signed-off-by: Nana Nosirova <10577112+nananosirova@users.noreply.github.com> --------- Signed-off-by: Nana Nosirova <10577112+nananosirova@users.noreply.github.com> (cherry picked from commit c07e9f7)
…io#7371) * Add mock tests for mlflow experiments and prompts pages Signed-off-by: Nana Nosirova <10577112+nananosirova@users.noreply.github.com> * Update packages/cypress/cypress/tests/mocked/mlflow/mlflowExperiments.cy.ts Co-authored-by: Juntao Wang <37624318+DaoDaoNoCode@users.noreply.github.com> * Update packages/cypress/cypress/tests/mocked/mlflow/mlflowExperiments.cy.ts Co-authored-by: Juntao Wang <37624318+DaoDaoNoCode@users.noreply.github.com> --------- Signed-off-by: Nana Nosirova <10577112+nananosirova@users.noreply.github.com> Co-authored-by: Juntao Wang <37624318+DaoDaoNoCode@users.noreply.github.com> (cherry picked from commit e302dcb)
…ub-io#7393) * fix(cypress): stabilize prompt management E2E test polling The test was flaking because UI sidebar polls used cy.visitWithLogin on every retry, incurring full OAuth + page-load overhead (~15s per attempt). Combined with non-deterministic operator leader-election delays (~83s for MLflow), the polling budget was exhausted before the nav items appeared. Changes: - Use cy.reload() for retry attempts after the initial visitWithLogin - Poll backend resources (DSC component status, deployment readiness) before checking the sidebar, so the UI poll is a quick confirmation - Extract enableGenAiBackend / enableMlflowBackend for composition so enablePromptManagementFeatures does one sidebar poll instead of three - Reduce poll interval from 10s to 5s (viable now that retries are cheap) Validated with 7 consecutive passes at retries=0. Made-with: Cursor * fix(cypress): poll mlflow module federation remote before sidebar check The mlflowEmbedded remote entry is served by the MLflow tracking server pod. On cold-start clusters (Jenkins CI), the k8s deployment reports Available before the pod's web server is ready to serve the federated JavaScript bundle. This caused loadRemote() to fail silently on every page reload, so the Prompts nav item never appeared. Add waitForMlflowRemoteEntry() which polls the /_mf/mlflowEmbedded remote entry endpoint via cy.request() until it returns HTTP 200, confirming the module is loadable before the sidebar poll begins. Made-with: Cursor * fix(cypress): wait for dashboard-page-main before sidebar nav checks After cy.reload(), the #page-sidebar element exists before the app finishes loading DSC status and evaluating area flags. The one-shot jQuery check finds nothing because nav sections haven't populated yet. Wait for #dashboard-page-main (rendered only after user, config, and DSC status are fetched) so area flags are evaluated and module federation extensions are resolved before checking sidebar content. Made-with: Cursor * fix: replace broken guarded check with direct cy.get for page settle The guarded check using cy.get('body').then($b => $b.find(...)) was a synchronous one-shot DOM query that always evaluated to false after cy.reload(), causing the sidebar to be checked before the page finished loading. Revert to a direct cy.get with data-testid selector which is Cypress retry-aware and properly waits for the app to initialize. Made-with: Cursor * fix: poll dashboard backend DSC status before sidebar check The backend caches DSC status via ResourceWatcher with 2min/30min polling intervals. After patching the DSC on the cluster, the cached /api/dsc/status response can be stale — causing SupportedArea.MLFLOW to evaluate false and filtering out the Prompts nav extension. Add waitForDashboardDSCStatus() that polls the dashboard's own /api/dsc/status endpoint via cy.request() until it reflects the expected component states, ensuring the frontend will see correct area flags before the sidebar poll begins. Made-with: Cursor * fix: make sidebar nav item checks retry-aware for area flag propagation After dashboard-page-main appears, area flags are set via a React useEffect that runs asynchronously. Extension-provided nav items only render once the PluginStore evaluates those flags, creating a short gap where the sidebar exists but doesn't yet contain extension items. The previous one-shot jQuery .find() always ran during this gap, causing 16+ unnecessary page reloads before the check randomly succeeded. This was the root cause of the Jenkins flake — the race window is larger on slower CI environments. Replace one-shot checks with a polling loop (500ms interval, 15s max) against the live jQuery element, so a single page load suffices once extensions are ready. Also adds diagnostic logging (mf-remotes-json, sidebar contents, DSC status) on first/last failed attempts. Test now passes on first sidebar attempt (2.7s) vs 16+ reloads (121s). Made-with: Cursor (cherry picked from commit cf6763b)
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. 🗂️ Base branches to auto review (4)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository YAML (base), Central YAML (inherited), Organization UI (inherited) Review profile: CHILL Plan: Enterprise 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 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## v3.4.0-fixes #7397 +/- ##
================================================
+ Coverage 64.93% 64.96% +0.02%
================================================
Files 2442 2450 +8
Lines 76086 76160 +74
Branches 19195 19216 +21
================================================
+ Hits 49410 49479 +69
- Misses 26676 26681 +5 see 24 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 |
5f81294
into
opendatahub-io:v3.4.0-fixes
MLflow e2e fixes (opendatahub-io#7397)
Cherry-picking the following:
#7393
#7289
#7371