ci(e2e): authenticate Docker Hub pulls in nightly#4697
Conversation
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAdds optional Docker Hub credentials to the reusable E2E workflow, inserts a conditional "Authenticate to Docker Hub" login step, propagates credentials into nightly E2E jobs (blanking for untrusted dispatches), updates checkout settings, and extends tests and types for the new fields. ChangesDocker Hub authentication for nightly E2E
Sequence Diagram(s) sequenceDiagram
participant NightlyWorkflow
participant E2EReusableWorkflow
participant DockerHub
NightlyWorkflow->>E2EReusableWorkflow: call e2e-script with conditional DOCKERHUB_USERNAME/DOCKERHUB_TOKEN
E2EReusableWorkflow->>DockerHub: docker login docker.io (token-stdin) [if credentials present]
E2EReusableWorkflow-->>NightlyWorkflow: continue (anonymous pulls) [if credentials missing]
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Suggested labels
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
E2E Advisor RecommendationRequired E2E: None Full advisor summaryE2E Recommendation AdvisorFailed: Could not parse JSON from advisor output; see /home/runner/work/NemoClaw/NemoClaw/artifacts/e2e-advisor/e2e-advisor-raw-output.txt |
E2E Scenario Advisor RecommendationRequired scenario E2E: None Full scenario advisor summaryE2E Scenario AdvisorFailed: Could not parse JSON from advisor output; see /home/runner/work/NemoClaw/NemoClaw/artifacts/e2e-advisor/e2e-scenario-advisor-raw-output.txt |
PR Review AdvisorFindings: 0 needs attention, 2 worth checking, 0 nice ideas Review findings🛠️ Needs attention
🔎 Worth checking
🌱 Nice ideas
Since last review detailsCurrent findings:
This is an automated advisory review. A human maintainer must make the final merge decision. |
Selective E2E Results — ✅ All requested jobs passedRun: 26858264433
|
|
Validation update: targeted nightly dispatch for |
Selective E2E Results — ✅ All requested jobs passedRun: 26858306848
|
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
test/e2e-script-workflow.test.ts (1)
101-117: ⚡ Quick winTighten this auth-step contract so it catches malformed
runblocks.This loop still passes when an unrelated YAML key gets absorbed into the shell script, which happened in several nightly jobs here. A small negative assertion would turn that regression into an immediate test failure.
Suggested fix
expect(authStep?.env?.DOCKERHUB_TOKEN, name).toBe( "${{ (github.event_name != 'workflow_dispatch' || inputs.target_ref == '') && secrets.DOCKERHUB_TOKEN || '' }}", ); expect(authStep?.run, name).toContain("docker login docker.io"); + expect(authStep?.run, name).not.toContain("persist-credentials:");🤖 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 `@test/e2e-script-workflow.test.ts` around lines 101 - 117, The loop's assertion is too weak because a YAML key can be accidentally embedded into the step's run script; update the check for the "Authenticate to Docker Hub" step (found via nightlyWorkflow.jobs[name].steps?.find(...) into authStep for each name in directE2eJobs) to include a negative assertion that authStep.run does not contain stray YAML keys (e.g., ensure authStep.run does NOT include substrings like "uses:" or "with:" or "env:"), so malformed runs that swallowed nearby YAML will fail the test.
🤖 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/nightly-e2e.yaml:
- Around line 1706-1723: In the "Authenticate to Docker Hub" step (and the four
additional similar steps), remove the stray "persist-credentials: false" lines
that are currently inside the run: | bash block so they are not executed as
shell commands; instead, either delete those lines entirely or move
"persist-credentials: false" out of the run block to be a top-level step key
(i.e., directly under the step alongside name/if/env/shell/run) so it is treated
as a workflow step option rather than a bash command.
---
Nitpick comments:
In `@test/e2e-script-workflow.test.ts`:
- Around line 101-117: The loop's assertion is too weak because a YAML key can
be accidentally embedded into the step's run script; update the check for the
"Authenticate to Docker Hub" step (found via
nightlyWorkflow.jobs[name].steps?.find(...) into authStep for each name in
directE2eJobs) to include a negative assertion that authStep.run does not
contain stray YAML keys (e.g., ensure authStep.run does NOT include substrings
like "uses:" or "with:" or "env:"), so malformed runs that swallowed nearby YAML
will fail the test.
🪄 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: 732e0bcb-9b0f-4814-bc6a-6eaeb0205b35
📒 Files selected for processing (4)
.github/workflows/e2e-script.yaml.github/workflows/nightly-e2e.yamltest/e2e-script-workflow.test.tstest/helpers/e2e-workflow-contract.ts
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
Selective E2E Results — ✅ All requested jobs passedRun: 26864149265
|
|
Addressed review feedback in 2546a56:
Validation after the fix:
|
Selective E2E Results — ✅ All requested jobs passedRun: 26864234883
|
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
Selective E2E Results — ✅ All requested jobs passedRun: 26865738263
|
|
DRYed up the large nightly workflow diff in 359e182 by using YAML anchors/aliases:
Net PR diff is now much smaller: Validation after DRY-up:
|
Summary
Adds Docker Hub authentication to the nightly E2E workflow before install/onboard/sandbox-build steps can pull Docker Hub base images. This supersedes #3668 on top of the current reusable E2E workflow structure and keeps credentials out of workflow_dispatch runs that test an explicit target_ref.
Related Issue
Fixes #3629
Changes
DOCKERHUB_USERNAMEandDOCKERHUB_TOKENsecrets to.github/workflows/e2e-script.yamland logs in before reusable E2E scripts run.docs-validation-e2e,double-onboard-e2e, GPU jobs, and other non-reusable jobs that can install or build sandboxes.Type of Change
Verification
npx prek run --all-filespassesnpm testpassesnpm run docsbuilds without warnings (doc changes only)Signed-off-by: Carlos Villela cvillela@nvidia.com
Summary by CodeRabbit
Chores
Tests