Repository navigation
[CI] Fix Go dependency cache path - #40777
Merged
damccorm merged 2 commits intoOct 30, 2026
Merged
Conversation
bvolpato
marked this pull request as ready for review
October 30, 2026 02:46
Contributor
|
Assigning reviewers: R: @damccorm added as fallback since no labels match configuration Note: If you would like to opt out of this review, comment Available commands:
The PR bot will only process comments in the main thread (not review comments). |
Contributor
There was a problem hiding this comment.
📋 Review Summary
This PR fixes a typo ($${{ ... }}) in the setup-environment-action composite GitHub Action that caused actions/setup-go to look for $sdks/go.sum instead of sdks/go.sum, preventing the Go dependency cache from being restored or saved.
🔍 General Feedback
- Directly setting
cache-dependency-path: sdks/go.sumresolves the path resolution failure inactions/setup-go@v6and aligns withinputs.disable-cachebeing scoped specifically to the Gradle cache. The change is clean and ready to merge.
💡 Tip: Comment /gemini review on this pull request to trigger a new Gemini code review.
damccorm
reviewed
Oct 30, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The shared setup action passes
$sdks/go.sumto setup-go. That path does not exist, so dependency hashing fails and the Go cache is neither restored nor saved (example job).Set
cache-dependency-pathtosdks/go.sumso setup-go can hash the checksum file and restore or save its Go cache. This allows later jobs to reuse cached Go dependencies.Honor the cache opt-out through setup-go's
cacheinput:${{ inputs.disable-cache != 'true' }}. Go caching remains enabled by default, anddisable-cache: truedisables it along with Gradle caching. The action input description now documents both caches. An empty dependency path does not disable caching, so the checksum path remains explicit.Validated the parsed action input with setup-go's actual
@actions/globhashing utility: the old path produces no hash and the corrected path resolves the module checksum file. GitHub's@actions/expressionsevaluator confirms that the cache is disabled fortrueand enabled forfalse, empty, or unset input. YAML parsing andgit diff --checkpass. Hosted cache restoration remains for CI to verify.