ci: add docker build in the pipeline to use with a basic k8s install test#345
Conversation
|
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 (2)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughAdds CPU smoke image build and kind-based Kubernetes smoke test CI jobs gated by ChangesCPU Smoke Test CI Pipeline
E2E Secret Cleanup Robustness
Suggested Reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
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 @.github/workflows/docker-cpu-smoketest.yaml:
- Around line 59-60: The actions/checkout action in the workflow is missing the
persist-credentials configuration, which causes git credentials to remain in the
runner environment unnecessarily. Add the input parameter persist-credentials:
false to the checkout action to disable credential persistence since no
subsequent git operations require these credentials.
🪄 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: cb4b005e-4867-4565-9147-9bd912e15022
📒 Files selected for processing (1)
.github/workflows/docker-cpu-smoketest.yaml
|
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
.github/workflows/docker-cpu-smoketest.yaml (1)
49-52:⚠️ Potential issue | 🟠 Major | ⚡ Quick winScope token permissions per job (least privilege).
At Line 49-52,
packages: writeis granted workflow-wide, sokind-smokeinherits write access it does not need. Keeppackages: writeonly onbuild-cpu-images; use read-only (or no packages permission) forkind-smoke.Suggested patch
permissions: contents: read - packages: write + packages: read jobs: build-cpu-images: + permissions: + contents: read + packages: write @@ kind-smoke: + permissions: + contents: read + packages: read🤖 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/docker-cpu-smoketest.yaml around lines 49 - 52, The workflow currently grants `packages: write` permission at the workflow level, which means all jobs including `kind-smoke` inherit unnecessary write access to packages. Move the `permissions` block from the workflow root level to be job-specific: add `permissions` with `contents: read` and `packages: write` only to the `build-cpu-images` job, and add a separate `permissions` block to the `kind-smoke` job with only `contents: read` (removing or not including `packages` permission). This follows the principle of least privilege by ensuring each job only has the permissions it actually needs.
♻️ Duplicate comments (1)
.github/workflows/docker-cpu-smoketest.yaml (1)
67-68:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winDisable credential persistence in both checkout steps.
actions/checkoutshould setpersist-credentials: falseat Line 67 and Line 172 to avoid retaining repo credentials in runner git config.Suggested patch
- name: Checkout code uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + with: + persist-credentials: false @@ - name: Checkout code uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + with: + persist-credentials: falseAlso applies to: 172-173
🤖 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/docker-cpu-smoketest.yaml around lines 67 - 68, The actions/checkout steps are not disabling credential persistence, which can leave repository credentials in the runner's git config. Add persist-credentials: false to both the checkout step at lines 67-68 and the checkout step at lines 172-173 to ensure credentials are not retained after the workflow completes.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.
Outside diff comments:
In @.github/workflows/docker-cpu-smoketest.yaml:
- Around line 49-52: The workflow currently grants `packages: write` permission
at the workflow level, which means all jobs including `kind-smoke` inherit
unnecessary write access to packages. Move the `permissions` block from the
workflow root level to be job-specific: add `permissions` with `contents: read`
and `packages: write` only to the `build-cpu-images` job, and add a separate
`permissions` block to the `kind-smoke` job with only `contents: read` (removing
or not including `packages` permission). This follows the principle of least
privilege by ensuring each job only has the permissions it actually needs.
---
Duplicate comments:
In @.github/workflows/docker-cpu-smoketest.yaml:
- Around line 67-68: The actions/checkout steps are not disabling credential
persistence, which can leave repository credentials in the runner's git config.
Add persist-credentials: false to both the checkout step at lines 67-68 and the
checkout step at lines 172-173 to ensure credentials are not retained after the
workflow completes.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: a80def08-e567-415c-9f98-2317406b171d
📒 Files selected for processing (1)
.github/workflows/docker-cpu-smoketest.yaml
…test Signed-off-by: Brooke Storm <brookes@nvidia.com>
Signed-off-by: Brooke Storm <brookes@nvidia.com>
Signed-off-by: Brooke Storm <brookes@nvidia.com>
Signed-off-by: Brooke Storm <brookes@nvidia.com>
Signed-off-by: Brooke Storm <brookes@nvidia.com>
Signed-off-by: Brooke Storm <brookes@nvidia.com>
Signed-off-by: Brooke Storm <brookes@nvidia.com>
Signed-off-by: Brooke Storm <brookes@nvidia.com>
Signed-off-by: Brooke Storm <brookes@nvidia.com>
Signed-off-by: Brooke Storm <brookes@nvidia.com>
7ba1266 to
db71c2a
Compare
|
@coderabbitai resume |
✅ Action performedReviews resumed. |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 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/ci.yaml:
- Around line 23-27: Remove the `packages: read` line from the top-level
permissions block in the workflow file unless another job that does not override
permissions requires GHCR access. Since the image jobs already declare their own
`packages: write/read` permissions at the job level, they do not need the
top-level grant, and keeping it violates the principle of least privilege by
granting package read access to all jobs unnecessarily.
- Around line 119-120: The checkout actions in the GitHub Actions workflow are
not disabling persisted credentials, which is a security risk. Add
`persist-credentials: false` to the `actions/checkout` step at lines 119-120 in
.github/workflows/ci.yaml. Also add the same `persist-credentials: false`
parameter to the checkout step at lines 235-236 in .github/workflows/ci.yaml.
This prevents the job token from being stored in .git/config and accessible to
subsequent build/test steps.
In `@e2e/test_jobs.py`:
- Around line 258-259: The deletion verification in the test_jobs.py file (lines
258-259) only checks if the secret is absent from the first page of list
results, but the list endpoint has a default page_size of 10, so the secret
could still exist on other pages. Replace this pagination-fragile check with a
retrieve-after-delete verification instead. After deleting the secret, attempt
to retrieve it directly using sdk.secrets.retrieve() and verify that it raises
an appropriate error or exception (expecting failure), which definitively
confirms the secret no longer exists rather than relying on page-based list
absence.
🪄 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: aa9ce9ca-a11c-4d02-a0b7-4f4f6088e5d1
📒 Files selected for processing (7)
.github/actions/changes/action.yaml.github/workflows/ci.yamle2e/k8s/scripts/install_helm_e2e.she2e/k8s/scripts/install_nmp_auth_e2e.she2e/k8s/scripts/install_nmp_e2e.she2e/k8s/scripts/install_rustfs.she2e/test_jobs.py
💤 Files with no reviewable changes (2)
- e2e/k8s/scripts/install_rustfs.sh
- e2e/k8s/scripts/install_nmp_e2e.sh
Signed-off-by: Brooke Storm <brookes@nvidia.com>
Signed-off-by: Brooke Storm <brookes@nvidia.com>
Signed-off-by: Brooke Storm <brookes@nvidia.com>
This is a work in progress, but in order to set up k8s testing in pipeline that should prevent breakage we also need to be able to do a basic docker build of smaller containers in the pipeline.
This should combine both into a tidy little smoke test.
Summary by CodeRabbit
Release Notes
New Features
k8s-smoke) and used it to gate CPU smoke CI.Bug Fixes
Refactor