Repository navigation
chore: use lookup-only cache check to skip deps job downloads - #26314
Merged
keithwillcode merged 11 commits intoDec 30, 2025
Merged
Conversation
The Install Dependencies / Yarn install & cache step in pr.yml is primarily for populating the cache when nothing is cached. When cache keys are found, we can skip the actual yarn install and let the workflow carry on quickly. This adds a skip-install-if-cache-hit parameter to the yarn-install action that allows skipping the install when node_modules cache is hit. This is enabled for the deps job in yarn-install.yml but not for other jobs that actually need node_modules for their work. Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>
Contributor
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Extends the skip-install-if-cache-hit parameter to the yarn-playwright-install action as well, so both yarn install and playwright install are skipped in the deps job when their respective caches are hit. Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
When skip-install-if-cache-hit is true, use actions/cache/restore@v4 with lookup-only: true to check if caches exist without downloading them. This avoids downloading ~1.2GB of cache data when we just want to verify caches exist in the deps job. The flow is now: 1. If skip-install-if-cache-hit is true, run lookup-only checks for all caches 2. If all caches hit, skip the entire restore + install flow (no downloads) 3. If any cache misses, fall back to normal restore + install + save behavior This optimization only applies when skip-install-if-cache-hit is set to true, so other jobs that need node_modules continue to work normally. Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>
keithwillcode
commented
Dec 30, 2025
…ps://git-manager.devin.ai/proxy/github.com/calcom/cal.com into devin/1767104829-skip-yarn-install-on-cache-hit
keithwillcode
commented
Dec 30, 2025
…ps://git-manager.devin.ai/proxy/github.com/calcom/cal.com into devin/1767104829-skip-yarn-install-on-cache-hit
keithwillcode
commented
Dec 30, 2025
keithwillcode
commented
Dec 30, 2025
Contributor
There was a problem hiding this comment.
2 issues found across 3 files
Prompt for AI agents (all issues)
Check if these issues are valid — if so, understand the root cause of each and fix them.
<file name=".github/actions/yarn-install/action.yml">
<violation number="1" location=".github/actions/yarn-install/action.yml:71">
P2: The lookup-only checks for `yarn-download-cache-check` and `yarn-install-state-cache-check` are performed but their results are never used. Only `yarn-nm-cache-check.outputs.cache-hit` is checked in conditions. Per the PR description ('If all caches hit, skip... If any cache misses, fall back...'), the condition should check all three caches, or the unused lookup-only steps should be removed to avoid wasted CI time.</violation>
</file>
<file name=".github/actions/yarn-playwright-install/action.yml">
<violation number="1" location=".github/actions/yarn-playwright-install/action.yml:31">
P1: The condition breaks backward compatibility. When `skip-install-if-cache-hit` is `'false'` (default), the first operand `inputs.skip-install-if-cache-hit != 'true'` is always true, so the install step runs unconditionally—ignoring the cache hit status from `playwright-cache`.
The condition should check `playwright-cache.outputs.cache-hit` in the default case:</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
keithwillcode
commented
Dec 30, 2025
keithwillcode
commented
Dec 30, 2025
keithwillcode
marked this pull request as draft
December 30, 2025 15:00
1. yarn-install: Add 'all-caches-check' step to compute whether all three caches hit (not just node_modules). This ensures we only bail out when everything is cached, matching the PR description. 2. yarn-playwright-install: Fix backward compatibility for install step. In default mode, check playwright-cache.outputs.cache-hit (the restore step). In skip mode, check playwright-cache-check.outputs.cache-hit (lookup-only). Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>
keithwillcode
marked this pull request as ready for review
December 30, 2025 15:14
anikdhabal
approved these changes
Dec 30, 2025
Contributor
Author
keithwillcode
deleted the
devin/1767104829-skip-yarn-install-on-cache-hit
branch
December 30, 2025 15:29
This was referenced Jan 8, 2026
This branch was successfully deployed
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.
What does this PR do?
Optimizes the "Install Dependencies / Yarn install & cache" step in pr.yml by using
lookup-onlycache checks to avoid downloading ~1.2GB of cache data when caches already exist.The deps job is primarily for populating the cache when nothing is cached. Previously, even when skipping installs, the cache restore steps would still download all cached data. Now, when
skip-install-if-cache-hit: "true"is set:actions/cache/restore@v4withlookup-only: trueto check if caches exist without downloadingThis adds a
skip-install-if-cache-hitparameter to both the yarn-install and yarn-playwright-install actions (defaulting to "false" for backward compatibility) and enables it only for the deps job in yarn-install.yml.Mandatory Tasks (DO NOT REMOVE)
How should this be tested?
Human Review Checklist
skip-install-if-cache-hit == 'true'skip-install-if-cache-hit == 'true' AND cache-hit == 'true'yarn-nm-cache-check(the lookup-only step) notyarn-nm-cache(the restore step)