-
Notifications
You must be signed in to change notification settings - Fork 401
gmanal - test change #9277
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
gmanal
wants to merge
4
commits into
NVIDIA:main
Choose a base branch
from
gmanal:test-nvcr-pull
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+76
−0
Open
gmanal - test change #9277
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,76 @@ | ||
| # nvcr.io image pull + size — single-job smoke test. | ||
| # | ||
| # Pulls a specific nvcr.io image and reports its on-disk size. Does | ||
| # not include `docker login` — relies on whatever credentials the | ||
| # runner is configured with (the Packer-baked NGC pull-secret on | ||
| # nv-gha-runners, if present). A failure with an auth error is | ||
| # itself useful signal that the runner is not pre-configured for | ||
| # the target namespace. | ||
| # | ||
| # Triggers: same as `secret-scan.yml` — copy-pr-bot mirror branches | ||
| # (`pull-request/[0-9]+`) on NVIDIA/cccl + workflow_dispatch. | ||
|
|
||
| name: nvcr image pull + size | ||
|
|
||
| run-name: nvcr pull — ${{ github.ref_name }} | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - "pull-request/[0-9]+" | ||
| workflow_dispatch: | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-on-${{ github.event_name }}-from-${{ github.ref_name }} | ||
| cancel-in-progress: true | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| pull-and-size: | ||
| name: docker pull + size | ||
| # NV self-hosted CPU runner on NVIDIA/cccl; GitHub-hosted fallback | ||
| # on contributor forks where nv-gha-runners labels do not resolve. | ||
| runs-on: ${{ github.repository == 'NVIDIA/cccl' && 'linux-amd64-cpu4' || 'ubuntu-latest' }} | ||
| # Cap stuck pulls / registry hangs so a wedged job doesn't sit on a | ||
| # self-hosted runner indefinitely. 15 min covers a multi-GB image | ||
| # pull on a busy runner with headroom; well under GitHub's default | ||
| # 6-hour job timeout. | ||
| timeout-minutes: 15 | ||
| env: | ||
| NVCR_IMAGE: nvcr.io/nvidian/prodsec/pulse-trufflehog:1.33 | ||
|
|
||
| steps: | ||
| - name: docker pull | ||
| run: docker pull "${NVCR_IMAGE}" | ||
|
|
||
| - name: Report size | ||
| run: | | ||
| set -euo pipefail | ||
| bytes=$(docker image inspect "${NVCR_IMAGE}" --format '{{.Size}}') | ||
| mib=$(awk -v b="${bytes}" 'BEGIN { printf "%.1f", b/1024/1024 }') | ||
| gib=$(awk -v b="${bytes}" 'BEGIN { printf "%.2f", b/1024/1024/1024 }') | ||
| echo "Image: ${NVCR_IMAGE}" | ||
| echo "Size: ${bytes} bytes (${mib} MiB / ${gib} GiB)" | ||
|
|
||
| - name: Cleanup | ||
| if: always() | ||
| # Only attempt removal if the image is actually present locally. | ||
| # If the pull failed (e.g. auth error on a private namespace), | ||
| # `docker rmi` would fail with "no such image" — that's expected, | ||
| # not a real disk-growth signal, so we skip silently. If the | ||
| # image IS present and `rmi` fails, that's a genuine problem on | ||
| # a self-hosted runner (leaks layers across runs) — surface as | ||
| # a warning so it shows up in the run log. | ||
| run: | | ||
| set -euo pipefail | ||
| if ! docker image inspect "${NVCR_IMAGE}" >/dev/null 2>&1; then | ||
| echo "cleanup: image not present locally (likely pull failed); nothing to remove" | ||
| exit 0 | ||
| fi | ||
| if ! docker rmi "${NVCR_IMAGE}" >/dev/null 2>&1; then | ||
| echo "::warning::cleanup: failed to remove ${NVCR_IMAGE} from runner cache; manual cleanup may be needed to avoid disk growth on this runner" | ||
| else | ||
| echo "cleanup: removed ${NVCR_IMAGE}" | ||
| fi | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: NVIDIA/cccl
Length of output: 247
🏁 Script executed:
Repository: NVIDIA/cccl
Length of output: 2871
important: Pin
NVCR_IMAGEto an immutable digest instead of the mutable:1.33tag to keep the workflow reproducible and strengthen supply-chain trust (line 37).timeout-minutestojobs.pull-and-sizeand avoid masking cleanup failures (docker rmi ... || true) so self-hosted runner hygiene issues don’t get hidden (lines 31-37, 52-54).