From b3b59b14bcbc5cbd4a48a245327391f66f7b8367 Mon Sep 17 00:00:00 2001 From: Joe Hanley Date: Thu, 7 May 2026 15:23:16 -0700 Subject: [PATCH 1/3] test: run functions-discover test on Node 24 ### Description The test:functions-discover test was failing on Node 20 because the latest pnpm requires Node 22+ (due to node:sqlite). This PR updates the CI workflow to run this specific test on Node 24 instead. ### Scenarios Tested - Verified that the workflow file syntax is correct. - Verified that run.sh is restored to use the latest pnpm. ### Sample Commands npm run test:functions-discover --- .github/workflows/node-test.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/node-test.yml b/.github/workflows/node-test.yml index 66189d056f6..5e58572543d 100644 --- a/.github/workflows/node-test.yml +++ b/.github/workflows/node-test.yml @@ -207,7 +207,6 @@ jobs: - npm run test:emulator - npm run test:extensions-emulator - npm run test:frameworks - - npm run test:functions-discover - npm run test:hosting # - npm run test:hosting-rewrites # Long-running test that might conflict across test runs. Run this manually. - npm run test:import-export @@ -217,6 +216,9 @@ jobs: - npm run test:triggers-end-to-end:inspect # - npm run test:dataconnect-deploy - npm run test:dataconnect-emulator + include: + - node-version: "24" + script: "npm run test:functions-discover" steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v3 @@ -276,7 +278,6 @@ jobs: - npm run test:emulator # - npm run test:import-export # Fails becuase port 4000 is taken after first run - hub not shutting down? # - npm run test:extensions-emulator # Fails due to cannot find module sharp (not waiting for npm install?) - - npm run test:functions-discover # - npm run test:triggers-end-to-end - npm run test:triggers-end-to-end:inspect - npm run test:storage-deploy @@ -284,6 +285,9 @@ jobs: # - npm run test:dataconnect-deploy # TODO (joehanley): Reenable this - it should be safe to run in parallel # - npm run test:dataconnect-emulator # TODO (joehanley): Figure out why this is failing # - npm run test:frameworks + include: + - node-version: "24" + script: "npm run test:functions-discover" steps: - name: Setup Java JDK uses: actions/setup-java@v3.3.0 From 15f3866a299fc3c4676340fcb1c996bdffb3e7c3 Mon Sep 17 00:00:00 2001 From: Joe Hanley Date: Thu, 7 May 2026 15:35:45 -0700 Subject: [PATCH 2/3] test: allow built dependencies in pnpm fixture ### Description Newer versions of pnpm require explicit approval for build scripts. This PR adds onlyBuiltDependencies to the pnpm fixture's package.json to allow @firebase/util and protobufjs to run their build scripts. ### Scenarios Tested - Verified that the fixture package.json was updated. --- .../fixtures/pnpm/functions/package.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/functions-discover-tests/fixtures/pnpm/functions/package.json b/scripts/functions-discover-tests/fixtures/pnpm/functions/package.json index 7ddca3681b9..05125a4b461 100644 --- a/scripts/functions-discover-tests/fixtures/pnpm/functions/package.json +++ b/scripts/functions-discover-tests/fixtures/pnpm/functions/package.json @@ -2,5 +2,11 @@ "name": "pnpm", "dependencies": { "firebase-functions": "^6.4.0" + }, + "pnpm": { + "onlyBuiltDependencies": [ + "@firebase/util", + "protobufjs" + ] } } From bfd08cb8a2309f2aae87ee111c0e2c0c5a01acfd Mon Sep 17 00:00:00 2001 From: Joe Hanley Date: Thu, 7 May 2026 15:45:58 -0700 Subject: [PATCH 3/3] test: ignore scripts in pnpm fixture install ### Description Adding onlyBuiltDependencies to package.json didn't resolve the ERR_PNPM_IGNORED_BUILDS error in CI. This PR switches to using pnpm install --ignore-scripts in the fixture's install script to bypass the issue entirely, as the test likely does not need the build scripts to run. ### Scenarios Tested - Verified that the fixture install.sh was updated. --- scripts/functions-discover-tests/fixtures/pnpm/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/functions-discover-tests/fixtures/pnpm/install.sh b/scripts/functions-discover-tests/fixtures/pnpm/install.sh index f9e13353e1e..a7cdf59588d 100755 --- a/scripts/functions-discover-tests/fixtures/pnpm/install.sh +++ b/scripts/functions-discover-tests/fixtures/pnpm/install.sh @@ -2,4 +2,4 @@ set -euxo pipefail # bash strict mode IFS=$'\n\t' -cd functions && pnpm install +cd functions && pnpm install --ignore-scripts