Skip to content

build: mount token secret for apptainer dependency download - #3860

Merged
kajalj22 merged 5 commits into
mainfrom
kajalj/apptainer-github-token
Sep 2, 2026
Merged

build: mount token secret for apptainer dependency download#3860
kajalj22 merged 5 commits into
mainfrom
kajalj/apptainer-github-token

Conversation

@kajalj22

@kajalj22 kajalj22 commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Summary

sbsa (arm64) builds fail with HTTP 429 fetching Apptainer's e2fsprogs patches during the custom-setup step, due to GitHub's unauthenticated per-IP rate limit (60/hr) on the shared CI runner.

Apptainer's own scripts/download-dependencies (run by install_apptainer.sh's arm64 source build) supports an authenticated fallback via $GITHUB_TOKEN. This mounts that secret into the custom-setup RUN step.

The secret id is APPTAINER_GITHUB_TOKEN (not the generic GITHUB_TOKEN), so it's structurally clear this slot expects a dedicated, minimally-scoped credential (public-repo, read-only) rather than a broader-scope org token. The env var exposed inside the RUN step stays GITHUB_TOKEN, since that's the literal name Apptainer's upstream script checks for.

Pairs with dl/JoC/nemo-ci!2850, which forwards APPTAINER_GITHUB_TOKEN as this buildx secret.

Verification

Manual pipeline run on both paired branches (single nightly test, cw_dfw, forced fresh build): https://gitlab-master.nvidia.com/dl/JoC/nemo-ci/-/pipelines/65781582

Test plan

  • Verify arm64 image build succeeds with the secret supplied
  • Confirm no HTTP 429 in the apptainer dependency download step

Apptainer's own scripts/download-dependencies already supports
GITHUB_TOKEN for authenticated GitHub API patch downloads, avoiding
the unauthenticated per-IP rate limit (60/hr) that was failing sbsa
(arm64) builds with HTTP 429 while fetching e2fsprogs patches.

Mount the GITHUB_TOKEN secret (forwarded by nemo-ci CI) into the
custom-setup RUN step so install_apptainer.sh's arm64 source build
picks it up.

Signed-off-by: Kajal Jain <kajalj@nvidia.com>
@kajalj22
kajalj22 requested a review from a team as a code owner August 26, 2026 22:08
@copy-pr-bot

copy-pr-bot Bot commented Aug 26, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

Use a purpose-named secret id instead of the generic GITHUB_TOKEN, so
it's structurally clear this slot expects a dedicated, minimally
scoped (public-repo, read-only) credential rather than inviting reuse
of a broader-scope org GitHub token.

The env var exposed inside the RUN step stays GITHUB_TOKEN since
that's what Apptainer's own scripts/download-dependencies checks for.

Signed-off-by: Kajal Jain <kajalj@nvidia.com>
@kajalj22

kajalj22 commented Sep 2, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test c1c0f4d

@kajalj22 kajalj22 added the CI:L1 Run doctests, unit tests, and functional tests label Sep 2, 2026
@kajalj22

kajalj22 commented Sep 2, 2026

Copy link
Copy Markdown
Contributor Author

Tests also failing on the main branch - not due to this PR

@kajalj22

kajalj22 commented Sep 2, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test d7ad24c

@kajalj22 kajalj22 changed the title build: mount GITHUB_TOKEN secret for apptainer dependency download build: mount token secret for apptainer dependency download Sep 2, 2026
@kajalj22
kajalj22 merged commit a952905 into main Sep 2, 2026
37 checks passed
@kajalj22
kajalj22 deleted the kajalj/apptainer-github-token branch September 2, 2026 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI:L1 Run doctests, unit tests, and functional tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants