Update pnpm store cache-keys to include compat-workspaces pnpm-lock.yaml#27221
Update pnpm store cache-keys to include compat-workspaces pnpm-lock.yaml#27221
Conversation
ADO's checkout step doesn't support runtime macro variables in the ref
position (only compile-time template expressions work), so the previous
approach of setting `ref: ${{ parameters.fluidFrameworkSourceVersion }}`
was rejected by the pipeline parser.
Work around this by doing an unconditional `checkout: self` followed by a
bash step that fetches the specific commit (with --depth=1 so we don't pull
full history) and then checks it out. The source version is passed via an
env variable so ADO expands the macro at runtime before bash sees it.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Hi! Thank you for opening this PR. Want me to review it? Based on the diff (126 lines, 7 files), I've queued these reviewers:
How this works
|
| # Set up Docker environment if running against docker | ||
| - ${{ if eq(parameters.runAgainstDocker, true) }}: | ||
| # Checks out FluidFramework repo | ||
| - checkout: self |
There was a problem hiding this comment.
the "self" -> "same version as pipeline artifact" is technically a behavior change. But pretty sure it's one we want (rather than possibly version skew the test workload and the docker environment)
There was a problem hiding this comment.
Pull request overview
Updates Azure Pipelines cache keying and source checkout behavior for real-service and stress test pipelines so pnpm store caching correctly accounts for compat lockfiles and aligns the FluidFramework repo checkout with the triggering build’s source commit.
Changes:
- Pass
fluidFrameworkSourceVersion: $(resources.pipeline.client.sourceCommit)into real-service and stress test template invocations. - Extend
include-install-pnpm.ymlto support anadditionalCacheKeysegment (used to hash the compat-workspaces lockfile into the pnpm store cache key). - Update
include-test-real-service.ymlto checkoutselfand switch the repo to the specifiedfluidFrameworkSourceVersion, and remove the legacy compat-install caching path.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tools/pipelines/test-service-clients.yml | Passes through the triggering build’s commit to the test template. |
| tools/pipelines/test-real-service.yml | Passes through the triggering build’s commit; removes legacy compat install caching parameter usage. |
| tools/pipelines/test-real-service-stress.yml | Passes through the triggering build’s commit to the test template. |
| tools/pipelines/test-dds-stress.yml | Passes through the triggering build’s commit into the conditional stress-test template. |
| tools/pipelines/templates/include-test-real-service.yml | Adds fluidFrameworkSourceVersion parameter, switches repo checkout to that ref, and keys pnpm cache on compat lockfile. |
| tools/pipelines/templates/include-install-pnpm.yml | Adds additionalCacheKey support to pnpm store Cache@2 key composition. |
| tools/pipelines/templates/include-conditionally-run-stress-tests.yml | Threads fluidFrameworkSourceVersion into downstream real-service test stages. |
alexvy86
left a comment
There was a problem hiding this comment.
One small thing but otherwise seems good.
Description
Follow-up to #27186 which updates the cache keys we use for pnpm module stores to better reflect the new status of installing at the repo root where appropriate (i.e. compat testing dependencies now are always installed).
Test build links:
e2e tests
stress tests