Skip to content

Commit

Permalink
Merge branch 'master' into mila/Multiple-Inequality-support
Browse files Browse the repository at this point in the history
  • Loading branch information
milaGGL authored Aug 29, 2023
2 parents 226a754 + 25cda8a commit 2ed1a48
Show file tree
Hide file tree
Showing 77 changed files with 2,206 additions and 242 deletions.
6 changes: 6 additions & 0 deletions .changeset/cool-games-care.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@firebase/firestore': patch
'firebase': patch
---

Implemented internal logic to auto-create client-side indexes
6 changes: 6 additions & 0 deletions .changeset/healthy-peas-heal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@firebase/firestore': patch
'firebase': patch
---

Implemented internal logic to delete all client-side indexes
5 changes: 0 additions & 5 deletions .changeset/heavy-dingos-obey.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/mean-candles-approve.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/quiet-gorillas-smoke.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/short-dogs-smell.md

This file was deleted.

6 changes: 0 additions & 6 deletions .changeset/thick-lions-divide.md

This file was deleted.

40 changes: 21 additions & 19 deletions .github/workflows/test-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,14 @@ jobs:
# Install Chrome so the correct version of webdriver can be installed by chromedriver when
# setting up the repo. This must be done to build and execute Auth properly.
- name: install Chrome stable
# Install Chrome version 110.0.5481.177-1 as some Auth tests start to fail on version 111.
# Temporary: Auth team will explore what's going wrong with the auth tests.
# Pin Chrome version 114.0.5735.90-1 to avoid install failures like "No such object: chromedriver/LATEST_RELEASE_115.0.5790".
# The failure happens because https://chromedriver.chromium.org/downloads only goes up to version 114.
# TODO(b/297380444) Update script to install the latest Chrome and ChromeDriver.
run: |
sudo apt-get update
sudo apt-get install wget
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
sudo apt-get install -f ./google-chrome-stable_110.0.5481.177-1_amd64.deb --allow-downgrades
sudo wget http://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_114.0.5735.90-1_amd64.deb
sudo apt-get install -f ./google-chrome-stable_114.0.5735.90-1_amd64.deb --allow-downgrades
- uses: actions/checkout@v3
- name: Set up Node (16)
uses: actions/setup-node@v3
Expand Down Expand Up @@ -102,13 +103,14 @@ jobs:
steps:
# install Chrome so the correct version of webdriver can be installed by chromedriver when setting up the repo
- name: install Chrome stable
# Install Chrome version 110.0.5481.177-1 as some Auth tests start to fail on version 111.
# Temporary: Auth team will explore what's going wrong with the auth tests.
# Pin Chrome version 114.0.5735.90-1 to avoid install failures like "No such object: chromedriver/LATEST_RELEASE_115.0.5790".
# The failure happens because https://chromedriver.chromium.org/downloads only goes up to version 114.
# TODO(b/297380444) Update script to install the latest Chrome and ChromeDriver.
run: |
sudo apt-get update
sudo apt-get install wget
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
sudo apt-get install -f ./google-chrome-stable_110.0.5481.177-1_amd64.deb --allow-downgrades
sudo wget http://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_114.0.5735.90-1_amd64.deb
sudo apt-get install -f ./google-chrome-stable_114.0.5735.90-1_amd64.deb --allow-downgrades
- name: Download build archive
uses: actions/download-artifact@v3
with:
Expand Down Expand Up @@ -186,7 +188,11 @@ jobs:
continue-on-error: true

test-firestore-integration:
name: Firestore Integration Tests
strategy:
fail-fast: false
matrix:
persistence: ['memory', 'persistence']
name: Firestore Integration Tests (${{ matrix.persistence }})
needs: build
runs-on: ubuntu-latest
steps:
Expand All @@ -207,15 +213,11 @@ jobs:
node-version: 16.x
- name: Bump Node memory limit
run: echo "NODE_OPTIONS=--max_old_space_size=4096" >> $GITHUB_ENV
- name: Test setup and yarn install
run: |
cp config/ci.config.json config/project.json
yarn
- name: Set start timestamp env var
run: echo "FIREBASE_CI_TEST_START_TIME=$(date +%s)" >> $GITHUB_ENV
- name: Run unit tests
run: |
xvfb-run yarn lerna run --concurrency 4 test:ci --scope firebase-firestore-integration-test
node scripts/print_test_logs.js
- run: cp config/ci.config.json config/project.json
- run: yarn
- run: yarn build:${{ matrix.persistence }}
working-directory: integration/firestore
- run: xvfb-run yarn karma:singlerun
working-directory: integration/firestore
env:
FIREBASE_TOKEN: ${{ secrets.FIREBASE_CLI_TOKEN }}
18 changes: 10 additions & 8 deletions .github/workflows/test-changed-auth.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,14 @@ jobs:
steps:
# install Chrome first, so the correct version of webdriver can be installed by chromedriver when setting up the repo
- name: install Chrome stable
# Install Chrome version 110.0.5481.177-1 as test starts to fail on version 111.
# Temporary: Auth team will explore what's going wrong with the auth tests.
# Pin Chrome version 114.0.5735.90-1 to avoid install failures like "No such object: chromedriver/LATEST_RELEASE_115.0.5790".
# The failure happens because https://chromedriver.chromium.org/downloads only goes up to version 114.
# TODO(b/297380444) Update script to install the latest Chrome and ChromeDriver.
run: |
sudo apt-get update
sudo apt-get install wget
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
sudo apt-get install -f ./google-chrome-stable_110.0.5481.177-1_amd64.deb --allow-downgrades
sudo wget http://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_114.0.5735.90-1_amd64.deb
sudo apt-get install -f ./google-chrome-stable_114.0.5735.90-1_amd64.deb --allow-downgrades
- name: Checkout Repo
uses: actions/checkout@master
with:
Expand Down Expand Up @@ -48,16 +49,17 @@ jobs:

runs-on: ubuntu-20.04

# Chrome webdriver version is pinned to avoid install failures like "No such object: chromedriver/LATEST_RELEASE_115.0.5790"
# These are installed even in the Firefox test due to `yarn` command which pulls the devDependency listed in package.json.
# Pin Chrome version 114.0.5735.90-1 to avoid install failures like "No such object: chromedriver/LATEST_RELEASE_115.0.5790".
# The failure happens because https://chromedriver.chromium.org/downloads only goes up to version 114.
# TODO(b/297380444) Update script to install the latest Chrome and ChromeDriver.
steps:
- name: install Firefox stable
run: |
sudo apt-get update
sudo apt-get install firefox
sudo apt-get install wget
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
sudo apt-get install -f ./google-chrome-stable_110.0.5481.177-1_amd64.deb --allow-downgrades
sudo wget http://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_114.0.5735.90-1_amd64.deb
sudo apt-get install -f ./google-chrome-stable_114.0.5735.90-1_amd64.deb --allow-downgrades
- name: Checkout Repo
uses: actions/checkout@master
Expand Down
70 changes: 57 additions & 13 deletions .github/workflows/test-changed-firestore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,23 +35,27 @@ jobs:
yarn
- name: build
id: build
# TODO(wuandy): Separate yarn and egrep into steps, so build failure
# is captured by github actions.
run: yarn build:changed firestore | egrep "Skipping all"
run: |
set -o pipefail
yarn build:changed firestore | tee ${{ runner.temp }}/yarn.log.txt
continue-on-error: false
- name: Check if Firestore is changed
id: check-changed
run: egrep "Skipping all" ${{ runner.temp }}/yarn.log.txt
# Continue when "Skipping all" is not found
continue-on-error: true
- name: set output
# This means "Skipping all" was not found
if: steps.build.outcome != 'success'
if: steps.check-changed.outcome != 'success'
id: set-output
run: echo "CHANGED=true" >> "$GITHUB_OUTPUT";
- name: Archive build
if: ${{ !cancelled() && steps.build.outcome != 'success' }}
if: ${{ !cancelled() && steps.build.outcome == 'success' && steps.check-changed.outcome != 'success' }}
run: |
tar -cf build.tar --exclude="\.git" .
tar -cf build.tar --exclude=.git .
gzip build.tar
- name: Upload build archive
if: ${{ !cancelled() && steps.build.outcome != 'success' }}
if: ${{ !cancelled() && steps.build.outcome == 'success' && steps.check-changed.outcome != 'success' }}
uses: actions/upload-artifact@v3
with:
name: build.tar.gz
Expand Down Expand Up @@ -81,8 +85,7 @@ jobs:
- name: Bump Node memory limit
run: echo "NODE_OPTIONS=--max_old_space_size=4096" >> $GITHUB_ENV
- name: Test setup and yarn install
run: |
cp config/ci.config.json config/project.json
run: cp config/ci.config.json config/project.json
- name: Run compat tests
run: cd packages/firestore-compat && yarn run test:ci

Expand Down Expand Up @@ -112,11 +115,41 @@ jobs:
- name: Bump Node memory limit
run: echo "NODE_OPTIONS=--max_old_space_size=4096" >> $GITHUB_ENV
- name: Test setup and yarn install
run: |
cp config/ci.config.json config/project.json
run: cp config/ci.config.json config/project.json
- name: Run tests
run: cd packages/firestore && yarn run ${{ matrix.test-name }}

compat-test-firefox:
name: Test Firestore Compatible on Firefox
# Whatever version of Firefox comes with 22.04 is causing Firefox
# startup to hang when launched by karma. Need to look further into
# why.
runs-on: ubuntu-20.04
needs: build
if: ${{ needs.build.outputs.changed == 'true'}}
steps:
- name: install Firefox stable
run: |
sudo apt-get update
sudo apt-get install firefox
- name: Set up Node (14)
uses: actions/setup-node@v3
with:
node-version: 14.x
- name: Download build archive
uses: actions/download-artifact@v3
with:
name: build.tar.gz
- name: Unzip build artifact
run: tar xf build.tar.gz
- name: Bump Node memory limit
run: echo "NODE_OPTIONS=--max_old_space_size=4096" >> $GITHUB_ENV
- name: Test setup and yarn install
run: cp config/ci.config.json config/project.json
- name: Run compat tests
run: cd packages/firestore-compat && xvfb-run yarn run test:ci
env:
BROWSERS: 'Firefox'

test-firefox:
name: Test Firestore on Firefox
Expand Down Expand Up @@ -147,9 +180,20 @@ jobs:
- name: Bump Node memory limit
run: echo "NODE_OPTIONS=--max_old_space_size=4096" >> $GITHUB_ENV
- name: Test setup and yarn install
run: |
cp config/ci.config.json config/project.json
run: cp config/ci.config.json config/project.json
- name: Run tests
run: cd packages/firestore && xvfb-run yarn run ${{ matrix.test-name }}
env:
BROWSERS: 'Firefox'

# A job that fails if any required job in the test matrix fails,
# to be used as a required check for merging.
check-required-tests:
runs-on: ubuntu-latest
if: always()
name: Check all required tests results
needs: [build, test-chrome, compat-test-chrome]
steps:
- name: Check test matrix
if: needs.build.result == 'failure' || needs.test-chrome.result == 'failure' || needs.compat-test-chrome.result == 'failure'
run: exit 1
8 changes: 4 additions & 4 deletions integration/compat-interop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
"test:debug": "karma start --browsers Chrome --auto-watch"
},
"dependencies": {
"@firebase/app": "0.9.15",
"@firebase/app-compat": "0.2.15",
"@firebase/app": "0.9.17",
"@firebase/app-compat": "0.2.17",
"@firebase/analytics": "0.10.0",
"@firebase/analytics-compat": "0.2.6",
"@firebase/auth": "1.1.0",
"@firebase/auth-compat": "0.4.4",
"@firebase/auth": "1.3.0",
"@firebase/auth-compat": "0.4.6",
"@firebase/functions": "0.10.0",
"@firebase/functions-compat": "0.3.5",
"@firebase/messaging": "0.12.4",
Expand Down
2 changes: 1 addition & 1 deletion integration/firebase/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"test:ci": "node ../../scripts/run_tests_in_ci.js -s test"
},
"devDependencies": {
"firebase": "10.1.0",
"firebase": "10.3.0",
"@types/chai": "4.3.4",
"@types/mocha": "9.1.1",
"chai": "4.3.7",
Expand Down
7 changes: 3 additions & 4 deletions integration/firestore/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,16 @@
"build:deps": "lerna run --scope @firebase/'{app,firestore}' --include-dependencies build",
"build:persistence": "INCLUDE_FIRESTORE_PERSISTENCE=true gulp compile-tests",
"build:memory": "INCLUDE_FIRESTORE_PERSISTENCE=false gulp compile-tests",
"karma:singlerun": "karma start --single-run",
"prettier": "prettier --write '*.js' '*.ts'",
"test": "yarn build:memory; karma start --single-run; yarn build:persistence; karma start --single-run;",
"test:ci": "node ../../scripts/run_tests_in_ci.js -s test",
"test:persistence": " yarn build:persistence; karma start --single-run",
"test:persistence:debug": "yarn build:persistence; karma start --auto-watch --browsers Chrome",
"test:memory": "yarn build:memory; karma start --single-run",
"test:memory:debug": "yarn build:memory; karma start --auto-watch --browsers Chrome"
},
"dependencies": {
"@firebase/app": "0.9.15",
"@firebase/firestore": "4.1.0"
"@firebase/app": "0.9.17",
"@firebase/firestore": "4.1.2"
},
"devDependencies": {
"@types/mocha": "9.1.1",
Expand Down
2 changes: 1 addition & 1 deletion integration/messaging/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"test:manual": "mocha --exit"
},
"devDependencies": {
"firebase": "10.1.0",
"firebase": "10.3.0",
"chai": "4.3.7",
"chromedriver": "98.0.1",
"express": "4.18.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/analytics-compat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"@firebase/app-compat": "0.x"
},
"devDependencies": {
"@firebase/app-compat": "0.2.15",
"@firebase/app-compat": "0.2.17",
"rollup": "2.79.1",
"@rollup/plugin-json": "4.1.0",
"rollup-plugin-typescript2": "0.31.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/analytics/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
},
"license": "Apache-2.0",
"devDependencies": {
"@firebase/app": "0.9.15",
"@firebase/app": "0.9.17",
"rollup": "2.79.1",
"@rollup/plugin-commonjs": "21.1.0",
"@rollup/plugin-json": "4.1.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/app-check-compat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
},
"license": "Apache-2.0",
"devDependencies": {
"@firebase/app-compat": "0.2.15",
"@firebase/app-compat": "0.2.17",
"rollup": "2.79.1",
"@rollup/plugin-commonjs": "21.1.0",
"@rollup/plugin-json": "4.1.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/app-check/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
},
"license": "Apache-2.0",
"devDependencies": {
"@firebase/app": "0.9.15",
"@firebase/app": "0.9.17",
"rollup": "2.79.1",
"@rollup/plugin-commonjs": "21.1.0",
"@rollup/plugin-json": "4.1.0",
Expand Down
14 changes: 14 additions & 0 deletions packages/app-compat/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# @firebase/app-compat

## 0.2.17

### Patch Changes

- Updated dependencies []:
- @firebase/app@0.9.17

## 0.2.16

### Patch Changes

- Updated dependencies []:
- @firebase/app@0.9.16

## 0.2.15

### Patch Changes
Expand Down
4 changes: 2 additions & 2 deletions packages/app-compat/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@firebase/app-compat",
"version": "0.2.15",
"version": "0.2.17",
"description": "The primary entrypoint to the Firebase JS SDK",
"author": "Firebase <firebase-support@google.com> (https://firebase.google.com/)",
"main": "dist/index.cjs.js",
Expand Down Expand Up @@ -40,7 +40,7 @@
},
"license": "Apache-2.0",
"dependencies": {
"@firebase/app": "0.9.15",
"@firebase/app": "0.9.17",
"@firebase/util": "1.9.3",
"@firebase/logger": "0.4.0",
"@firebase/component": "0.6.4",
Expand Down
Loading

0 comments on commit 2ed1a48

Please sign in to comment.