[CLEAN] Synthetic Benchmark PR #26636 - feat: implement git checkout caching to speed up CI workflows#557
Open
ofir-frd wants to merge 1 commit intobase_pr_26636_20260120_4823from
Open
Conversation
|
Hey there and thank you for opening this pull request! 👋🏼 We require pull request titles to follow the Conventional Commits specification and it looks like your proposed title needs to be adjusted. Details: |
|
This PR has been marked as stale due to inactivity. If you're still working on it or need any help, please let us know or update the PR to keep it active. |
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.
Benchmark PR calcom#26636
Type: Clean (correct implementation)
Original PR Title: feat: implement git checkout caching to speed up CI workflows
Original PR Description: ## What does this PR do?
Implements git checkout caching to reduce CI workflow times by eliminating redundant git checkouts across parallel jobs.
Previously, every job in the PR workflow performed its own full git checkout (via
actions/checkout@v4+dangerous-git-checkout), resulting in 20+ separate checkouts per workflow run. This was particularly slow for the cal.com repo (~1.3GB).This PR:
cache-checkoutaction that saves/restores the git working directorypreparejob saves the checkout to cache afterdangerous-git-checkout.github(to access the action) then restore from cachegit-checkout-{branch}-{sha}to ensure cache is only reused within a single PRdelete-blacksmith-cache.yml)dangerous-git-checkoutto exclude/example-apps/and*.mp4files (~38MB saved from salesroom demo video)Expected impact: Reduces checkout time from ~10+ minutes per job to a fast cache restore, with only one full checkout per workflow run.
Link to Devin run: https://app.devin.ai/sessions/00c0c2b934dc40609aaf765ab206daaa
Requested by: @keithwillcode
Updates since last revision
github.head_ref || github.ref_nameandgithub.shainstead ofgithub.event.pull_request.head.ref/sha(the latter is not available in workflow_call contexts)git-checkout-${{ github.head_ref || github.ref_name }}-${{ github.sha }}useblacksmith/cache-delete@v1withprefix: "true")delete-blacksmith-cache.ymlto delete all git-checkout caches with the PR branch prefix when PR is closeddangerous-git-checkoutaction to excludeexample-apps/directory and all.mp4filesget_shastep andcommit-shaoutput that was accidentally removed when adding the cache-checkout step (this was breaking the ready-for-e2e label check)-to cache key prefix to prevent accidental deletion of other branches' caches (e.g., branchfeatureno longer deletes caches forfeature-2)Mandatory Tasks (DO NOT REMOVE)
How should this be tested?
This PR modifies CI infrastructure and can only be tested by running the actual workflows:
preparejob successfully deletes old caches and saves the checkout to cacheHuman Review Checklist
fail-on-cache-miss: trueis acceptable behavior (downstream jobs will fail if prepare job fails before caching).gitandnode_modulesgithub.head_ref || github.ref_nameandgithub.shaare available in all workflow_call contexts.githubis fast enough to be worthwhile vs. the previous approachConfirm prefix-based cache deletion (- Fixed by adding trailinggit-checkout-{branch}) won't accidentally delete unrelated caches-to prefixexample-apps/or the salesroom mp4 file/*,!/example-apps/,!**/*.mp4) work correctly in non-cone modeget_shastep andcommit-shaoutput are properly restored in pr.ymlChecklist
Original PR URL: feat: implement git checkout caching to speed up CI workflows calcom/cal.com#26636