Skip to content

ci(operator): run GPU-free deploy e2e tests - #11235

Closed
sttts wants to merge 6 commits into
ai-dynamo:mainfrom
sttts:sttts-deploy-e2e-gpu-0
Closed

sttts wants to merge 6 commits into
ai-dynamo:mainfrom
sttts:sttts-deploy-e2e-gpu-0

Conversation

@sttts

@sttts sttts commented Jul 6, 2026 •

Copy link
Copy Markdown
Contributor

Overview

Run the GPU-free Dynamo operator deploy E2E suite in PR and post-merge CI by reusing the deploy vCluster. The lane exercises the installed Helm chart, Kubernetes RBAC, DGDR reconciliation, profiling jobs, and cleanup without allocating GPUs.

Summary

  • add a reusable operator E2E workflow that reconnects to the existing deploy vCluster and self-bootstraps it for reruns after cleanup
  • build and copy the commit-scoped planner image needed by mocker-mode DGDR profiling
  • run only validation and rapid gpu_0 specs, excluding the separately labeled H100 support matrix
  • collect JUnit results, logs, Kubernetes events, and operator diagnostics on failure
  • pass only the secrets required by the new reusable workflow calls and disable persisted checkout credentials
  • remove stale cluster-scoped node access from the profiling-job role; GPU discovery runs in the operator, not the profiling job

Details

The first live CI run caught a real chart/operator integration defect: the operator dynamically binds the profiling-job ClusterRole, but that role included nodes get/list/watch while the operator service account held only nodes get with GPU discovery disabled. Kubernetes rejected the RoleBinding as privilege escalation. The profiling job does not perform node discovery, so this PR removes that stale permission instead of broadening the operator's access.

Where should reviewer start?

  1. .github/workflows/shared-operator-e2e.yml for the test selection, vCluster reuse, and diagnostics.
  2. The planner-copy-to-acr and deploy-test-operator-gpu0 jobs in .github/workflows/pr.yaml and .github/workflows/post-merge-ci.yml for gating and least-privilege secrets.
  3. deploy/helm/charts/platform/components/operator/templates/profiling-job-rbac.yaml and its Helm regression test for the RBAC correction.

Related Issues

Validation

  • pre-commit hooks on all changed files
  • Helm unit tests: 16 passed
  • actionlint on all three modified workflows, ignoring only repository custom-runner-label warnings
  • YAML parsing with yq
  • git diff --check
  • dry-run of the exact Make/Ginkgo selection: 27 of 39 specs selected, 0 failed, H100 support matrix excluded, and JUnit XML generated
  • live Kubernetes rerun pending the next pushed commit

@sttts
sttts requested a review from a team as a code owner July 6, 2026 11:10
@sttts
sttts had a problem deploying to external_collaborator July 6, 2026 11:11 — with GitHub Actions Failure
@sttts
sttts temporarily deployed to external_collaborator July 6, 2026 11:11 — with GitHub Actions Inactive
@github-actions github-actions Bot added ci Issues/PRs that reference CI build/test actions labels Jul 6, 2026
@datadog-official

This comment has been minimized.

@coderabbitai

coderabbitai Bot commented Jul 6, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

This PR adds a reusable "Shared Operator E2E" GitHub Actions workflow and integrates two new jobs, planner-copy-to-acr and deploy-test-operator-gpu0, into pr.yaml and post-merge-ci.yml, extending gating conditions and updating status-check/cleanup job dependency lists accordingly.

Changes

Operator E2E Workflow Integration

Layer / File(s) Summary
Shared Operator E2E reusable workflow
.github/workflows/shared-operator-e2e.yml
New reusable workflow defines an operator-e2e job that checks/bootstraps a vCluster, connects and configures kubeconfig, verifies prerequisites, runs GPU0 E2E tests, collects diagnostics on failure, and uploads test-results artifacts.
pr.yaml planner build and copy gating
.github/workflows/pr.yaml
planner-build gating is extended to trigger on operator changes; a new planner-copy-to-acr job copies the planner image to ACR when operator changes are detected and planner-build succeeds; deploy-operator gating is extended to include operator changes.
pr.yaml operator E2E job and dependency wiring
.github/workflows/pr.yaml
New deploy-test-operator-gpu0 job runs the shared operator E2E workflow depending on deploy-operator and planner-copy-to-acr; backend-status-check, deploy-status-check, deploy-cleanup, and clean-k8s-builder dependency lists are updated to include the new jobs.
post-merge-ci.yml operator E2E and copy job wiring
.github/workflows/post-merge-ci.yml
New planner-copy-to-acr and deploy-test-operator-gpu0 jobs are added with appropriate gating and dependencies; deploy-cleanup and deploy-status-check dependency lists are updated to include them.

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

Related PRs: None specified.

Suggested labels: ci, github-actions, operator

Suggested reviewers: None specified.

Poem
A rabbit hops through YAML trees,
Copying images with practiced ease,
GPU0 wakes to test the deploy,
Status checks hum with newfound joy,
Post-merge and pr, in step they run,
CI's dance is never done.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
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.
Title check ✅ Passed The title is concise and matches the main CI change: adding GPU-free deploy E2E tests.
Description check ✅ Passed The description covers the required sections and includes a linked issue, with enough detail for review.

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

@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

🧹 Nitpick comments (1)
.github/workflows/post-merge-ci.yml (1)

788-788: 🔒 Security & Privacy | 🔵 Trivial | 💤 Low value

secrets: inherit flagged by zizmor (least-privilege).

Both new reusable-workflow calls unconditionally inherit all caller secrets rather than passing only what's required (AZURE_ACR_HOSTNAME, HF_TOKEN, etc. for the E2E workflow; cloud secrets for the copy workflow). This is a static-analysis-flagged posture gap rather than an active vulnerability, and appears consistent with other jobs likely already using this pattern in the file.

Also applies to: 862-862

🤖 Prompt for 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.

In @.github/workflows/post-merge-ci.yml at line 788, The reusable workflow
invocations are inheriting all caller secrets instead of only the specific ones
needed, which triggers the least-privilege warning. Update the calls to the E2E
and shared-copy reusable workflows so they explicitly pass only the required
secrets (for example, the E2E workflow’s Azure/HF credentials and the copy
workflow’s cloud secrets) rather than using blanket secret inheritance. Use the
reusable-workflow call sites in the workflow file to keep the fix scoped to
those entries.

Source: Linters/SAST tools

🤖 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 @.github/workflows/shared-operator-e2e.yml:
- Around line 39-40: The Checkout code step in the shared operator E2E workflow
is missing the same credential-hardening used elsewhere. Update the
actions/checkout usage in this workflow to set persist-credentials to false,
since the job only reads code and runs local actions/kubectl and does not need
git write access; use the existing Checkout code step as the location to apply
the change.

---

Nitpick comments:
In @.github/workflows/post-merge-ci.yml:
- Line 788: The reusable workflow invocations are inheriting all caller secrets
instead of only the specific ones needed, which triggers the least-privilege
warning. Update the calls to the E2E and shared-copy reusable workflows so they
explicitly pass only the required secrets (for example, the E2E workflow’s
Azure/HF credentials and the copy workflow’s cloud secrets) rather than using
blanket secret inheritance. Use the reusable-workflow call sites in the workflow
file to keep the fix scoped to those entries.
🪄 Autofix (Beta)

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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 879d9c0a-1708-4b48-9d57-68d4c6b00267

📥 Commits

Reviewing files that changed from the base of the PR and between e2d72ed and 5e82645.

📒 Files selected for processing (3)
  • .github/workflows/post-merge-ci.yml
  • .github/workflows/pr.yaml
  • .github/workflows/shared-operator-e2e.yml

@sttts
sttts requested a review from a team as a code owner July 9, 2026 14:21
@sttts
sttts temporarily deployed to external_collaborator July 9, 2026 14:21 — with GitHub Actions Inactive
@dynamo-ops

Copy link
Copy Markdown
Contributor

/ok to test cd78132

@github-actions github-actions Bot added the deployment::k8s Relates to dynamo deployment in kubernetes label Jul 9, 2026
@sttts
sttts requested review from a team as code owners July 13, 2026 11:07
@sttts
sttts temporarily deployed to external_collaborator July 13, 2026 11:07 — with GitHub Actions Inactive
@dynamo-ops

Copy link
Copy Markdown
Contributor

/ok to test 1437bfc

@sttts
sttts force-pushed the sttts-deploy-e2e-gpu-0 branch from 1437bfc to 8f624a9 Compare July 20, 2026 13:08
@sttts
sttts temporarily deployed to external_collaborator July 20, 2026 13:08 — with GitHub Actions Inactive
@dynamo-ops

Copy link
Copy Markdown
Contributor

/ok to test 8f624a9

@sttts
sttts temporarily deployed to external_collaborator July 20, 2026 13:32 — with GitHub Actions Inactive
@dynamo-ops

Copy link
Copy Markdown
Contributor

/ok to test da92e5d

@sttts
sttts force-pushed the sttts-deploy-e2e-gpu-0 branch from da92e5d to 1c6bf97 Compare July 20, 2026 15:08
@sttts
sttts temporarily deployed to external_collaborator July 20, 2026 15:08 — with GitHub Actions Inactive
@dynamo-ops

Copy link
Copy Markdown
Contributor

/ok to test 1c6bf97

@sttts
sttts force-pushed the sttts-deploy-e2e-gpu-0 branch from 1c6bf97 to e71eedd Compare July 20, 2026 16:08
@sttts
sttts temporarily deployed to external_collaborator July 20, 2026 16:08 — with GitHub Actions Inactive
@dynamo-ops

Copy link
Copy Markdown
Contributor

/ok to test e71eedd

Comment thread .github/workflows/pr.yaml
if: |
needs.changed-files.outputs.core == 'true' ||
needs.changed-files.outputs.planner == 'true' ||
needs.changed-files.outputs.operator == 'true'

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

why operator?


- name: Self-bootstrap vCluster (rerun)
if: steps.vcluster-check.outputs.exists != 'true'
uses: ./.github/actions/setup-dynamo-operator

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

isn't this already done? I thought we install into an existing vcluster?

verbs: ["get"]
- apiGroups: [""]
resources: ["nodes"]
verbs: ["get", "list", "watch"]

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

unrelated?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

For the reviewer: this is directly related to enabling the live gpu_0 operator E2E coverage. The new lane exposed that the operator could not bind the profiling ClusterRole: it requested nodes get/list/watch, while the operator service account had only nodes/get with GPU discovery disabled, so Kubernetes rejected the RoleBinding as privilege escalation. The profiling job does not access nodes, so removing this stale permission is required for the E2E lane to pass.

content:
apiGroups: [""]
resources: ["nodes"]
verbs: ["get", "list", "watch"]

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

unrelated?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

For the reviewer: this is the regression coverage for the RBAC failure above. The stale nodes rule prevented the operator from creating the profiling RoleBinding, so this assertion ensures that the unnecessary cluster-scoped permission cannot be reintroduced and break the operator E2E lane again.

Comment thread .github/workflows/post-merge-ci.yml Resolved
@sttts
sttts temporarily deployed to external_collaborator July 21, 2026 11:48 — with GitHub Actions Inactive
@dynamo-ops

Copy link
Copy Markdown
Contributor

/ok to test 0642a5c

@sttts
sttts temporarily deployed to external_collaborator July 21, 2026 11:51 — with GitHub Actions Inactive
@dynamo-ops

Copy link
Copy Markdown
Contributor

/ok to test e8ed856


jobs:
deploy-test-operator-e2e:
# TODO(sttts): Rework the GPU operator tests to run in CI too; today this lane only covers GPU-free specs.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

das gehört dahin, wo wir gpu0 als filter setzen im test

@sttts
sttts temporarily deployed to external_collaborator July 21, 2026 11:53 — with GitHub Actions Inactive
@dynamo-ops

Copy link
Copy Markdown
Contributor

/ok to test 1d27574

@sttts
sttts temporarily deployed to external_collaborator July 21, 2026 11:55 — with GitHub Actions Inactive
@dynamo-ops

Copy link
Copy Markdown
Contributor

/ok to test e040c96

sttts commented Jul 22, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by #11946. We are moving the DGDR live-cluster coverage into the existing tests/deploy pytest suite instead of maintaining a separate operator E2E lane.

@sttts sttts closed this Jul 22, 2026

This branch was previously deployed

1 inactive deployment
external_collaborator — e040c96f Deployed Jul 21, 2026 by sttts via ok-to-test #3344
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

actions ci Issues/PRs that reference CI build/test deployment::k8s Relates to dynamo deployment in kubernetes size/L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants