Skip to content

odh-dashboard: add required Prow lint, type-check, unit-tests - #83263

Open
manaswinidas wants to merge 2 commits into
openshift:mainfrom
manaswinidas:RHOAIENG-3333-odh-dashboard-prow-quality-gates
Open

odh-dashboard: add required Prow lint, type-check, unit-tests#83263
manaswinidas wants to merge 2 commits into
openshift:mainfrom
manaswinidas:RHOAIENG-3333-odh-dashboard-prow-quality-gates

Conversation

@manaswinidas

@manaswinidas manaswinidas commented Aug 11, 2026

Copy link
Copy Markdown

Summary

Addresses RHOAIENG-3333: Tide only retests Prow contexts against the latest base/merge SHA. odh-dashboard quality gates (lint / type-check / unit) currently run only in GitHub Actions, so two green PRs can still race and break main (recent example: type-check break from mock import move vs new tests).

Changes

  • Keep existing golang build_root and product image builds/mirrors
  • Add nodejs-22-src (UBI Node 22 + source via COPY --from=src) for quality tests; exclude it from promotion
  • Add required always-run container tests:
    • lintnpm ci + NODE_OPTIONS=--max-old-space-size=8192 npm run lint
    • type-checknpm ci + npm run type-check
    • unit-testsnpm ci + npm run test-unit
  • Bump resources for those jobs (~2 CPU / 8Gi)
  • Quality presubmits use skip_cloning: true so ci-operator gets a full checkout (image jobs keep Dockerfile sparse checkout)

Phase 1 only. Cypress / contract tests stay on GitHub Actions for now (dual-run).

Test plan

  • /pj-rehearse pull-ci-opendatahub-io-odh-dashboard-main-lint against an odh-dashboard PR
  • /pj-rehearse pull-ci-opendatahub-io-odh-dashboard-main-type-check
  • /pj-rehearse pull-ci-opendatahub-io-odh-dashboard-main-unit-tests
  • Confirm contexts ci/prow/lint, ci/prow/type-check, ci/prow/unit-tests are required (no optional: true)
  • Confirm existing image / mirror jobs still generate and are unchanged in behavior

/cc @opendatahub-io/dashboard-maintainers

Made with Cursor

Summary by CodeRabbit

Updates the odh-dashboard OpenShift CI configuration to add Prow quality gates. The configuration now:

  • Builds a non-promoted nodejs-22-src test image.
  • Runs always-on lint, type-check, and unit-tests container tests.
  • Installs npm 11.8.0 and frontend modules before running the checks.
  • Allocates approximately 2 CPUs and 8 GiB of memory to these jobs.
  • Uses full repository checkouts for quality presubmits.
  • Keeps Cypress and contract tests in GitHub Actions.
  • Retains the existing Go build and product image build and mirror jobs.

Tide only retests Prow contexts before merge. Quality gates lived only in
GitHub Actions, so green PRs could still race and break main (RHOAIENG-3333).

Add a Node 22 test image (nodejs-22-src) while keeping the golang build_root
for product image builds, and required always-run container tests for lint,
type-check, and unit-tests. Quality jobs use skip_cloning so ci-operator gets
a full checkout instead of the Dockerfile-only sparse checkout used by image jobs.

Co-authored-by: Cursor <cursoragent@cursor.com>
@openshift-ci

openshift-ci Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

@manaswinidas: GitHub didn't allow me to request PR reviews from the following users: opendatahub-io/dashboard-maintainers.

Note that only openshift members and repo collaborators can review this PR, and authors cannot review their own PRs.

Details

In response to this:

Summary

Addresses RHOAIENG-3333: Tide only retests Prow contexts against the latest base/merge SHA. odh-dashboard quality gates (lint / type-check / unit) currently run only in GitHub Actions, so two green PRs can still race and break main (recent example: type-check break from mock import move vs new tests).

Changes

  • Keep existing golang build_root and product image builds/mirrors
  • Add nodejs-22-src (UBI Node 22 + source via COPY --from=src) for quality tests; exclude it from promotion
  • Add required always-run container tests:
  • lintnpm ci + NODE_OPTIONS=--max-old-space-size=8192 npm run lint
  • type-checknpm ci + npm run type-check
  • unit-testsnpm ci + npm run test-unit
  • Bump resources for those jobs (~2 CPU / 8Gi)
  • Quality presubmits use skip_cloning: true so ci-operator gets a full checkout (image jobs keep Dockerfile sparse checkout)

Phase 1 only. Cypress / contract tests stay on GitHub Actions for now (dual-run).

Test plan

  • /pj-rehearse pull-ci-opendatahub-io-odh-dashboard-main-lint against an odh-dashboard PR
  • /pj-rehearse pull-ci-opendatahub-io-odh-dashboard-main-type-check
  • /pj-rehearse pull-ci-opendatahub-io-odh-dashboard-main-unit-tests
  • Confirm contexts ci/prow/lint, ci/prow/type-check, ci/prow/unit-tests are required (no optional: true)
  • Confirm existing image / mirror jobs still generate and are unchanged in behavior

/cc @opendatahub-io/dashboard-maintainers

Made with Cursor

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

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

Review profile: CHILL

Plan: Pro Plus

Run ID: 4d451a99-a78f-402c-a0d5-03a9e69c8e61

📥 Commits

Reviewing files that changed from the base of the PR and between e87e504 and 0562536.

⛔ Files ignored due to path filters (1)
  • ci-operator/jobs/opendatahub-io/odh-dashboard/opendatahub-io-odh-dashboard-main-presubmits.yaml is excluded by !ci-operator/jobs/**
📒 Files selected for processing (1)
  • ci-operator/config/opendatahub-io/odh-dashboard/opendatahub-io-odh-dashboard-main.yaml
🚧 Files skipped from review as they are similar to previous changes (1)
  • ci-operator/config/opendatahub-io/odh-dashboard/opendatahub-io-odh-dashboard-main.yaml

Walkthrough

The CI configuration adds a Node.js 22 source container, resource requests, and jobs for dependency installation, linting, type-checking, and unit testing.

Changes

ODH Dashboard CI validation

Layer / File(s) Summary
Node.js source container and resources
ci-operator/config/opendatahub-io/odh-dashboard/opendatahub-io-odh-dashboard-main.yaml
The configuration adds a Node.js 22 source container, installs Git, copies repository contents, excludes the container from promotion, and defines resource requests.
Validation job execution
ci-operator/config/opendatahub-io/odh-dashboard/opendatahub-io-odh-dashboard-main.yaml
The lint, type-check, and unit-test jobs use the Node.js 22 container, install npm dependencies and modules, and run their validation commands.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Mergeability Score: ⚪ Minimal · up to 05625

This PR adds required Prow lint, type-check, and unit-test gates without any identified current-head correctness or deployment risk; no actionable merge-blocking risk remains after normal checks and review.

🚥 Pre-merge checks | ✅ 15
✅ Passed checks (15 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: adding required Prow lint, type-check, and unit-test jobs.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Stable And Deterministic Test Names ✅ Passed The diff changes only CI YAML and adds static names (lint, type-check, unit-tests); it introduces no Ginkgo title calls or dynamic test-title values.
Test Structure And Quality ✅ Passed The PR changes only two CI YAML files; the diff adds no Ginkgo test code or It/Eventually/BeforeEach/AfterEach calls, so this check is not applicable.
Microshift Test Compatibility ✅ Passed The PR changes only two CI YAML files and adds no Ginkgo e2e tests or OpenShift API references, so this MicroShift compatibility check is inapplicable.
Single Node Openshift (Sno) Test Compatibility ✅ Passed The full PR diff changes only two ci-operator YAML files and adds no Ginkgo tests or multi-node topology assumptions, so this SNO check is not applicable.
Topology-Aware Scheduling Compatibility ✅ Passed The PR changes only ci-operator/Prow configuration and generated jobs. It adds test containers and resource requests, but no deployment scheduling constraints, replicas, affinity, selectors, tolera...
Ote Binary Stdout Contract ✅ Passed The PR changes only CI YAML and adds npm-based jobs; it introduces no OTE binary code or process-level stdout writes such as main(), TestMain(), klog, or fmt.Print.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed The PR changes only ci-operator YAML and generated Prow jobs; it adds no Ginkgo e2e tests or IPv4/network endpoint logic covered by this check.
No-Weak-Crypto ✅ Passed The PR changes only two YAML CI files. Added lines define Node/npm test jobs and secret mounts; no MD5, SHA1, DES, RC4, 3DES, Blowfish, ECB, custom crypto, or secret comparisons appear.
Container-Privileges ✅ Passed The PR adds no privileged, hostPID, hostNetwork, hostIPC, SYS_ADMIN, or allowPrivilegeEscalation settings. The image uses root only for dnf, then runs as USER 1001.
No-Sensitive-Data-In-Logs ✅ Passed The PR adds npm checks and a source image, but no echo, print, logger, credential value, PII, or sensitive-data logging path appears in the changed lines.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@openshift-ci openshift-ci Bot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Aug 11, 2026
@openshift-ci

openshift-ci Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Hi @manaswinidas. Thanks for your PR.

I'm waiting for a openshift member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@openshift-ci

openshift-ci Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: manaswinidas
Once this PR has been reviewed and has the lgtm label, please assign dgutride for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@ci-operator/config/opendatahub-io/odh-dashboard/opendatahub-io-odh-dashboard-main.yaml`:
- Around line 42-49: Update the nodejs-22-src build definition by removing the
from: src override so it uses the Dockerfile’s Node.js 22 base image, and change
COPY --from=src . . to copy directly from the repository build context.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

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

Review profile: CHILL

Plan: Pro Plus

Run ID: 56b8377b-5830-48f1-90ae-698c9bb4cffd

📥 Commits

Reviewing files that changed from the base of the PR and between 1c125d2 and e87e504.

⛔ Files ignored due to path filters (1)
  • ci-operator/jobs/opendatahub-io/odh-dashboard/opendatahub-io-odh-dashboard-main-presubmits.yaml is excluded by !ci-operator/jobs/**
📒 Files selected for processing (1)
  • ci-operator/config/opendatahub-io/odh-dashboard/opendatahub-io-odh-dashboard-main.yaml

@manaswinidas

Copy link
Copy Markdown
Author

/ok-to-test

@openshift-ci

openshift-ci Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

@manaswinidas: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

Details

In response to this:

/ok-to-test

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@andrewballantyne

Copy link
Copy Markdown
Contributor

/ok-to-test

@christianvogt please take over here -- let me know if you need me.

@openshift-ci openshift-ci Bot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Aug 11, 2026
@christianvogt

Copy link
Copy Markdown
Contributor

AI Review

nodejs-22-src image

from: src overrides the Dockerfile FROM, so this image will be based on pipeline:src (golang build_root) instead of Node 22. Drop from: src and copy the repo context directly:

- dockerfile_literal: |
    FROM registry.access.redhat.com/ubi9/nodejs-22:latest
    USER root
    RUN dnf install -y git && dnf clean all
    WORKDIR /opt/app-root/src
    COPY . .
    USER 1001
  to: nodejs-22-src

Generated jobs

Don't hand-edit skip_cloning: true into the presubmits — prowgen regenerates those away. Change the config, then run make update and commit the generated output.

Install steps

Root npm ci alone doesn't match odh-dashboard GHA. Lint/type-check need module installs (packages/*/frontend are not root workspaces), and npm should be pinned to 11.8.0 (packageManager in odh-dashboard). Something like:

commands: |
  npm install -g npm@11.8.0
  npm ci
  npm run install:modules
  NODE_OPTIONS="--max-old-space-size=8192" npm run lint

(same install preamble for type-check and unit-tests)

Drop from: src so the test image keeps the Node 22 base and COPY
the repo context. Match odh-dashboard GHA install (npm@11.8.0 +
install:modules). Regenerate presubmits with make update instead of
hand-editing skip_cloning.

Co-authored-by: Cursor <cursoragent@cursor.com>
@manaswinidas

Copy link
Copy Markdown
Author

@christianvogt Addressed your review in 0562536:

  1. nodejs-22-src image — dropped from: src and switched to COPY . . so the image stays on Node 22.
  2. Generated jobs — regenerated with determinize-ci-operator + ci-operator-prowgen + sanitize-prow-jobs (no hand-edited skip_cloning).
  3. Install steps — lint / type-check / unit-tests now run:
    npm install -g npm@11.8.0
    npm ci
    npm run install:modules
    before the respective check.

Please take another look when you can. /pj-rehearse pull-ci-opendatahub-io-odh-dashboard-main-lint pull-ci-opendatahub-io-odh-dashboard-main-type-check pull-ci-opendatahub-io-odh-dashboard-main-unit-tests once CI is green would be useful.

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

[REHEARSALNOTIFIER]
@manaswinidas: the pj-rehearse plugin accommodates running rehearsal tests for the changes in this PR. Expand 'Interacting with pj-rehearse' for usage details. The following rehearsable tests have been affected by this change:

Test name Repo Type Reason
pull-ci-opendatahub-io-odh-dashboard-main-lint opendatahub-io/odh-dashboard presubmit Presubmit changed
pull-ci-opendatahub-io-odh-dashboard-main-type-check opendatahub-io/odh-dashboard presubmit Presubmit changed
pull-ci-opendatahub-io-odh-dashboard-main-unit-tests opendatahub-io/odh-dashboard presubmit Presubmit changed
pull-ci-opendatahub-io-odh-dashboard-main-images opendatahub-io/odh-dashboard presubmit Ci-operator config changed
pull-ci-opendatahub-io-odh-dashboard-main-odh-core-bff-pr-image-mirror opendatahub-io/odh-dashboard presubmit Ci-operator config changed
pull-ci-opendatahub-io-odh-dashboard-main-odh-dashboard-operator-pr-image-mirror opendatahub-io/odh-dashboard presubmit Ci-operator config changed
pull-ci-opendatahub-io-odh-dashboard-main-odh-dashboard-pr-image-mirror opendatahub-io/odh-dashboard presubmit Ci-operator config changed
pull-ci-opendatahub-io-odh-dashboard-main-odh-mod-arch-agent-ops-pr-image-mirror opendatahub-io/odh-dashboard presubmit Ci-operator config changed
pull-ci-opendatahub-io-odh-dashboard-main-odh-mod-arch-automl-pr-image-mirror opendatahub-io/odh-dashboard presubmit Ci-operator config changed
pull-ci-opendatahub-io-odh-dashboard-main-odh-mod-arch-autorag-pr-image-mirror opendatahub-io/odh-dashboard presubmit Ci-operator config changed
pull-ci-opendatahub-io-odh-dashboard-main-odh-mod-arch-eval-hub-pr-image-mirror opendatahub-io/odh-dashboard presubmit Ci-operator config changed
pull-ci-opendatahub-io-odh-dashboard-main-odh-mod-arch-gen-ai-pr-image-mirror opendatahub-io/odh-dashboard presubmit Ci-operator config changed
pull-ci-opendatahub-io-odh-dashboard-main-odh-mod-arch-maas-pr-image-mirror opendatahub-io/odh-dashboard presubmit Ci-operator config changed
pull-ci-opendatahub-io-odh-dashboard-main-odh-mod-arch-mlflow-pr-image-mirror opendatahub-io/odh-dashboard presubmit Ci-operator config changed
pull-ci-opendatahub-io-odh-dashboard-main-odh-mod-arch-model-registry-pr-image-mirror opendatahub-io/odh-dashboard presubmit Ci-operator config changed
Interacting with pj-rehearse

Comment: /pj-rehearse to run up to 5 rehearsals
Comment: /pj-rehearse skip to opt-out of rehearsals
Comment: /pj-rehearse {test-name}, with each test separated by a space, to run one or more specific rehearsals
Comment: /pj-rehearse more to run up to 10 rehearsals
Comment: /pj-rehearse max to run up to 25 rehearsals
Comment: /pj-rehearse auto-ack to run up to 5 rehearsals, and add the rehearsals-ack label on success
Comment: /pj-rehearse list to get an up-to-date list of affected jobs
Comment: /pj-rehearse abort to abort all active rehearsals
Comment: /pj-rehearse network-access-allowed to allow rehearsals of tests that have the restrict_network_access field set to false. This must be executed by an openshift org member who is not the PR author

Once you are satisfied with the results of the rehearsals, comment: /pj-rehearse ack to unblock merge. When the rehearsals-ack label is present on your PR, merge will no longer be blocked by rehearsals.
If you would like the rehearsals-ack label removed, comment: /pj-rehearse reject to re-block merging.

@christianvogt

Copy link
Copy Markdown
Contributor

/pj-rehearse pull-ci-opendatahub-io-odh-dashboard-main-lint pull-ci-opendatahub-io-odh-dashboard-main-type-check pull-ci-opendatahub-io-odh-dashboard-main-unit-tests

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

@christianvogt: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@openshift-ci

openshift-ci Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

@manaswinidas: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/rehearse/opendatahub-io/odh-dashboard/main/unit-tests 0562536 link unknown /pj-rehearse pull-ci-opendatahub-io-odh-dashboard-main-unit-tests
ci/rehearse/opendatahub-io/odh-dashboard/main/type-check 0562536 link unknown /pj-rehearse pull-ci-opendatahub-io-odh-dashboard-main-type-check
ci/rehearse/opendatahub-io/odh-dashboard/main/lint 0562536 link unknown /pj-rehearse pull-ci-opendatahub-io-odh-dashboard-main-lint

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ok-to-test Indicates a non-member PR verified by an org member that is safe to test.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants