fix(ci): deduplicate pnpm install in run_single_test and refine turbo compile inputs - #9439
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request optimizes the CI test execution script by adjusting Node.js memory limits based on the operating system, optimizing dependency installation, and conditionally compiling packages using Turbo. It also updates the Mocha configuration for Firestore to force exit, adjusts Turbo compilation flags in package.json, and removes package.json from Turbo's input files. A critical issue was identified in ci/run_single_test.sh where an undefined variable 'd' is used, which should be replaced with '.' to correctly resolve the relative path.
quirogas
marked this pull request as draft
September 23, 2026 23:33
quirogas
added this pull request to stack #9441
September 23, 2026 23:39
quirogas
force-pushed
the
ci/shard-compile/1-workspace-test-runner
branch
from
September 23, 2026 23:49
7dff363 to
dd2f9f0
Compare
quirogas
marked this pull request as ready for review
September 24, 2026 01:03
quirogas
force-pushed
the
ci/shard-compile/1-workspace-test-runner
branch
from
September 24, 2026 01:06
dd2f9f0 to
6d9fc42
Compare
bshaffer
reviewed
Sep 24, 2026
quirogas
force-pushed
the
ci/shard-compile/1-workspace-test-runner
branch
from
September 29, 2026 00:11
6d9fc42 to
d15e849
Compare
quirogas
force-pushed
the
ci/shard-compile/1-workspace-test-runner
branch
3 times, most recently
from
September 30, 2026 16:53
32be41d to
2f902a5
Compare
bshaffer
reviewed
Sep 30, 2026
quirogas
force-pushed
the
ci/shard-compile/1-workspace-test-runner
branch
from
September 30, 2026 17:36
87b85ec to
7032f6f
Compare
Co-authored-by: Brent Shaffer <betterbrent@google.com>
quirogas
force-pushed
the
ci/shard-compile/1-workspace-test-runner
branch
from
September 30, 2026 20:27
7032f6f to
3bc52d9
Compare
bshaffer
approved these changes
Sep 30, 2026
feywind
pushed a commit
that referenced
this pull request
Oct 1, 2026
🤖 I have created a release *beep* *boop* --- ## [9.3.1](firestore-v9.3.0...firestore-v9.3.1) (2026-10-01) ### Bug Fixes * **ci:** Deduplicate pnpm install in run_single_test and refine turbo compile inputs ([#9439](#9439)) ([102b3f6](102b3f6)) * **firestore:** Unblock Cloud RAD docs generation ([#9474](#9474)) ([5f580f0](5f580f0)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
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.
In CI,
.github/actions/pnpm-lockfile-checkalready runspnpm installonce at the start of every job for the whole monorepo. However,ci/run_single_test.shwas still runningpnpm installagain inside every package directory it tested. Because the repo is now a single pnpm workspace, each of those calls re-checks the entire monorepo, which slows down test shards and causes Windows runs to time out on large PRs.This PR updates
ci/run_single_test.shto skippnpm installwhennode_modulesis already installed at the root, and cleans up a few related test settings so unit tests run reliably.What changed
ci/run_single_test.sh: Only runpnpm install --frozen-lockfile --ignore-scriptsifnode_modules/.pnpmis missing at the workspace root (for local runs).--ignore-scriptsis used because most packages in the repo define"prepare": "npm run compile", which would otherwise compile the entire monorepo during install. Also lower--max_old_space_sizefrom 6 GB to 2 GB on Windows so parallel Mocha workers don't run out of memory..npmrc: Setenable-pre-post-scripts=trueso packagepretestandpostcompilehooks (like buildingpprofincloud-profileror copying protos innodejs-proto-files) run automatically duringpnpm compileandpnpm test.turbo.json: Removepackage.jsonfromcompile.inputsso editingpackage.jsonscripts or versions doesn't invalidate the TypeScript build cache for every package.handwritten/firestore/.mocharc.js: Add"exit": true(matching the root.mocharc.cjs) so Mocha exits after tests finish instead of hanging on open gRPC connections.