Skip to content

ci: save mini-CTK cache only on default branch - #3073

Closed
aryanputta wants to merge 3 commits into
NVIDIA:mainfrom
aryanputta:codex/3071-mini-ctk-cache-save
Closed

aryanputta wants to merge 3 commits into
NVIDIA:mainfrom
aryanputta:codex/3071-mini-ctk-cache-save

Conversation

@aryanputta

@aryanputta aryanputta commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

Change

Issue #3071 reports 18.23 GiB of mini-CTK caches, with 13.37 GiB on PR refs. Saving only on the default branch should reduce that buildup over time; this patch does not delete existing caches.

The save condition is:

if: ${{ !cancelled() &&
        github.ref == format('refs/heads/{0}', github.event.repository.default_branch) &&
        steps.ctk-get-cache.outputs.cache-hit != 'true' }}

Restore behavior and downloads on cache misses are unchanged.

Checks

  • python3 -m pytest -q ci/tools/tests/test_ctk_cache_save_gate.py (2 passed)
  • ruff check ci/tools/tests/test_ctk_cache_save_gate.py
  • ruff format --check ci/tools/tests/test_ctk_cache_save_gate.py
  • python3 toolshed/check_spdx.py ci/tools/tests/test_ctk_cache_save_gate.py
  • PyYAML parse of .github/actions/fetch_ctk/action.yml
  • git diff --check

Signed-off-by: Aryan <aryansputta@gmail.com>
Signed-off-by: Aryan <aryansputta@gmail.com>
@copy-pr-bot

copy-pr-bot Bot commented Oct 11, 2026

Copy link
Copy Markdown
Contributor

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.

@github-actions github-actions Bot added the CI/CD CI/CD infrastructure label Oct 11, 2026
Signed-off-by: Aryan <aryansputta@gmail.com>
@aryanputta
aryanputta marked this pull request as ready for review October 11, 2026 04:11
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-11T04:13:46.490737Z b01fb5a Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Oct 11, 2026

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: NVIDIA/cuda-python/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Enterprise
  • Run ID: 5b53ebdb-a0bc-4d11-b6d1-7323623bfaff

📥 Commits

Reviewing files that changed from the base of the PR and between c7e6f09 and b01fb5a.


📒 Files selected for processing (2)
  • .github/actions/fetch_ctk/action.yml
  • ci/tools/tests/test_ctk_cache_save_gate.py

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 11 remain after this review.



📝 Summary

Summary by CodeRabbit

  • Bug Fixes
    • CTK cache uploads are now limited to non-cancelled workflow runs on the repository’s default branch when there is no cache hit. Cache fetching and restoration behavior remain unchanged.

Walkthrough

The CTK cache upload condition now requires a non-cancelled run on the configured default branch with a cache miss. Regression tests check default and non-default refs, cancellation, and cache-hit outputs.

Changes

CTK cache upload gate

Layer / File(s) Summary
Default-branch cache upload gate
.github/actions/fetch_ctk/action.yml, ci/tools/tests/test_ctk_cache_save_gate.py
The upload condition now requires the configured default-branch ref. Regression tests cover the upload gate and confirm that the fetch and restore conditions remain unchanged.

Suggested reviewers: mdboom


Priority: ➖ Normal

Change: Bug fix

Merge Risk: ⚪ Minimal · up to b01fb

No actionable merge-blocking risk remains; the cache-upload change is ready for normal checks.

✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Commit to this branch
  • Create a new PR

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@rwgk

rwgk commented Oct 11, 2026

Copy link
Copy Markdown
Contributor

Sorry I didn't update the issue: it turns out, this isn't what we want to do.

I created the issue to clearly document the idea for the team, then there were some discussions that took us in another direction. I didn't get to updating the issue accordingly (I didn't think it's a priority).

Creating PRs isn't a bottleneck anymore, at all. Discussions around them and reviews usually consume far more time. I don't recommend jumping on infrastructure issues, these tend to require a lot of internal background.

@rwgk rwgk closed this Oct 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI/CD CI/CD infrastructure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants