Skip to content

fix(ci): allow local Go cache for fork pull requests - #5098

Merged
turip merged 1 commit into
mainfrom
feat/ci-fork-go-cache-fallback
Sep 7, 2026
Merged

turip merged 1 commit into
mainfrom
feat/ci-fork-go-cache-fallback

Conversation

@turip

@turip turip commented Sep 7, 2026 •

Copy link
Copy Markdown
Member

Summary

  • keep the Depot Go cache assertion for pushes and pull requests originating from this repository
  • skip that assertion for external fork pull requests, where GOCACHEPROG is not exposed, and let Go use its local cache
  • keep runner tool verification unconditional

Root cause

The CI optimization in #5072 made the Depot Go cache assertion fatal in all pull request contexts. External fork runs receive the same upstream Go toolchain but do not receive GOCACHEPROG, so build, lint, test, generator, SDK, and migration jobs stopped before performing their actual work.

Validation

  • full external-fork CI passed on Feat/pr 5084 ci validation #5097, including build, lint, test, generators, SDK, migrations, container images, Quickstart, and both E2E variants
  • git diff --check passed
  • actionlint reports only the three existing repository-template references using $/.github/workflows/...; this change introduces no new workflow lint findings

No Jira ticket.

Greptile Summary

This PR allows external fork pull requests to use Go's local cache while preserving Depot cache enforcement for pushes and same-repository pull requests.

  • Applies the fork-aware condition consistently to all ten Depot Go cache verification steps.
  • Separates runner-tool verification so it remains unconditional.
  • Preserves existing build, generator, SDK, test, migration, lint, Quickstart, and E2E job behavior outside the cache assertion.

Confidence Score: 5/5

The PR appears safe to merge, with the fork-specific cache fallback applied consistently across all affected jobs.

No actionable failures were found; the condition matches established workflow patterns, covers every relevant cache assertion, and preserves unconditional runner-tool validation.

Important Files Changed

Filename Overview
.github/workflows/ci.yaml Consistently skips Depot Go cache assertions for fork pull requests while keeping runner-tool verification unconditional.

Reviews (1): Last reviewed commit: "fix(ci): allow local Go cache for fork p..." | Re-trigger Greptile

Summary by CodeRabbit

  • CI Improvements
    • Improved validation behavior for pull requests from external repositories.
    • Runner tool checks now run independently, while cache verification is limited to trusted sources.

@turip
turip requested a review from a team as a code owner September 7, 2026 16:19
@turip turip added the kind/bug Something isn't working label Sep 7, 2026
@coderabbitai

coderabbitai Bot commented Sep 7, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Team

Run ID: 11a2e7bd-4db2-47b7-90fb-8eaa89174c6d

📥 Commits

Reviewing files that changed from the base of the PR and between ea4d771 and cf8e237.

📒 Files selected for processing (1)
  • .github/workflows/ci.yaml

Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review.


📝 Walkthrough

Walkthrough

The CI workflow now skips Depot Go cache verification for fork pull requests. The OpenAPI generator job runs its yq --version check independently and unconditionally.

Changes

CI cache verification

Layer / File(s) Summary
Trusted-source cache guards
.github/workflows/ci.yaml
Depot Go cache checks across CI jobs now run only for pushes or pull requests from the same repository.
Runner tools verification
.github/workflows/ci.yaml
The OpenAPI generator job runs yq --version in a separate step without the cache-check condition.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to cf8e2

Fork pull requests can now use Go's local cache without failing Depot cache assertions, while trusted-source cache checks and runner tool validation remain in place. The change is ready to merge.

Suggested reviewers: chrisgacsal, tothandras, galexihu

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main CI change: allowing fork pull requests to use the local Go cache.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/ci-fork-go-cache-fallback

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@turip
turip merged commit ef2ebbe into main Sep 7, 2026
31 of 33 checks passed
@turip
turip deleted the feat/ci-fork-go-cache-fallback branch September 7, 2026 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants