Add yarn caching to workflows that install yarn dependencies#17680
Add yarn caching to workflows that install yarn dependencies#17680
Conversation
… registry failures Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Docs ReviewThis PR adds yarn caching to all 13 GitHub Actions workflows and reorders checkout steps in 3 workflows where Infrastructure changesThe approach is technically sound and mirrors the fix applied in pulumi/registry#9953. A few notes:
Checkout step reordering in Potential concern: BUILD-AND-DEPLOY.mdPer repository review criteria, changes to SummaryNo issues with correctness, consistency, or approach. The PR is clean and focused. If you'd like an additional review or have follow-up questions, feel free to mention @claude. |
|
Your site preview for commit 7f8eac0 is ready! 🎉 http://www-testing-pulumi-docs-origin-pr-17680-7f8eac0d.s3-website.us-west-2.amazonaws.com. |
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Your site preview for commit 3c07de0 is ready! 🎉 http://www-testing-pulumi-docs-origin-pr-17680-3c07de01.s3-website.us-west-2.amazonaws.com. |
|
Your site preview for commit 3c07de0 is ready! 🎉 http://www-testing-pulumi-docs-origin-pr-17680-3c07de01.s3-website.us-west-2.amazonaws.com. |
There was a problem hiding this comment.
Pull request overview
Adds Yarn dependency caching to GitHub Actions workflows that install Node/Yarn dependencies, improving reliability by enabling offline installs when the cache is warm and ensuring lockfiles are available when cache keys are computed.
Changes:
- Added
cache: yarnpluscache-dependency-pathtoactions/setup-nodein workflows that runyarn installand/ormake ensure. - Reordered steps in select workflows to run
actions/checkoutbeforeactions/setup-nodeso lockfiles are present for cache key computation. - Included all relevant
yarn.lockpaths per workflow (including nested checkouts likedocs/andpulumi/where applicable).
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/update-search-index.yml | Moves checkout before setup-node and enables Yarn caching keyed on lockfiles. |
| .github/workflows/testing-build-and-deploy.yml | Enables Yarn caching keyed on lockfiles for the testing deploy workflow. |
| .github/workflows/scheduled-upgrade-programs.yml | Moves checkout earlier and enables Yarn caching keyed on lockfiles. |
| .github/workflows/scheduled-test.yml | Moves checkout + master fetch earlier and enables Yarn caching keyed on lockfiles. |
| .github/workflows/pulumi-cli.yml | Enables Yarn caching for the docs + pulumi repo multi-checkout workflow (includes both docs/ and pulumi/ lockfiles). |
| .github/workflows/pull-request.yml | Enables Yarn caching keyed on lockfiles for PR builds. |
| .github/workflows/esc-cli.yml | Enables Yarn caching keyed on lockfiles for the docs repo checkout under docs/. |
| .github/workflows/check-search-urls.yml | Enables Yarn caching keyed on lockfiles for the search URL checker workflow. |
| .github/workflows/check-links.yml | Enables Yarn caching keyed on lockfiles for the link checker workflow. |
| .github/workflows/build-and-deploy.yml | Enables Yarn caching keyed on lockfiles for production builds/deploys. |
* Add yarn caching to all GitHub Actions workflows to prevent transient registry failures Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * Remove yarn cache config from workflows that don't install yarn deps Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds
cache: 'yarn'toactions/setup-nodein the 10 workflows that actually runyarn installormake ensure, withcache-dependency-pathpointing at all four yarn.lock files in the repo. On cache hits, yarn runs fully offline, eliminating transient build failures caused by upstream registry errors (HTTP 500, etc.).Three workflows (
bucket-cleanup.yml,bucket-cleanup-testing.yml,pr-closed.yml) install Node but never call yarn, so they are left unchanged.For three workflows where
setup-nodeappeared beforeactions/checkout, the checkout step is moved earlier so the lockfiles are present when the cache key is computed.Mirrors the fix applied in pulumi/registry#9953.