Skip to content

MLflow e2e fixes #7397

Merged
openshift-merge-bot[bot] merged 4 commits intoopendatahub-io:v3.4.0-fixesfrom
nananosirova:e2e-fix-prompt-management
Apr 27, 2026
Merged

MLflow e2e fixes #7397
openshift-merge-bot[bot] merged 4 commits intoopendatahub-io:v3.4.0-fixesfrom
nananosirova:e2e-fix-prompt-management

Conversation

@nananosirova
Copy link
Copy Markdown
Contributor

Cherry-picking the following:
#7393
#7289
#7371

nananosirova and others added 3 commits April 27, 2026 11:22
* 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)
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 27, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review (4)
  • main
  • master
  • incubation
  • rhoai

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited), Organization UI (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 59c3e912-1e13-4a75-b42f-2f028348f26c

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@openshift-ci openshift-ci Bot requested a review from ConorOM1 April 27, 2026 15:26
@openshift-ci openshift-ci Bot requested a review from FedeAlonso April 27, 2026 15:26
@nananosirova nananosirova changed the title E2e fix prompt management E2E fix prompt management Apr 27, 2026
@nananosirova nananosirova changed the title E2E fix prompt management MLflow e2e fixes Apr 27, 2026
@nananosirova
Copy link
Copy Markdown
Contributor Author

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 64.96%. Comparing base (efdd6b9) to head (05f6128).
⚠️ Report is 1 commits behind head on v3.4.0-fixes.

Additional details and impacted files

Impacted file tree graph

@@               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.

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown
Member

@DaoDaoNoCode DaoDaoNoCode 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
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Apr 27, 2026

[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

Details 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 5f81294 into opendatahub-io:v3.4.0-fixes Apr 27, 2026
44 checks passed
DaoDaoNoCode added a commit to red-hat-data-services/odh-dashboard that referenced this pull request Apr 27, 2026
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