Skip to content

ci(license): skip license cache warm-up when cache is already hit - #1709

Merged
paralta merged 1 commit into
mainfrom
ci/slow-license-job
Jun 26, 2026
Merged

paralta merged 1 commit into
mainfrom
ci/slow-license-job

Conversation

@paralta

@paralta paralta commented Jun 26, 2026

Copy link
Copy Markdown
Member

The license:cache step in the CI license job was running unconditionally on every PR — even when the actions/cache restore was a full hit and all .licensei.cache files were already up to date. This meant licensei cache was invoked sequentially across all Go modules for no reason, adding unnecessary minutes to the job. A good example of this happening is this run on PR #1708, where no dependencies were changed but the cache warm-up step still ran in full.

The fix adds an id to the cache restore step so its cache-hit output can be referenced, then gates the warm-up step behind if: steps.license-cache.outputs.cache-hit != 'true'. When the cache is cold (e.g. after a go.sum change), behavior is unchanged.

@github-actions github-actions Bot added the size/XS Denotes a PR that changes 0-49 lines label Jun 26, 2026
@codecov

codecov Bot commented Jun 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@paralta
paralta marked this pull request as ready for review June 26, 2026 13:46
@paralta
paralta requested a review from a team as a code owner June 26, 2026 13:46
@paralta
paralta merged commit af40ed0 into main Jun 26, 2026
33 checks passed
@paralta
paralta deleted the ci/slow-license-job branch June 26, 2026 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/XS Denotes a PR that changes 0-49 lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants