From 3db02f068ddce8b745b8b5f84c21c8520dda7773 Mon Sep 17 00:00:00 2001 From: Wes Tarle Date: Thu, 23 Jul 2026 16:19:49 +0000 Subject: [PATCH 1/5] ci: fix discovery.yaml by installing root dependencies and ignoring fixtures This fixes an issue where ESLint could not find the gts config because the root node_modules was empty, and ignores system-test/fixtures which are not included in the tsconfig. Tested locally with the following commands: ```bash npm install cd handwritten/bigquery npm install npm run types npm run fix ``` --- .github/workflows/discovery.yaml | 2 ++ handwritten/bigquery/.eslintignore | 1 + 2 files changed, 3 insertions(+) diff --git a/.github/workflows/discovery.yaml b/.github/workflows/discovery.yaml index 7dcb624b2038..51be69d1c3c5 100644 --- a/.github/workflows/discovery.yaml +++ b/.github/workflows/discovery.yaml @@ -16,6 +16,8 @@ jobs: - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 with: node-version: 16 + # Install root deps for ESLint + - run: npm install # Install all deps, including dev dependencies. - run: cd handwritten/bigquery && npm install # Generate types diff --git a/handwritten/bigquery/.eslintignore b/handwritten/bigquery/.eslintignore index ea5b04aebe68..87a018350591 100644 --- a/handwritten/bigquery/.eslintignore +++ b/handwritten/bigquery/.eslintignore @@ -5,3 +5,4 @@ build/ docs/ protos/ samples/generated/ +system-test/fixtures From 516d70ef41112ce461f6683660e1c53acafcdbdb Mon Sep 17 00:00:00 2001 From: Wes Tarle Date: Fri, 24 Jul 2026 18:39:33 +0000 Subject: [PATCH 2/5] ci: fix Node 18 pnpm install by overriding brace-expansion This fixes an issue where brace-expansion@5.0.8 dropped Node 18 support, breaking pnpm install on Node 18 runners. We override it to 5.0.7 which still supports Node 18. --- .pnpmfile.cjs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/.pnpmfile.cjs b/.pnpmfile.cjs index 285048239c53..01999c7fb598 100644 --- a/.pnpmfile.cjs +++ b/.pnpmfile.cjs @@ -21,11 +21,30 @@ module.exports = { mutateC8(pkg.devDependencies, pkg.name, 'devDependencies', context); } + // Check if this package has brace-expansion as a dependency or devDependency + if (pkg.dependencies && pkg.dependencies['brace-expansion']) { + mutateBraceExpansion(pkg.dependencies, pkg.name, 'dependencies', context); + } + if (pkg.devDependencies && pkg.devDependencies['brace-expansion']) { + mutateBraceExpansion(pkg.devDependencies, pkg.name, 'devDependencies', context); + } return pkg; } } }; +function mutateBraceExpansion(deps, pkgName, depType, context) { + const nodeVersion = process.version; + const majorVersion = parseInt(nodeVersion.replace('v', '').split('.')[0], 10); + + if (majorVersion === 18) { + if (deps['brace-expansion'] && deps['brace-expansion'].startsWith('^5.')) { + console.log(`[pnpmfile] Node.js version is 18. Overriding brace-expansion to 5.0.7 in ${pkgName}`); + deps['brace-expansion'] = '5.0.7'; + } + } +} + function mutateYargs(deps, pkgName, depType, context) { const nodeVersion = process.version; const majorVersion = parseInt(nodeVersion.replace('v', '').split('.')[0], 10); From acd9266166929d400f9fa0c1cb56a2f12b14478d Mon Sep 17 00:00:00 2001 From: Wes Tarle Date: Fri, 24 Jul 2026 19:51:15 +0000 Subject: [PATCH 3/5] ci: address PR feedback to use Node 22 and pnpm Bumps Node version to 22 and uses pnpm for dependency installation and script execution to respect global settings. --- .github/workflows/discovery.yaml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/discovery.yaml b/.github/workflows/discovery.yaml index 51be69d1c3c5..396d0df73839 100644 --- a/.github/workflows/discovery.yaml +++ b/.github/workflows/discovery.yaml @@ -15,15 +15,18 @@ jobs: persist-credentials: false - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 with: - node-version: 16 + node-version: 22 + - uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4 + with: + version: ^10.0.0 # Install root deps for ESLint - - run: npm install + - run: pnpm install # Install all deps, including dev dependencies. - - run: cd handwritten/bigquery && npm install + - run: cd handwritten/bigquery && pnpm install # Generate types - - run: cd handwritten/bigquery && npm run types + - run: cd handwritten/bigquery && pnpm run types # Fix formatting - - run: cd handwritten/bigquery && npm run fix + - run: cd handwritten/bigquery && pnpm run fix # Submit pull request - uses: googleapis/code-suggester@f9fef85aa02459e30e62526abe950341cbbd768b # v5 env: From 413fe56b6afcd3746b56e38cab0ab355dcc36afa Mon Sep 17 00:00:00 2001 From: Wes Tarle Date: Fri, 24 Jul 2026 19:59:06 +0000 Subject: [PATCH 4/5] ci: isolate BigQuery ESLint config to prevent duplicate plugin error Adds 'root: true' to BigQuery's .eslintrc.json to prevent ESLint from cascading up to the monorepo root and loading conflicting versions of plugins (like prettier) when using pnpm. --- handwritten/bigquery/.eslintrc.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/handwritten/bigquery/.eslintrc.json b/handwritten/bigquery/.eslintrc.json index 782153495464..3e8d97ccb390 100644 --- a/handwritten/bigquery/.eslintrc.json +++ b/handwritten/bigquery/.eslintrc.json @@ -1,3 +1,4 @@ { - "extends": "./node_modules/gts" + "extends": "./node_modules/gts", + "root": true } From 55af08a6be8d7d873072ff78968782b1d2a76c4f Mon Sep 17 00:00:00 2001 From: Wes Tarle Date: Fri, 24 Jul 2026 20:05:05 +0000 Subject: [PATCH 5/5] ci: remove obsolete root install from discovery.yaml Now that handwritten/bigquery/.eslintrc.json has 'root: true', ESLint no longer cascades to the monorepo root. Therefore, we no longer need to install root dependencies to satisfy the root ESLint configuration. --- .github/workflows/discovery.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/discovery.yaml b/.github/workflows/discovery.yaml index 396d0df73839..907fbd76301c 100644 --- a/.github/workflows/discovery.yaml +++ b/.github/workflows/discovery.yaml @@ -19,8 +19,7 @@ jobs: - uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4 with: version: ^10.0.0 - # Install root deps for ESLint - - run: pnpm install + # Install all deps, including dev dependencies. - run: cd handwritten/bigquery && pnpm install # Generate types