Skip to content

Commit 3e8f239

Browse files
committed
Merge remote-tracking branch 'origin/master' into posva/patch-1
2 parents 011c874 + e30d7a6 commit 3e8f239

File tree

192 files changed

+10586
-4049
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

192 files changed

+10586
-4049
lines changed

.github/CODEOWNERS

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#######################################################################################################
99

1010
# These owners will be the default owners for everything in the repo.
11-
* @dwyfrequency @hsubox76 @firebase/jssdk-global-approvers
11+
* @firebase/jssdk-global-approvers
1212

1313
# Database Code
1414
packages/database @maneesht @jsdt @jmwski @firebase/jssdk-global-approvers
@@ -74,4 +74,4 @@ scripts/docgen/content-sources/ @egilmorez @firebase/jssdk-global-approvers
7474
docs-devsite/ @egilmorez @markarndt @kevinthecheung
7575

7676
# Changeset
77-
.changeset @firebase/jssdk-changeset-approvers @firebase/firestore-js-team @firebase/jssdk-global-approvers
77+
.changeset @firebase/jssdk-changeset-approvers @firebase/firestore-js-team @firebase/jssdk-global-approvers

.github/workflows/canary-deploy.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,3 +76,15 @@ jobs:
7676
NPM_TOKEN_APP_CHECK_COMPAT: ${{ secrets.NPM_TOKEN_APP_CHECK_COMPAT }}
7777
NPM_TOKEN_API_DOCUMENTER: ${{ secrets.NPM_TOKEN_API_DOCUMENTER }}
7878
CI: true
79+
- name: Launch E2E tests workflow
80+
# Trigger e2e-test.yml
81+
run: |
82+
VERSION_SCRIPT="const pkg = require('./packages/firebase/package.json'); console.log(pkg.version);"
83+
VERSION_OR_TAG=`node -e "${VERSION_SCRIPT}"`
84+
OSS_BOT_GITHUB_TOKEN=${{ secrets.OSS_BOT_GITHUB_TOKEN }}
85+
curl -X POST \
86+
-H "Content-Type:application/json" \
87+
-H "Accept:application/vnd.github.v3+json" \
88+
-H "Authorization:Bearer $OSS_BOT_GITHUB_TOKEN" \
89+
-d "{\"event_type\":\"canary-tests\", \"client_payload\":{\"versionOrTag\":\"$VERSION_OR_TAG\"}}" \
90+
https://api.github.com/repos/firebase/firebase-js-sdk/dispatches

.github/workflows/e2e-test.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: E2E Smoke Tests
33
# Allows REST trigger. Currently triggered by release-cli script during a staging run.
44
on:
55
repository_dispatch:
6-
types: [staging-tests]
6+
types: [staging-tests,canary-tests]
77

88
jobs:
99
test:
@@ -62,6 +62,8 @@ jobs:
6262
- name: Tests succeeded
6363
if: success()
6464
run: node scripts/ci/notify-test-result.js success
65+
# we don't want THIS step erroring to trigger the failure notification
66+
continue-on-error: true
6567
env:
6668
WEBHOOK_URL: ${{ secrets.JSCORE_CHAT_WEBHOOK_URL }}
6769
RELEASE_TRACKER_URL: ${{ secrets.RELEASE_TRACKER_URL }}

.github/workflows/test-all.yml

Lines changed: 47 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@ on:
77
env:
88
# make chromedriver detect installed Chrome version and download the corresponding driver
99
DETECT_CHROMEDRIVER_VERSION: true
10-
artifactRetentionDays: 2
10+
# The default behavior of chromedriver uses the older Chrome download URLs. We need to override
11+
# the beahvior to use the new URLs.
12+
CHROMEDRIVER_CDNURL: https://googlechromelabs.github.io/
13+
CHROMEDRIVER_CDNBINARIESURL: https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/
14+
artifactRetentionDays: 14
1115

1216
jobs:
1317
build:
@@ -17,13 +21,8 @@ jobs:
1721
# Install Chrome so the correct version of webdriver can be installed by chromedriver when
1822
# setting up the repo. This must be done to build and execute Auth properly.
1923
- name: install Chrome stable
20-
# Install Chrome version 110.0.5481.177-1 as some Auth tests start to fail on version 111.
21-
# Temporary: Auth team will explore what's going wrong with the auth tests.
2224
run: |
23-
sudo apt-get update
24-
sudo apt-get install wget
25-
sudo wget http://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_110.0.5481.177-1_amd64.deb
26-
sudo apt-get install -f ./google-chrome-stable_110.0.5481.177-1_amd64.deb --allow-downgrades
25+
npx @puppeteer/browsers install chrome@stable
2726
- uses: actions/checkout@v3
2827
- name: Set up Node (16)
2928
uses: actions/setup-node@v3
@@ -100,15 +99,11 @@ jobs:
10099
needs: build
101100
runs-on: ubuntu-latest
102101
steps:
103-
# install Chrome so the correct version of webdriver can be installed by chromedriver when setting up the repo
104-
- name: install Chrome stable
105-
# Install Chrome version 110.0.5481.177-1 as some Auth tests start to fail on version 111.
106-
# Temporary: Auth team will explore what's going wrong with the auth tests.
107-
run: |
108-
sudo apt-get update
109-
sudo apt-get install wget
110-
sudo wget http://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_110.0.5481.177-1_amd64.deb
111-
sudo apt-get install -f ./google-chrome-stable_110.0.5481.177-1_amd64.deb --allow-downgrades
102+
# install Chrome first, so the correct version of webdriver can be installed by chromedriver
103+
# when setting up the repo
104+
- name: install Chrome stable
105+
run: |
106+
npx @puppeteer/browsers install chrome@stable
112107
- name: Download build archive
113108
uses: actions/download-artifact@v3
114109
with:
@@ -172,7 +167,7 @@ jobs:
172167
run: echo "FIREBASE_CI_TEST_START_TIME=$(date +%s)" >> $GITHUB_ENV
173168
- name: Run unit tests
174169
run: |
175-
xvfb-run yarn lerna run --concurrency 4 test:ci --scope '{@firebase/firestore*,firebase-firestore-integration-test}'
170+
xvfb-run yarn lerna run --concurrency 4 test:ci --scope '@firebase/firestore*'
176171
node scripts/print_test_logs.js
177172
env:
178173
FIREBASE_TOKEN: ${{ secrets.FIREBASE_CLI_TOKEN }}
@@ -184,3 +179,38 @@ jobs:
184179
github-token: ${{ secrets.GITHUB_TOKEN }}
185180
path-to-lcov: ./lcov-all.info
186181
continue-on-error: true
182+
183+
test-firestore-integration:
184+
strategy:
185+
fail-fast: false
186+
matrix:
187+
persistence: ['memory', 'persistence']
188+
name: Firestore Integration Tests (${{ matrix.persistence }})
189+
needs: build
190+
runs-on: ubuntu-latest
191+
steps:
192+
# install Chrome so the correct version of webdriver can be installed by chromedriver when setting up the repo
193+
- name: install Chrome stable
194+
run: |
195+
sudo apt-get update
196+
sudo apt-get install google-chrome-stable
197+
- name: Download build archive
198+
uses: actions/download-artifact@v3
199+
with:
200+
name: build.tar.gz
201+
- name: Unzip build artifact
202+
run: tar xf build.tar.gz
203+
- name: Set up Node (16)
204+
uses: actions/setup-node@v3
205+
with:
206+
node-version: 16.x
207+
- name: Bump Node memory limit
208+
run: echo "NODE_OPTIONS=--max_old_space_size=4096" >> $GITHUB_ENV
209+
- run: cp config/ci.config.json config/project.json
210+
- run: yarn
211+
- run: yarn build:${{ matrix.persistence }}
212+
working-directory: integration/firestore
213+
- run: xvfb-run yarn karma:singlerun
214+
working-directory: integration/firestore
215+
env:
216+
FIREBASE_TOKEN: ${{ secrets.FIREBASE_CLI_TOKEN }}

.github/workflows/test-changed-auth.yml

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,31 +5,31 @@ on: pull_request
55
env:
66
# make chromedriver detect installed Chrome version and download the corresponding driver
77
DETECT_CHROMEDRIVER_VERSION: true
8+
# The default behavior of chromedriver uses the older Chrome download URLs. We need to override
9+
# the beahvior to use the new URLs.
10+
CHROMEDRIVER_CDNURL: https://googlechromelabs.github.io/
11+
CHROMEDRIVER_CDNBINARIESURL: https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/
812

913
jobs:
1014
test-chrome:
1115
name: Test Auth on Chrome and Node If Changed
1216
runs-on: ubuntu-latest
1317

1418
steps:
15-
# install Chrome first, so the correct version of webdriver can be installed by chromedriver when setting up the repo
19+
# install Chrome first, so the correct version of webdriver can be installed by chromedriver
20+
# when setting up the repo
1621
- name: install Chrome stable
17-
# Install Chrome version 110.0.5481.177-1 as test starts to fail on version 111.
18-
# Temporary: Auth team will explore what's going wrong with the auth tests.
1922
run: |
20-
sudo apt-get update
21-
sudo apt-get install wget
22-
sudo wget http://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_110.0.5481.177-1_amd64.deb
23-
sudo apt-get install -f ./google-chrome-stable_110.0.5481.177-1_amd64.deb --allow-downgrades
23+
npx @puppeteer/browsers install chrome@stable
2424
- name: Checkout Repo
2525
uses: actions/checkout@master
2626
with:
2727
# This makes Actions fetch all Git history so run-changed script can diff properly.
2828
fetch-depth: 0
29-
- name: Set up Node (14)
29+
- name: Set up Node (16)
3030
uses: actions/setup-node@v3
3131
with:
32-
node-version: 14.x
32+
node-version: 16.x
3333
- name: Bump Node memory limit
3434
run: echo "NODE_OPTIONS=--max_old_space_size=4096" >> $GITHUB_ENV
3535
- name: Test setup and yarn install
@@ -45,22 +45,25 @@ jobs:
4545
# Whatever version of Firefox comes with 22.04 is causing Firefox
4646
# startup to hang when launched by karma. Need to look further into
4747
# why.
48+
4849
runs-on: ubuntu-20.04
4950

5051
steps:
5152
- name: install Firefox stable
5253
run: |
5354
sudo apt-get update
5455
sudo apt-get install firefox
56+
sudo apt-get install wget
57+
5558
- name: Checkout Repo
5659
uses: actions/checkout@master
5760
with:
5861
# This makes Actions fetch all Git history so run-changed script can diff properly.
5962
fetch-depth: 0
60-
- name: Set up Node (14)
63+
- name: Set up Node (16)
6164
uses: actions/setup-node@v3
6265
with:
63-
node-version: 14.x
66+
node-version: 16.x
6467
- name: Bump Node memory limit
6568
run: echo "NODE_OPTIONS=--max_old_space_size=4096" >> $GITHUB_ENV
6669
- name: Test setup and yarn install

.github/workflows/test-changed-fcm-integration.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ jobs:
2222
with:
2323
# This makes Actions fetch all Git history so run-changed script can diff properly.
2424
fetch-depth: 0
25-
- name: Set up Node (14)
25+
- name: Set up Node (16)
2626
uses: actions/setup-node@v3
2727
with:
28-
node-version: 14.x
28+
node-version: 16.x
2929
- name: Bump Node memory limit
3030
run: echo "NODE_OPTIONS=--max_old_space_size=4096" >> $GITHUB_ENV
3131
- name: Test setup and yarn install

.github/workflows/test-changed-firestore-integration.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ jobs:
1313
with:
1414
# This makes Actions fetch all Git history so run-changed script can diff properly.
1515
fetch-depth: 0
16-
- name: Set up Node (14)
16+
- name: Set up Node (16)
1717
uses: actions/setup-node@v3
1818
with:
19-
node-version: 14.x
19+
node-version: 16.x
2020
- name: install Chrome stable
2121
run: |
2222
sudo apt-get update

0 commit comments

Comments
 (0)