Skip to content

Update pnpm store cache-keys to include compat-workspaces pnpm-lock.yaml#27221

Open
Abe27342 wants to merge 8 commits intomainfrom
test/absander/update-pnpm-cache-keys
Open

Update pnpm store cache-keys to include compat-workspaces pnpm-lock.yaml#27221
Abe27342 wants to merge 8 commits intomainfrom
test/absander/update-pnpm-cache-keys

Conversation

@Abe27342
Copy link
Copy Markdown
Contributor

@Abe27342 Abe27342 commented May 1, 2026

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

Abram Sanderson (He/Him) and others added 6 commits May 1, 2026 12:57
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>
Copilot AI review requested due to automatic review settings May 1, 2026 22:31
@Abe27342 Abe27342 changed the title Test/absander/update pnpm cache keys Update pnpm store cache-keys to include compat-workspaces pnpm-lock.yaml May 1, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 1, 2026

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:

  • Correctness — logic errors, race conditions, lifecycle issues
  • Security — vulnerabilities, secret exposure, injection
  • API Compatibility — breaking changes, release tags, type design
  • Performance — algorithmic regressions, memory leaks
  • Testing — coverage gaps, hollow tests

How this works

  • Adjust the reviewer set by ticking/unticking boxes above. Reviewer toggles alone don't trigger anything.

  • Tick Start review below to dispatch the review fleet.

  • After review finishes, tick Start review again to request another run — it auto-resets after each dispatch.

  • This comment updates as new commits land; your reviewer selections are preserved.

  • Start review

# Set up Docker environment if running against docker
- ${{ if eq(parameters.runAgainstDocker, true) }}:
# Checks out FluidFramework repo
- checkout: self
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.yml to support an additionalCacheKey segment (used to hash the compat-workspaces lockfile into the pnpm store cache key).
  • Update include-test-real-service.yml to checkout self and switch the repo to the specified fluidFrameworkSourceVersion, 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.

Comment thread tools/pipelines/templates/include-test-real-service.yml Outdated
Comment thread tools/pipelines/templates/include-test-real-service.yml Outdated
Copy link
Copy Markdown
Contributor

@alexvy86 alexvy86 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One small thing but otherwise seems good.

Comment thread tools/pipelines/templates/include-install-pnpm.yml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants