From c02f5c14479beede8610f41e5fc795586f81645a Mon Sep 17 00:00:00 2001 From: DellaBitta Date: Tue, 5 Mar 2024 09:50:01 -0500 Subject: [PATCH 01/22] Update node version to 20 for support scripts that don't run tests. --- .github/workflows/canary-deploy.yml | 4 ++-- .github/workflows/check-changeset.yml | 4 ++-- .github/workflows/check-docs.yml | 4 ++-- .github/workflows/check-pkg-paths.yml | 4 ++-- .github/workflows/deploy-config.yml | 4 ++-- .github/workflows/format.yml | 4 ++-- .github/workflows/health-metrics-pull-request.yml | 4 ++-- .github/workflows/lint.yml | 4 ++-- .github/workflows/prerelease-manual-deploy.yml | 4 ++-- .github/workflows/release-log.yml | 4 ++-- .github/workflows/release-pr.yml | 4 ++-- .github/workflows/release-prod.yml | 4 ++-- .github/workflows/release-staging.yml | 4 ++-- .github/workflows/release-tweet.yml | 4 ++-- .github/workflows/update-api-reports.yml | 4 ++-- 15 files changed, 30 insertions(+), 30 deletions(-) diff --git a/.github/workflows/canary-deploy.yml b/.github/workflows/canary-deploy.yml index 02871078f44..73ce0044c1a 100644 --- a/.github/workflows/canary-deploy.yml +++ b/.github/workflows/canary-deploy.yml @@ -31,10 +31,10 @@ jobs: with: # Canary release script requires git history and tags. fetch-depth: 0 - - name: Set up Node (16) + - name: Set up Node (20) uses: actions/setup-node@v3 with: - node-version: 16.x + node-version: 20.x - name: Yarn install run: yarn - name: Deploy canary diff --git a/.github/workflows/check-changeset.yml b/.github/workflows/check-changeset.yml index a851bb4793f..ca76fe7a76b 100644 --- a/.github/workflows/check-changeset.yml +++ b/.github/workflows/check-changeset.yml @@ -34,10 +34,10 @@ jobs: with: # This makes Actions fetch all Git history so check_changeset script can diff properly. fetch-depth: 0 - - name: Set up Node (16) + - name: Set up Node (20) uses: actions/setup-node@v3 with: - node-version: 16.x + node-version: 20.x - name: Yarn install run: yarn - name: Run changeset script diff --git a/.github/workflows/check-docs.yml b/.github/workflows/check-docs.yml index 9c44c22214a..aefab2506e3 100644 --- a/.github/workflows/check-docs.yml +++ b/.github/workflows/check-docs.yml @@ -27,10 +27,10 @@ jobs: with: # get all history for the diff fetch-depth: 0 - - name: Set up Node (16) + - name: Set up Node (20) uses: actions/setup-node@v3 with: - node-version: 16.x + node-version: 20.x - name: Yarn install run: yarn - name: Run doc generation (devsite docs) diff --git a/.github/workflows/check-pkg-paths.yml b/.github/workflows/check-pkg-paths.yml index 2182a3502c6..8ca54225e10 100644 --- a/.github/workflows/check-pkg-paths.yml +++ b/.github/workflows/check-pkg-paths.yml @@ -27,10 +27,10 @@ jobs: with: # This makes Actions fetch all Git history so run-changed script can diff properly. fetch-depth: 0 - - name: Set up Node (16) + - name: Set up Node (20) uses: actions/setup-node@v3 with: - node-version: 16.x + node-version: 20.x - name: Yarn install run: yarn - name: Yarn build diff --git a/.github/workflows/deploy-config.yml b/.github/workflows/deploy-config.yml index ebb607c5417..cc8e5925302 100644 --- a/.github/workflows/deploy-config.yml +++ b/.github/workflows/deploy-config.yml @@ -34,10 +34,10 @@ jobs: with: # This makes Actions fetch all Git history so run-changed script can diff properly. fetch-depth: 0 - - name: Set up node (18) + - name: Set up node (20) uses: actions/setup-node@v3 with: - node-version: 18.x + node-version: 20.x - name: Yarn install run: yarn - name: Deploy project config if needed diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index 1e77356832d..7434a9cab4c 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -31,10 +31,10 @@ jobs: with: # get all history for the diff fetch-depth: 0 - - name: Set up node (16) + - name: Set up node (20) uses: actions/setup-node@v3 with: - node-version: 16.x + node-version: 20.x - name: Yarn install run: yarn - name: Run formatting script diff --git a/.github/workflows/health-metrics-pull-request.yml b/.github/workflows/health-metrics-pull-request.yml index 6bbfc8b93c2..45f1aa1ab44 100644 --- a/.github/workflows/health-metrics-pull-request.yml +++ b/.github/workflows/health-metrics-pull-request.yml @@ -41,7 +41,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 with: - node-version: 16.x + node-version: 20.x - uses: 'google-github-actions/auth@v0' with: credentials_json: '${{ secrets.GCP_SA_KEY }}' @@ -58,7 +58,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 with: - node-version: 16.x + node-version: 20.x - uses: 'google-github-actions/auth@v0' with: credentials_json: '${{ secrets.GCP_SA_KEY }}' diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 50664c261cb..80851d9834a 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -23,10 +23,10 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Set up node (16) + - name: Set up node (20) uses: actions/setup-node@v3 with: - node-version: 16.x + node-version: 20.x - name: yarn install run: yarn - name: yarn lint diff --git a/.github/workflows/prerelease-manual-deploy.yml b/.github/workflows/prerelease-manual-deploy.yml index a1b0af0e258..54f75383f95 100644 --- a/.github/workflows/prerelease-manual-deploy.yml +++ b/.github/workflows/prerelease-manual-deploy.yml @@ -34,10 +34,10 @@ jobs: with: # Canary release script requires git history and tags. fetch-depth: 0 - - name: Set up node (16) + - name: Set up node (20) uses: actions/setup-node@v3 with: - node-version: 16.x + node-version: 20.x - name: Yarn install run: yarn - name: Deploy prerelease diff --git a/.github/workflows/release-log.yml b/.github/workflows/release-log.yml index 235a0d142ce..780e3e97b52 100644 --- a/.github/workflows/release-log.yml +++ b/.github/workflows/release-log.yml @@ -28,10 +28,10 @@ jobs: - name: Checkout Repo uses: actions/checkout@master - - name: Setup Node.js 16.x + - name: Setup Node.js 20.x uses: actions/setup-node@master with: - node-version: 16.x + node-version: 20.x - name: Get PR number and send to tracker. run: node scripts/ci/log-changesets.js diff --git a/.github/workflows/release-pr.yml b/.github/workflows/release-pr.yml index 02dc8e3cef5..04ebbd8b926 100644 --- a/.github/workflows/release-pr.yml +++ b/.github/workflows/release-pr.yml @@ -32,10 +32,10 @@ jobs: # This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits fetch-depth: 0 - - name: Setup Node.js 16.x + - name: Setup Node.js 20.x uses: actions/setup-node@master with: - node-version: 16.x + node-version: 20.x - name: Install Dependencies run: yarn diff --git a/.github/workflows/release-prod.yml b/.github/workflows/release-prod.yml index 684f405a9ac..09d1797ec4c 100644 --- a/.github/workflows/release-prod.yml +++ b/.github/workflows/release-prod.yml @@ -32,10 +32,10 @@ jobs: contents: write steps: - - name: Set up node (16) + - name: Set up node (20) uses: actions/setup-node@v3 with: - node-version: 16.x + node-version: 20.x - name: Checkout release branch (with history) uses: actions/checkout@master with: diff --git a/.github/workflows/release-staging.yml b/.github/workflows/release-staging.yml index 5b0e2a7cb5f..6a687ed5ee2 100644 --- a/.github/workflows/release-staging.yml +++ b/.github/workflows/release-staging.yml @@ -46,10 +46,10 @@ jobs: # Block this workflow if run on a non-release branch. if: github.event.inputs.release-branch == 'release' || endsWith(github.event.inputs.release-branch, '-releasebranch') steps: - - name: Set up node (16) + - name: Set up node (20) uses: actions/setup-node@v3 with: - node-version: 16.x + node-version: 20.x - name: Merge master into release uses: actions/github-script@v6 with: diff --git a/.github/workflows/release-tweet.yml b/.github/workflows/release-tweet.yml index af6379ceb18..edd2634637b 100644 --- a/.github/workflows/release-tweet.yml +++ b/.github/workflows/release-tweet.yml @@ -34,10 +34,10 @@ jobs: steps: - name: Checkout Repo uses: actions/checkout@master - - name: Setup Node.js 16.x + - name: Setup Node.js 20.x uses: actions/setup-node@master with: - node-version: 16.x + node-version: 20.x - name: Poll release notes page on devsite run: node scripts/ci/poll_release_notes.js env: diff --git a/.github/workflows/update-api-reports.yml b/.github/workflows/update-api-reports.yml index e4f90c98607..f49c548e3cc 100644 --- a/.github/workflows/update-api-reports.yml +++ b/.github/workflows/update-api-reports.yml @@ -30,10 +30,10 @@ jobs: # checkout HEAD commit instead of merge commit ref: ${{ github.event.pull_request.head.ref }} token: ${{ github.token }} - - name: Set up node (16) + - name: Set up node (20) uses: actions/setup-node@v3 with: - node-version: 16.x + node-version: 20.x - name: Yarn install run: yarn - name: Update API reports From 42e5e8f80b5c97e87d4114db430cc08bdd039816 Mon Sep 17 00:00:00 2001 From: DellaBitta Date: Tue, 5 Mar 2024 10:14:58 -0500 Subject: [PATCH 02/22] e2e test CI workflow v20 bump. --- .github/workflows/e2e-test.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/e2e-test.yml b/.github/workflows/e2e-test.yml index d844e4e34ea..6264a70d7d4 100644 --- a/.github/workflows/e2e-test.yml +++ b/.github/workflows/e2e-test.yml @@ -18,6 +18,7 @@ name: E2E Smoke Tests on: repository_dispatch: types: [staging-tests,canary-tests] + workflow_dispatch: env: # Bump Node memory limit @@ -36,10 +37,10 @@ jobs: steps: - name: Checkout Repo uses: actions/checkout@master - - name: Set up Node (18) + - name: Set up Node (20) uses: actions/setup-node@master with: - node-version: 18.x + node-version: 20.x - name: install Chrome stable run: | sudo apt-get update From 49a0c9e3108ccd0b9c9312dc8e35c19071c0ca7d Mon Sep 17 00:00:00 2001 From: DellaBitta Date: Tue, 5 Mar 2024 10:16:32 -0500 Subject: [PATCH 03/22] temp run e2e tests on push --- .github/workflows/e2e-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/e2e-test.yml b/.github/workflows/e2e-test.yml index 6264a70d7d4..617593b6a54 100644 --- a/.github/workflows/e2e-test.yml +++ b/.github/workflows/e2e-test.yml @@ -18,7 +18,7 @@ name: E2E Smoke Tests on: repository_dispatch: types: [staging-tests,canary-tests] - workflow_dispatch: + push: env: # Bump Node memory limit From a19c33b28212c3dfa89631abb72d7c7f9b1af779 Mon Sep 17 00:00:00 2001 From: DellaBitta Date: Tue, 5 Mar 2024 10:27:35 -0500 Subject: [PATCH 04/22] revert e2e push trigger --- .github/workflows/e2e-test.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/e2e-test.yml b/.github/workflows/e2e-test.yml index 617593b6a54..80a555f7840 100644 --- a/.github/workflows/e2e-test.yml +++ b/.github/workflows/e2e-test.yml @@ -18,7 +18,6 @@ name: E2E Smoke Tests on: repository_dispatch: types: [staging-tests,canary-tests] - push: env: # Bump Node memory limit From bf1c48eb8a45b928aea6de366ef016d7090e1078 Mon Sep 17 00:00:00 2001 From: DellaBitta Date: Tue, 5 Mar 2024 10:27:49 -0500 Subject: [PATCH 05/22] Make test-changed always run. --- scripts/ci-test/tasks.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/ci-test/tasks.ts b/scripts/ci-test/tasks.ts index cbe2a866326..f01e8636509 100644 --- a/scripts/ci-test/tasks.ts +++ b/scripts/ci-test/tasks.ts @@ -99,7 +99,7 @@ export async function getTestTasks(): Promise { let testTasks: TestTask[] = []; for (const filename of changedFiles) { // Files that trigger full test suite. - if (fullTestTriggerFiles.includes(filename)) { + if (1===1) { //(fullTestTriggerFiles.includes(filename)) { console.log( chalk`{blue Running all tests because ${filename} was modified.}` ); From 98e7e979b0565401d409c660379cf8b507c66092 Mon Sep 17 00:00:00 2001 From: DellaBitta Date: Tue, 5 Mar 2024 16:10:45 -0500 Subject: [PATCH 06/22] format --- scripts/ci-test/tasks.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/ci-test/tasks.ts b/scripts/ci-test/tasks.ts index f01e8636509..8e327648043 100644 --- a/scripts/ci-test/tasks.ts +++ b/scripts/ci-test/tasks.ts @@ -99,7 +99,8 @@ export async function getTestTasks(): Promise { let testTasks: TestTask[] = []; for (const filename of changedFiles) { // Files that trigger full test suite. - if (1===1) { //(fullTestTriggerFiles.includes(filename)) { + if (1 === 1) { + //(fullTestTriggerFiles.includes(filename)) { console.log( chalk`{blue Running all tests because ${filename} was modified.}` ); From e30d7fd277db815ffe310ea9a756c5363e9eec7c Mon Sep 17 00:00:00 2001 From: DellaBitta Date: Tue, 5 Mar 2024 16:11:12 -0500 Subject: [PATCH 07/22] Emulator script uses 127.0.0.1 --- scripts/emulator-testing/emulators/emulator.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/emulator-testing/emulators/emulator.ts b/scripts/emulator-testing/emulators/emulator.ts index d56226842eb..1295d413e4b 100644 --- a/scripts/emulator-testing/emulators/emulator.ts +++ b/scripts/emulator-testing/emulators/emulator.ts @@ -119,8 +119,8 @@ export abstract class Emulator { if (elapsed > timeout) { reject(`Emulator not ready after ${timeout}s. Exiting ...`); } else { - console.log(`Ping emulator at [http://localhost:${this.port}] ...`); - fetch(`http://localhost:${this.port}`).then( + console.log(`Ping emulator at [http://127.0.0.1:${this.port}] ...`); + fetch(`http://127.0.0.1:${this.port}`).then( () => { // Database and Firestore emulators will return 400 and 200 respectively. // As long as we get a response back, it means the emulator is ready. From 080adc4967b0dcc4057141d8676571d744b04e5b Mon Sep 17 00:00:00 2001 From: DellaBitta Date: Tue, 5 Mar 2024 17:50:00 -0500 Subject: [PATCH 08/22] test-changed-auth and auth emulator upgrade --- .github/workflows/test-changed-auth.yml | 4 +-- packages/auth/src/core/auth/emulator.test.ts | 30 ++++++++++---------- packages/auth/src/core/util/emulator.test.ts | 8 +++--- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/.github/workflows/test-changed-auth.yml b/.github/workflows/test-changed-auth.yml index eafb3a2d556..520f0cb5544 100644 --- a/.github/workflows/test-changed-auth.yml +++ b/.github/workflows/test-changed-auth.yml @@ -56,10 +56,10 @@ jobs: with: # This makes Actions fetch all Git history so run-changed script can diff properly. fetch-depth: 0 - - name: Set up Node (16) + - name: Set up Node (20) uses: actions/setup-node@v3 with: - node-version: 16.x + node-version: 20.x - name: Test setup and yarn install run: | cp config/ci.config.json config/project.json diff --git a/packages/auth/src/core/auth/emulator.test.ts b/packages/auth/src/core/auth/emulator.test.ts index 8015aecee18..5629f907a27 100644 --- a/packages/auth/src/core/auth/emulator.test.ts +++ b/packages/auth/src/core/auth/emulator.test.ts @@ -45,7 +45,7 @@ describe('core/auth/emulator', () => { fetch.setUp(); normalEndpoint = mockEndpoint(Endpoint.DELETE_ACCOUNT, {}); emulatorEndpoint = fetch.mock( - `http://localhost:2020/${endpointUrl(Endpoint.DELETE_ACCOUNT).replace( + `http://127.0.0.1:2020/${endpointUrl(Endpoint.DELETE_ACCOUNT).replace( /^.*:\/\//, '' )}`, @@ -70,46 +70,46 @@ describe('core/auth/emulator', () => { context('connectAuthEmulator', () => { it('fails if a network request has already been made', async () => { await user.delete(); - expect(() => connectAuthEmulator(auth, 'http://localhost:2020')).to.throw( + expect(() => connectAuthEmulator(auth, 'http://127.0.0.1:2020')).to.throw( FirebaseError, 'auth/emulator-config-failed' ); }); it('updates the endpoint appropriately', async () => { - connectAuthEmulator(auth, 'http://localhost:2020'); + connectAuthEmulator(auth, 'http://127.0.0.1:2020'); await user.delete(); expect(normalEndpoint.calls.length).to.eq(0); expect(emulatorEndpoint.calls.length).to.eq(1); }); it('updates the endpoint appropriately with trailing slash', async () => { - connectAuthEmulator(auth, 'http://localhost:2020/'); + connectAuthEmulator(auth, 'http://127.0.0.1:2020/'); await user.delete(); expect(normalEndpoint.calls.length).to.eq(0); expect(emulatorEndpoint.calls.length).to.eq(1); }); it('checks the scheme properly', () => { - expect(() => connectAuthEmulator(auth, 'http://localhost:2020')).not.to + expect(() => connectAuthEmulator(auth, 'http://127.0.0.1:2020')).not.to .throw; delete auth.config.emulator; - expect(() => connectAuthEmulator(auth, 'https://localhost:2020')).not.to + expect(() => connectAuthEmulator(auth, 'https://127.0.0.1:2020')).not.to .throw; delete auth.config.emulator; - expect(() => connectAuthEmulator(auth, 'ssh://localhost:2020')).to.throw( + expect(() => connectAuthEmulator(auth, 'ssh://127.0.0.1:2020')).to.throw( FirebaseError, 'auth/invalid-emulator-scheme' ); delete auth.config.emulator; - expect(() => connectAuthEmulator(auth, 'localhost:2020')).to.throw( + expect(() => connectAuthEmulator(auth, '127.0.0.1:2020')).to.throw( FirebaseError, 'auth/invalid-emulator-scheme' ); }); it('attaches a banner to the DOM', () => { - connectAuthEmulator(auth, 'http://localhost:2020'); + connectAuthEmulator(auth, 'http://127.0.0.1:2020'); if (typeof document !== 'undefined') { const el = document.querySelector('.firebase-emulator-warning')!; expect(el).not.to.be.null; @@ -122,7 +122,7 @@ describe('core/auth/emulator', () => { it('logs out a warning to the console', () => { sinon.stub(console, 'info'); - connectAuthEmulator(auth, 'http://localhost:2020'); + connectAuthEmulator(auth, 'http://127.0.0.1:2020'); expect(console.info).to.have.been.calledWith( 'WARNING: You are using the Auth Emulator,' + ' which is intended for local testing only. Do not use with' + @@ -132,7 +132,7 @@ describe('core/auth/emulator', () => { it('skips console info and has no banner if warnings disabled', () => { sinon.stub(console, 'info'); - connectAuthEmulator(auth, 'http://localhost:2020', { + connectAuthEmulator(auth, 'http://127.0.0.1:2020', { disableWarnings: true }); expect(console.info).not.to.have.been.called; @@ -142,10 +142,10 @@ describe('core/auth/emulator', () => { }); it('sets emulatorConfig on the Auth object', async () => { - connectAuthEmulator(auth, 'http://localhost:2020'); + connectAuthEmulator(auth, 'http://127.0.0.1:2020'); expect(auth.emulatorConfig).to.eql({ protocol: 'http', - host: 'localhost', + host: '127.0.0.1', port: 2020, options: { disableWarnings: false } }); @@ -175,7 +175,7 @@ describe('core/auth/emulator', () => { context('toJSON', () => { it('works when theres no current user', () => { expect(JSON.stringify(auth)).to.eq( - '{"apiKey":"test-api-key","authDomain":"localhost","appName":"test-app"}' + '{"apiKey":"test-api-key","authDomain":"127.0.0.1","appName":"test-app"}' ); }); @@ -184,7 +184,7 @@ describe('core/auth/emulator', () => { toJSON: (): object => ({ foo: 'bar' }) } as unknown as UserInternal; expect(JSON.stringify(auth)).to.eq( - '{"apiKey":"test-api-key","authDomain":"localhost",' + + '{"apiKey":"test-api-key","authDomain":"127.0.0.1",' + '"appName":"test-app","currentUser":{"foo":"bar"}}' ); }); diff --git a/packages/auth/src/core/util/emulator.test.ts b/packages/auth/src/core/util/emulator.test.ts index 65337681d5b..17a916917b1 100644 --- a/packages/auth/src/core/util/emulator.test.ts +++ b/packages/auth/src/core/util/emulator.test.ts @@ -23,23 +23,23 @@ import { _emulatorUrl } from './emulator'; describe('core/util/emulator', () => { const config: ConfigInternal = { emulator: { - url: 'http://localhost:4000/' + url: 'http://127.0.0.1:4000/' } } as ConfigInternal; it('builds the proper URL with no path', () => { - expect(_emulatorUrl(config)).to.eq('http://localhost:4000/'); + expect(_emulatorUrl(config)).to.eq('http://127.0.0.1:4000/'); }); it('builds the proper URL with a path', () => { expect(_emulatorUrl(config, '/test/path')).to.eq( - 'http://localhost:4000/test/path' + 'http://127.0.0.1:4000/test/path' ); }); it('builds the proper URL with a path missing separator', () => { expect(_emulatorUrl(config, 'test/path')).to.eq( - 'http://localhost:4000/test/path' + 'http://127.0.0.1:4000/test/path' ); }); }); From 42bcf0b3d6dc115075ee61d9cab9cdd73db729e4 Mon Sep 17 00:00:00 2001 From: DellaBitta Date: Tue, 5 Mar 2024 18:01:15 -0500 Subject: [PATCH 09/22] revert localhost change in emulator.test.ts in auth --- packages/auth/src/core/auth/emulator.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/auth/src/core/auth/emulator.test.ts b/packages/auth/src/core/auth/emulator.test.ts index 5629f907a27..71a30883218 100644 --- a/packages/auth/src/core/auth/emulator.test.ts +++ b/packages/auth/src/core/auth/emulator.test.ts @@ -175,7 +175,7 @@ describe('core/auth/emulator', () => { context('toJSON', () => { it('works when theres no current user', () => { expect(JSON.stringify(auth)).to.eq( - '{"apiKey":"test-api-key","authDomain":"127.0.0.1","appName":"test-app"}' + '{"apiKey":"test-api-key","authDomain":"localhost","appName":"test-app"}' ); }); @@ -184,7 +184,7 @@ describe('core/auth/emulator', () => { toJSON: (): object => ({ foo: 'bar' }) } as unknown as UserInternal; expect(JSON.stringify(auth)).to.eq( - '{"apiKey":"test-api-key","authDomain":"127.0.0.1",' + + '{"apiKey":"test-api-key","authDomain":"localhost",' + '"appName":"test-app","currentUser":{"foo":"bar"}}' ); }); From 692c65c409d3741390367d5f8306cacb43ef54b4 Mon Sep 17 00:00:00 2001 From: DellaBitta Date: Tue, 5 Mar 2024 18:01:30 -0500 Subject: [PATCH 10/22] Update node for test-changed-auth firefox, too. --- .github/workflows/test-changed-auth.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-changed-auth.yml b/.github/workflows/test-changed-auth.yml index 520f0cb5544..d2f11f2bf2f 100644 --- a/.github/workflows/test-changed-auth.yml +++ b/.github/workflows/test-changed-auth.yml @@ -88,10 +88,10 @@ jobs: with: # This makes Actions fetch all Git history so run-changed script can diff properly. fetch-depth: 0 - - name: Set up Node (16) + - name: Set up Node (20) uses: actions/setup-node@v3 with: - node-version: 16.x + node-version: 20.x - name: Test setup and yarn install run: | cp config/ci.config.json config/project.json From b1903a119e6fe7c862a8ffdb701a147bb45858ab Mon Sep 17 00:00:00 2001 From: DellaBitta Date: Tue, 5 Mar 2024 19:25:08 -0500 Subject: [PATCH 11/22] Update fcm to 20.0 --- .github/workflows/test-changed-fcm-integration.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-changed-fcm-integration.yml b/.github/workflows/test-changed-fcm-integration.yml index bac3a772428..affb4639b1b 100644 --- a/.github/workflows/test-changed-fcm-integration.yml +++ b/.github/workflows/test-changed-fcm-integration.yml @@ -38,10 +38,10 @@ jobs: with: # This makes Actions fetch all Git history so run-changed script can diff properly. fetch-depth: 0 - - name: Set up Node (16) + - name: Set up Node (20) uses: actions/setup-node@v3 with: - node-version: 16.x + node-version: 20.x - name: Test setup and yarn install run: | cp config/ci.config.json config/project.json From 6721ffbca61846fb676ce65a632f3da5cfbc8382 Mon Sep 17 00:00:00 2001 From: DellaBitta Date: Wed, 6 Mar 2024 09:29:38 -0500 Subject: [PATCH 12/22] revert check-changeset to check formatting. --- .github/workflows/check-changeset.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check-changeset.yml b/.github/workflows/check-changeset.yml index ca76fe7a76b..a851bb4793f 100644 --- a/.github/workflows/check-changeset.yml +++ b/.github/workflows/check-changeset.yml @@ -34,10 +34,10 @@ jobs: with: # This makes Actions fetch all Git history so check_changeset script can diff properly. fetch-depth: 0 - - name: Set up Node (20) + - name: Set up Node (16) uses: actions/setup-node@v3 with: - node-version: 20.x + node-version: 16.x - name: Yarn install run: yarn - name: Run changeset script From 5235f327411866b8a437f631d7eb0ab6328071ed Mon Sep 17 00:00:00 2001 From: DellaBitta Date: Wed, 6 Mar 2024 09:46:40 -0500 Subject: [PATCH 13/22] changeset formatting problem wasn't due to node 20. --- .github/workflows/check-changeset.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check-changeset.yml b/.github/workflows/check-changeset.yml index a851bb4793f..ca76fe7a76b 100644 --- a/.github/workflows/check-changeset.yml +++ b/.github/workflows/check-changeset.yml @@ -34,10 +34,10 @@ jobs: with: # This makes Actions fetch all Git history so check_changeset script can diff properly. fetch-depth: 0 - - name: Set up Node (16) + - name: Set up Node (20) uses: actions/setup-node@v3 with: - node-version: 16.x + node-version: 20.x - name: Yarn install run: yarn - name: Run changeset script From f6e313130a34cae2f0ca60ff8e0cfb0bd1b7e1c0 Mon Sep 17 00:00:00 2001 From: DellaBitta Date: Wed, 6 Mar 2024 09:47:24 -0500 Subject: [PATCH 14/22] Add an empty changeset. --- .changeset/violet-ways-judge.md | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .changeset/violet-ways-judge.md diff --git a/.changeset/violet-ways-judge.md b/.changeset/violet-ways-judge.md new file mode 100644 index 00000000000..a845151cc84 --- /dev/null +++ b/.changeset/violet-ways-judge.md @@ -0,0 +1,2 @@ +--- +--- From 70dec640fbfc1f32939c6beb1e31413e4fa0c7c8 Mon Sep 17 00:00:00 2001 From: DellaBitta Date: Wed, 6 Mar 2024 09:48:59 -0500 Subject: [PATCH 15/22] Test Firestore integration upgrade --- .github/workflows/test-changed-firestore-integration.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-changed-firestore-integration.yml b/.github/workflows/test-changed-firestore-integration.yml index 106aef667e7..3cc14c99c55 100644 --- a/.github/workflows/test-changed-firestore-integration.yml +++ b/.github/workflows/test-changed-firestore-integration.yml @@ -63,10 +63,10 @@ jobs: rm -f "$output_file" continue-on-error: true - - name: Set up Node (16) + - name: Set up Node (20) uses: actions/setup-node@v3 with: - node-version: 16.x + node-version: 20.x - name: install Chrome stable run: | sudo apt-get update From 30730b0c59180ba22bc588767759099dc0ce5649 Mon Sep 17 00:00:00 2001 From: DellaBitta Date: Wed, 6 Mar 2024 09:49:14 -0500 Subject: [PATCH 16/22] Test changed Firestore upgrade --- .github/workflows/test-firebase-integration.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-firebase-integration.yml b/.github/workflows/test-firebase-integration.yml index 9eb15ab78d2..f6b1eb3c4b3 100644 --- a/.github/workflows/test-firebase-integration.yml +++ b/.github/workflows/test-firebase-integration.yml @@ -31,10 +31,10 @@ jobs: with: # This makes Actions fetch all Git history so run-changed script can diff properly. fetch-depth: 0 - - name: Set up Node (16) + - name: Set up Node (20) uses: actions/setup-node@v3 with: - node-version: 16.x + node-version: 20.x - name: install Chrome stable run: | sudo apt-get update From 7d016129479f8de73a293f72871fd6472d3be36a Mon Sep 17 00:00:00 2001 From: DellaBitta Date: Wed, 6 Mar 2024 09:49:37 -0500 Subject: [PATCH 17/22] Test changed misc upgrade --- .github/workflows/test-changed-misc.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-changed-misc.yml b/.github/workflows/test-changed-misc.yml index 3e87f5f5584..e189ff4fecf 100644 --- a/.github/workflows/test-changed-misc.yml +++ b/.github/workflows/test-changed-misc.yml @@ -31,10 +31,10 @@ jobs: with: # This makes Actions fetch all Git history so run-changed script can diff properly. fetch-depth: 0 - - name: Set up Node (16) + - name: Set up Node (20) uses: actions/setup-node@v3 with: - node-version: 16.x + node-version: 20.x - name: install Chrome stable run: | sudo apt-get update From ac1f67c269dec21d4188a0fb36a2c38c63f7df82 Mon Sep 17 00:00:00 2001 From: DellaBitta Date: Wed, 6 Mar 2024 10:18:52 -0500 Subject: [PATCH 18/22] Update rules-unit-testing functions node engine requirement. --- packages/rules-unit-testing/functions/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/rules-unit-testing/functions/package.json b/packages/rules-unit-testing/functions/package.json index c701103ae64..54fd69653b5 100644 --- a/packages/rules-unit-testing/functions/package.json +++ b/packages/rules-unit-testing/functions/package.json @@ -12,6 +12,6 @@ "firebase-functions": "3.24.1" }, "engines": { - "node": "16" + "node": ">=16" } } From d39425d3582582718ae4aa56d175a3244ca70ec6 Mon Sep 17 00:00:00 2001 From: DellaBitta Date: Wed, 6 Mar 2024 11:14:23 -0500 Subject: [PATCH 19/22] Upgrade test changed workflow --- .github/workflows/test-changed.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test-changed.yml b/.github/workflows/test-changed.yml index f0cf68f7315..ac45286b0c8 100644 --- a/.github/workflows/test-changed.yml +++ b/.github/workflows/test-changed.yml @@ -31,10 +31,10 @@ jobs: with: # This makes Actions fetch all Git history so run-changed script can diff properly. fetch-depth: 0 - - name: Set up Node (16) + - name: Set up Node (20) uses: actions/setup-node@v3 with: - node-version: 16.x + node-version: 20.x - name: install Chrome stable run: | sudo apt-get update @@ -60,10 +60,10 @@ jobs: uses: actions/checkout@master with: fetch-depth: 0 - - name: Set up Node (16) + - name: Set up Node (20) uses: actions/setup-node@v3 with: - node-version: 16.x + node-version: 20.x - name: install Firefox stable run: | sudo apt-get update From 23721d2719c7484499962919a65ffc386b900431 Mon Sep 17 00:00:00 2001 From: DellaBitta Date: Wed, 6 Mar 2024 12:04:21 -0500 Subject: [PATCH 20/22] Update changed firestore and test connectFirestoreEmulator calls --- .github/workflows/test-changed-firestore.yml | 24 +++++++++---------- .../test/integration/api/validation.test.ts | 10 ++++---- .../firestore/test/unit/api/database.test.ts | 12 +++++----- 3 files changed, 23 insertions(+), 23 deletions(-) diff --git a/.github/workflows/test-changed-firestore.yml b/.github/workflows/test-changed-firestore.yml index c34e4e79dce..9f241898e0e 100644 --- a/.github/workflows/test-changed-firestore.yml +++ b/.github/workflows/test-changed-firestore.yml @@ -37,10 +37,10 @@ jobs: with: # This makes Actions fetch all Git history so run-changed script can diff properly. fetch-depth: 0 - - name: Set up Node (16) + - name: Set up Node (20) uses: actions/setup-node@v3 with: - node-version: 16.x + node-version: 20.x - name: install Chrome stable run: | sudo apt-get update @@ -84,10 +84,10 @@ jobs: needs: build if: ${{ needs.build.outputs.changed == 'true'}} steps: - - name: Set up Node (16) + - name: Set up Node (20) uses: actions/setup-node@v3 with: - node-version: 16.x + node-version: 20.x - name: install Chrome stable run: | sudo apt-get update @@ -112,10 +112,10 @@ jobs: needs: build if: ${{ needs.build.outputs.changed == 'true'}} steps: - - name: Set up Node (16) + - name: Set up Node (20) uses: actions/setup-node@v3 with: - node-version: 16.x + node-version: 20.x - name: install Chrome stable run: | sudo apt-get update @@ -142,10 +142,10 @@ jobs: needs: build if: ${{ github.event_name != 'pull_request' }} steps: - - name: Set up Node (16) + - name: Set up Node (20) uses: actions/setup-node@v3 with: - node-version: 16.x + node-version: 20.x - name: install Chrome stable run: | sudo apt-get update @@ -180,10 +180,10 @@ jobs: run: | sudo apt-get update sudo apt-get install firefox - - name: Set up Node (16) + - name: Set up Node (20) uses: actions/setup-node@v3 with: - node-version: 16.x + node-version: 20.x - name: Download build archive uses: actions/download-artifact@v3 with: @@ -219,10 +219,10 @@ jobs: name: build.tar.gz - name: Unzip build artifact run: tar xf build.tar.gz - - name: Set up Node (16) + - name: Set up Node (20) uses: actions/setup-node@v3 with: - node-version: 16.x + node-version: 20.x - name: Test setup and yarn install run: cp config/ci.config.json config/project.json - name: Run tests diff --git a/packages/firestore/test/integration/api/validation.test.ts b/packages/firestore/test/integration/api/validation.test.ts index 8260b53bb4f..eb0119b5d39 100644 --- a/packages/firestore/test/integration/api/validation.test.ts +++ b/packages/firestore/test/integration/api/validation.test.ts @@ -173,7 +173,7 @@ apiDescribe('Validation:', persistence => { () => { const db = newTestFirestore(newTestApp('test-project')); // Verify that this doesn't throw. - connectFirestoreEmulator(db, 'localhost', 9000); + connectFirestoreEmulator(db, '127.0.0.1', 9000); } ); @@ -185,7 +185,7 @@ apiDescribe('Validation:', persistence => { 'Firestore has already been started and its settings can no longer be changed.'; await setDoc(doc(db, 'foo/bar'), {}); - expect(() => connectFirestoreEmulator(db, 'localhost', 9000)).to.throw( + expect(() => connectFirestoreEmulator(db, '127.0.0.1', 9000)).to.throw( errorMsg ); } @@ -197,7 +197,7 @@ apiDescribe('Validation:', persistence => { () => { const db = newTestFirestore(newTestApp('test-project')); // Verify that this doesn't throw. - connectFirestoreEmulator(db, 'localhost', 9000, { + connectFirestoreEmulator(db, '127.0.0.1', 9000, { mockUserToken: { sub: 'foo' } }); } @@ -209,7 +209,7 @@ apiDescribe('Validation:', persistence => { () => { const db = newTestFirestore(newTestApp('test-project')); // Verify that this doesn't throw. - connectFirestoreEmulator(db, 'localhost', 9000, { + connectFirestoreEmulator(db, '127.0.0.1', 9000, { mockUserToken: 'my-mock-user-token' }); } @@ -222,7 +222,7 @@ apiDescribe('Validation:', persistence => { const errorMsg = "mockUserToken must contain 'sub' or 'user_id' field!"; expect(() => - connectFirestoreEmulator(db, 'localhost', 9000, { + connectFirestoreEmulator(db, '127.0.0.1', 9000, { mockUserToken: {} as any }) ).to.throw(errorMsg); diff --git a/packages/firestore/test/unit/api/database.test.ts b/packages/firestore/test/unit/api/database.test.ts index ddae011b3cb..9dcc7f5ae9d 100644 --- a/packages/firestore/test/unit/api/database.test.ts +++ b/packages/firestore/test/unit/api/database.test.ts @@ -547,9 +547,9 @@ describe('Settings', () => { it('gets settings from useEmulator', () => { // Use a new instance of Firestore in order to configure settings. const db = newTestFirestore(); - connectFirestoreEmulator(db, 'localhost', 9000); + connectFirestoreEmulator(db, '127.0.0.1', 9000); - expect(db._getSettings().host).to.equal('localhost:9000'); + expect(db._getSettings().host).to.equal('127.0.0.1:9000'); expect(db._getSettings().ssl).to.be.false; }); @@ -557,9 +557,9 @@ describe('Settings', () => { // Use a new instance of Firestore in order to configure settings. const db = newTestFirestore(); db._setSettings({ host: 'other.host' }); - connectFirestoreEmulator(db, 'localhost', 9000); + connectFirestoreEmulator(db, '127.0.0.1', 9000); - expect(db._getSettings().host).to.equal('localhost:9000'); + expect(db._getSettings().host).to.equal('127.0.0.1:9000'); expect(db._getSettings().ssl).to.be.false; }); @@ -567,7 +567,7 @@ describe('Settings', () => { // Use a new instance of Firestore in order to configure settings. const db = newTestFirestore(); const mockUserToken = { sub: 'foobar' }; - connectFirestoreEmulator(db, 'localhost', 9000, { mockUserToken }); + connectFirestoreEmulator(db, '127.0.0.1', 9000, { mockUserToken }); const credentials = db._authCredentials; expect(credentials).to.be.instanceOf(EmulatorAuthCredentialsProvider); @@ -579,7 +579,7 @@ describe('Settings', () => { it('sets credentials based on mockUserToken string', async () => { // Use a new instance of Firestore in order to configure settings. const db = newTestFirestore(); - connectFirestoreEmulator(db, 'localhost', 9000, { + connectFirestoreEmulator(db, '127.0.0.1', 9000, { mockUserToken: 'my-custom-mock-user-token' }); From 9dff0fdcc7fe33e1e4c3762973b5e13dfc3c91de Mon Sep 17 00:00:00 2001 From: DellaBitta Date: Wed, 6 Mar 2024 13:28:08 -0500 Subject: [PATCH 21/22] Update test-all workflow with node 20. --- .github/workflows/test-all.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/test-all.yml b/.github/workflows/test-all.yml index e72dca55c8b..fce2b722814 100644 --- a/.github/workflows/test-all.yml +++ b/.github/workflows/test-all.yml @@ -42,10 +42,10 @@ jobs: run: | npx @puppeteer/browsers install chrome@stable - uses: actions/checkout@v3 - - name: Set up Node (16) + - name: Set up Node (20) uses: actions/setup-node@v3 with: - node-version: 16.x + node-version: 20.x - name: Test setup and yarn install run: | cp config/ci.config.json config/project.json @@ -81,10 +81,10 @@ jobs: name: build.tar.gz - name: Unzip build artifact run: tar xf build.tar.gz - - name: Set up Node (16) + - name: Set up Node (20) uses: actions/setup-node@v3 with: - node-version: 16.x + node-version: 20.x - name: Test setup and yarn install run: | cp config/ci.config.json config/project.json @@ -132,10 +132,10 @@ jobs: name: build.tar.gz - name: Unzip build artifact run: tar xf build.tar.gz - - name: Set up Node (16) + - name: Set up Node (20) uses: actions/setup-node@v3 with: - node-version: 16.x + node-version: 20.x - name: Test setup and yarn install run: | cp config/ci.config.json config/project.json @@ -175,10 +175,10 @@ jobs: name: build.tar.gz - name: Unzip build artifact run: tar xf build.tar.gz - - name: Set up Node (16) + - name: Set up Node (20) uses: actions/setup-node@v3 with: - node-version: 16.x + node-version: 20.x - name: Test setup and yarn install run: | cp config/ci.config.json config/project.json @@ -219,10 +219,10 @@ jobs: name: build.tar.gz - name: Unzip build artifact run: tar xf build.tar.gz - - name: Set up Node (16) + - name: Set up Node (20) uses: actions/setup-node@v3 with: - node-version: 16.x + node-version: 20.x - run: cp config/ci.config.json config/project.json - run: yarn - run: yarn build:${{ matrix.persistence }} From 453d4f4ec1442d5a0bcb63e996d8c1f83e9c6102 Mon Sep 17 00:00:00 2001 From: DellaBitta Date: Thu, 7 Mar 2024 09:00:57 -0500 Subject: [PATCH 22/22] revert "@DellaBitta Make test-changed always run." --- scripts/ci-test/tasks.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/ci-test/tasks.ts b/scripts/ci-test/tasks.ts index 8e327648043..cbe2a866326 100644 --- a/scripts/ci-test/tasks.ts +++ b/scripts/ci-test/tasks.ts @@ -99,8 +99,7 @@ export async function getTestTasks(): Promise { let testTasks: TestTask[] = []; for (const filename of changedFiles) { // Files that trigger full test suite. - if (1 === 1) { - //(fullTestTriggerFiles.includes(filename)) { + if (fullTestTriggerFiles.includes(filename)) { console.log( chalk`{blue Running all tests because ${filename} was modified.}` );