From 43ef5fe530c73c9bc38e329ff3766fd2c4caef9b Mon Sep 17 00:00:00 2001 From: DellaBitta Date: Wed, 13 Dec 2023 10:19:54 -0500 Subject: [PATCH 01/23] debug output test --- .github/workflows/test-changed-auth.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-changed-auth.yml b/.github/workflows/test-changed-auth.yml index 06afad8df38..0d2a36055c0 100644 --- a/.github/workflows/test-changed-auth.yml +++ b/.github/workflows/test-changed-auth.yml @@ -14,7 +14,7 @@ name: Test Auth -on: pull_request +on: [push, pull_request] env: # make chromedriver detect installed Chrome version and download the corresponding driver @@ -37,6 +37,10 @@ jobs: - name: install Chrome stable run: | npx @puppeteer/browsers install chrome@stable + ls chrome + chromeVersionString=$(ls chrome) + echo $chromeVersionString + echo "::warning chromeVersion $chromeVersionString" - name: Checkout Repo uses: actions/checkout@master with: From a70044753baaf75a4d13b12f46127760ee307d4a Mon Sep 17 00:00:00 2001 From: DellaBitta Date: Wed, 13 Dec 2023 10:38:40 -0500 Subject: [PATCH 02/23] attempt to log a notice --- .github/workflows/test-changed-auth.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test-changed-auth.yml b/.github/workflows/test-changed-auth.yml index 0d2a36055c0..b63e2de4d2a 100644 --- a/.github/workflows/test-changed-auth.yml +++ b/.github/workflows/test-changed-auth.yml @@ -40,6 +40,7 @@ jobs: ls chrome chromeVersionString=$(ls chrome) echo $chromeVersionString + echo "::notice file=app.js,line=1,col=5,endColumn=7::Missing semicolon" echo "::warning chromeVersion $chromeVersionString" - name: Checkout Repo uses: actions/checkout@master From 89d4a301db995f4c8c1d02198ec1bb9c55197370 Mon Sep 17 00:00:00 2001 From: DellaBitta Date: Wed, 13 Dec 2023 10:46:11 -0500 Subject: [PATCH 03/23] customize notice string --- .github/workflows/test-changed-auth.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-changed-auth.yml b/.github/workflows/test-changed-auth.yml index b63e2de4d2a..f39599ff757 100644 --- a/.github/workflows/test-changed-auth.yml +++ b/.github/workflows/test-changed-auth.yml @@ -40,7 +40,7 @@ jobs: ls chrome chromeVersionString=$(ls chrome) echo $chromeVersionString - echo "::notice file=app.js,line=1,col=5,endColumn=7::Missing semicolon" + echo "::notice file=app.js,line=1,col=5,endColumn=7::$chromeVersionString" echo "::warning chromeVersion $chromeVersionString" - name: Checkout Repo uses: actions/checkout@master From 3ce17ead2989bbf4875310cec4da9c0c6fd621ad Mon Sep 17 00:00:00 2001 From: DellaBitta Date: Wed, 13 Dec 2023 10:46:53 -0500 Subject: [PATCH 04/23] warning control message --- .github/workflows/test-changed-auth.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/test-changed-auth.yml b/.github/workflows/test-changed-auth.yml index f39599ff757..9c9db0b7076 100644 --- a/.github/workflows/test-changed-auth.yml +++ b/.github/workflows/test-changed-auth.yml @@ -41,6 +41,8 @@ jobs: chromeVersionString=$(ls chrome) echo $chromeVersionString echo "::notice file=app.js,line=1,col=5,endColumn=7::$chromeVersionString" + echo "::warning file=app.js,line=1,col=5,endColumn=7::$chromeVersionString" + echo "::warning file=app.js,line=1,col=5,endColumn=7::control_test" echo "::warning chromeVersion $chromeVersionString" - name: Checkout Repo uses: actions/checkout@master From c8cfdf815b6e8e65bdce9b3f5a7d03a76a0206ba Mon Sep 17 00:00:00 2001 From: DellaBitta Date: Wed, 13 Dec 2023 11:01:11 -0500 Subject: [PATCH 05/23] attempt to detect and log chrome version mismatches --- .github/workflows/test-changed-auth.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/test-changed-auth.yml b/.github/workflows/test-changed-auth.yml index 9c9db0b7076..0818db34d78 100644 --- a/.github/workflows/test-changed-auth.yml +++ b/.github/workflows/test-changed-auth.yml @@ -23,6 +23,7 @@ env: # the beahvior to use the new URLs. CHROMEDRIVER_CDNURL: https://googlechromelabs.github.io/ CHROMEDRIVER_CDNBINARIESURL: https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/ + CHROME_VALIDATED_VERSION: blinux-120.0.6099.71 # Bump Node memory limit NODE_OPTIONS: "--max_old_space_size=4096" @@ -39,6 +40,10 @@ jobs: npx @puppeteer/browsers install chrome@stable ls chrome chromeVersionString=$(ls chrome) + if [ "$CHROME_VALIDATED_VERSION" != "$chromeVersionString" ]; then + echo "::warning Chromeversion doesn't match validated version. \ + Consider updating the validated version in the GitHub workflow if tests pass." + fi echo $chromeVersionString echo "::notice file=app.js,line=1,col=5,endColumn=7::$chromeVersionString" echo "::warning file=app.js,line=1,col=5,endColumn=7::$chromeVersionString" From 20760cfe386dcee69b9b8e0890abb471cdfb4516 Mon Sep 17 00:00:00 2001 From: DellaBitta Date: Wed, 13 Dec 2023 11:36:37 -0500 Subject: [PATCH 06/23] test message --- .github/workflows/test-changed-auth.yml | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test-changed-auth.yml b/.github/workflows/test-changed-auth.yml index 0818db34d78..1c6d4d28233 100644 --- a/.github/workflows/test-changed-auth.yml +++ b/.github/workflows/test-changed-auth.yml @@ -38,17 +38,13 @@ jobs: - name: install Chrome stable run: | npx @puppeteer/browsers install chrome@stable - ls chrome chromeVersionString=$(ls chrome) - if [ "$CHROME_VALIDATED_VERSION" != "$chromeVersionString" ]; then - echo "::warning Chromeversion doesn't match validated version. \ + if [ "$CHROME_VALIDATED_VERSION" != "$chromeVersionString" ]; then + echo "::warning The Chrome version doesn't match the previously validated version. \ + A new version must have been releaed.\n\ Consider updating the validated version in the GitHub workflow if tests pass." fi - echo $chromeVersionString - echo "::notice file=app.js,line=1,col=5,endColumn=7::$chromeVersionString" - echo "::warning file=app.js,line=1,col=5,endColumn=7::$chromeVersionString" - echo "::warning file=app.js,line=1,col=5,endColumn=7::control_test" - echo "::warning chromeVersion $chromeVersionString" + - name: Checkout Repo uses: actions/checkout@master with: From 732c39e20314327258808edbcbfb9da0082e74bf Mon Sep 17 00:00:00 2001 From: DellaBitta Date: Wed, 13 Dec 2023 11:40:51 -0500 Subject: [PATCH 07/23] hm --- .github/workflows/test-changed-auth.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test-changed-auth.yml b/.github/workflows/test-changed-auth.yml index 1c6d4d28233..397621ebb43 100644 --- a/.github/workflows/test-changed-auth.yml +++ b/.github/workflows/test-changed-auth.yml @@ -39,12 +39,15 @@ jobs: run: | npx @puppeteer/browsers install chrome@stable chromeVersionString=$(ls chrome) + echo $chromeVersionString + echo $CHROME_VALIDATED_VERSION if [ "$CHROME_VALIDATED_VERSION" != "$chromeVersionString" ]; then - echo "::warning The Chrome version doesn't match the previously validated version. \ - A new version must have been releaed.\n\ - Consider updating the validated version in the GitHub workflow if tests pass." + echo "::warning The Chrome version doesn't match the previously validated version. Consider updating the validated version in the GitHub workflow if tests pass." fi - + echo "::notice file=app.js,line=1,col=5,endColumn=7::$chromeVersionString" + echo "::warning file=app.js,line=1,col=5,endColumn=7::$chromeVersionString" + echo "::warning file=app.js,line=1,col=5,endColumn=7::control_test" + echo "::warning chromeVersion $chromeVersionString" - name: Checkout Repo uses: actions/checkout@master with: From f1074524fcf79f169f54d6c85a4ae1db54451ae7 Mon Sep 17 00:00:00 2001 From: DellaBitta Date: Wed, 13 Dec 2023 11:47:11 -0500 Subject: [PATCH 08/23] attempt second block of ::s --- .github/workflows/test-changed-auth.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/test-changed-auth.yml b/.github/workflows/test-changed-auth.yml index 397621ebb43..aed4df8ac36 100644 --- a/.github/workflows/test-changed-auth.yml +++ b/.github/workflows/test-changed-auth.yml @@ -42,12 +42,8 @@ jobs: echo $chromeVersionString echo $CHROME_VALIDATED_VERSION if [ "$CHROME_VALIDATED_VERSION" != "$chromeVersionString" ]; then - echo "::warning The Chrome version doesn't match the previously validated version. Consider updating the validated version in the GitHub workflow if tests pass." + echo "::warning ::The Chrome version doesn't match the previously validated version. Consider updating the validated version in the GitHub workflow if tests pass." fi - echo "::notice file=app.js,line=1,col=5,endColumn=7::$chromeVersionString" - echo "::warning file=app.js,line=1,col=5,endColumn=7::$chromeVersionString" - echo "::warning file=app.js,line=1,col=5,endColumn=7::control_test" - echo "::warning chromeVersion $chromeVersionString" - name: Checkout Repo uses: actions/checkout@master with: From 5273abb72450209e8aa0021a1ff7065f8ddcf5ac Mon Sep 17 00:00:00 2001 From: DellaBitta Date: Wed, 13 Dec 2023 14:15:45 -0500 Subject: [PATCH 09/23] log versions --- .github/workflows/test-changed-auth.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test-changed-auth.yml b/.github/workflows/test-changed-auth.yml index aed4df8ac36..f14876f57f6 100644 --- a/.github/workflows/test-changed-auth.yml +++ b/.github/workflows/test-changed-auth.yml @@ -43,6 +43,7 @@ jobs: echo $CHROME_VALIDATED_VERSION if [ "$CHROME_VALIDATED_VERSION" != "$chromeVersionString" ]; then echo "::warning ::The Chrome version doesn't match the previously validated version. Consider updating the validated version in the GitHub workflow if tests pass." + echo "::warning ::Previously validated version: ${CHROME_VALIDATED_VERSION} Installed version: chromeVersionString" fi - name: Checkout Repo uses: actions/checkout@master From c91daa17efa3236723a1c12d16bd6695f31c8b2c Mon Sep 17 00:00:00 2001 From: DellaBitta Date: Wed, 13 Dec 2023 14:21:37 -0500 Subject: [PATCH 10/23] correct the use of chromeVersionString --- .github/workflows/test-changed-auth.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-changed-auth.yml b/.github/workflows/test-changed-auth.yml index f14876f57f6..88c06292f2b 100644 --- a/.github/workflows/test-changed-auth.yml +++ b/.github/workflows/test-changed-auth.yml @@ -43,7 +43,7 @@ jobs: echo $CHROME_VALIDATED_VERSION if [ "$CHROME_VALIDATED_VERSION" != "$chromeVersionString" ]; then echo "::warning ::The Chrome version doesn't match the previously validated version. Consider updating the validated version in the GitHub workflow if tests pass." - echo "::warning ::Previously validated version: ${CHROME_VALIDATED_VERSION} Installed version: chromeVersionString" + echo "::warning ::Previously validated version: ${CHROME_VALIDATED_VERSION} vs. Installed version: $chromeVersionString" fi - name: Checkout Repo uses: actions/checkout@master From 525940337b8163b4098bbadb7b0e8c6189eedf7c Mon Sep 17 00:00:00 2001 From: DellaBitta Date: Thu, 14 Dec 2023 08:32:49 -0500 Subject: [PATCH 11/23] updated warning message, added it to test-all.yml --- .github/workflows/test-all.yml | 6 ++++++ .github/workflows/test-changed-auth.yml | 7 ++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test-all.yml b/.github/workflows/test-all.yml index f641f021933..6cfe6c8ba82 100644 --- a/.github/workflows/test-all.yml +++ b/.github/workflows/test-all.yml @@ -25,6 +25,7 @@ env: # the beahvior to use the new URLs. CHROMEDRIVER_CDNURL: https://googlechromelabs.github.io/ CHROMEDRIVER_CDNBINARIESURL: https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/ + CHROME_VALIDATED_VERSION: blinux-120.0.6099.71 artifactRetentionDays: 14 # Bump Node memory limit NODE_OPTIONS: "--max_old_space_size=4096" @@ -39,6 +40,11 @@ jobs: - name: install Chrome stable run: | npx @puppeteer/browsers install chrome@stable + chromeVersionString=$(ls chrome) + if [ "$CHROME_VALIDATED_VERSION" != "$chromeVersionString" ]; then + echo "::warning ::The Chrome version doesn't match the previously validated version. Consider updating CHROME_VALIDATED_VERSION in the GitHub workflow if tests pass." + echo "::warning ::Previously validated version: ${CHROME_VALIDATED_VERSION} vs. Installed version: $chromeVersionString" + fi - uses: actions/checkout@v3 - name: Set up Node (16) uses: actions/setup-node@v3 diff --git a/.github/workflows/test-changed-auth.yml b/.github/workflows/test-changed-auth.yml index 88c06292f2b..6e5dd941edc 100644 --- a/.github/workflows/test-changed-auth.yml +++ b/.github/workflows/test-changed-auth.yml @@ -35,14 +35,15 @@ jobs: steps: # install Chrome first, so the correct version of webdriver can be installed by chromedriver # when setting up the repo + # + # Note: we only need to check the chrome version change in one job as the warning annotation + # is appended to the entire workflow results, not just this job's results. - name: install Chrome stable run: | npx @puppeteer/browsers install chrome@stable chromeVersionString=$(ls chrome) - echo $chromeVersionString - echo $CHROME_VALIDATED_VERSION if [ "$CHROME_VALIDATED_VERSION" != "$chromeVersionString" ]; then - echo "::warning ::The Chrome version doesn't match the previously validated version. Consider updating the validated version in the GitHub workflow if tests pass." + echo "::warning ::The Chrome version doesn't match the previously validated version. Consider updating CHROME_VALIDATED_VERSION in the GitHub workflow if tests pass." echo "::warning ::Previously validated version: ${CHROME_VALIDATED_VERSION} vs. Installed version: $chromeVersionString" fi - name: Checkout Repo From 386d67a0f64839148c702a1939be1d3d966d44b1 Mon Sep 17 00:00:00 2001 From: DellaBitta Date: Thu, 14 Dec 2023 09:05:42 -0500 Subject: [PATCH 12/23] demangle chrome name to prevent warning --- .github/workflows/test-all.yml | 2 +- .github/workflows/test-changed-auth.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-all.yml b/.github/workflows/test-all.yml index 6cfe6c8ba82..000afb63197 100644 --- a/.github/workflows/test-all.yml +++ b/.github/workflows/test-all.yml @@ -25,7 +25,7 @@ env: # the beahvior to use the new URLs. CHROMEDRIVER_CDNURL: https://googlechromelabs.github.io/ CHROMEDRIVER_CDNBINARIESURL: https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/ - CHROME_VALIDATED_VERSION: blinux-120.0.6099.71 + CHROME_VALIDATED_VERSION: linux-120.0.6099.71 artifactRetentionDays: 14 # Bump Node memory limit NODE_OPTIONS: "--max_old_space_size=4096" diff --git a/.github/workflows/test-changed-auth.yml b/.github/workflows/test-changed-auth.yml index 6e5dd941edc..5a27e96fd46 100644 --- a/.github/workflows/test-changed-auth.yml +++ b/.github/workflows/test-changed-auth.yml @@ -23,7 +23,7 @@ env: # the beahvior to use the new URLs. CHROMEDRIVER_CDNURL: https://googlechromelabs.github.io/ CHROMEDRIVER_CDNBINARIESURL: https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/ - CHROME_VALIDATED_VERSION: blinux-120.0.6099.71 + CHROME_VALIDATED_VERSION: linux-120.0.6099.71 # Bump Node memory limit NODE_OPTIONS: "--max_old_space_size=4096" From fe443b530b5a78c53def6135da65042582aa17ab Mon Sep 17 00:00:00 2001 From: DellaBitta Date: Thu, 14 Dec 2023 16:19:42 -0500 Subject: [PATCH 13/23] log CHROME_VERSION_MISMATCH_MESSAGE on test failure --- scripts/run_tests_in_ci.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/run_tests_in_ci.js b/scripts/run_tests_in_ci.js index a5ba6cd3289..a92903da045 100644 --- a/scripts/run_tests_in_ci.js +++ b/scripts/run_tests_in_ci.js @@ -88,6 +88,12 @@ const argv = yargs.options({ console.log(stdout); console.error(stderr); writeLogs('Failure', name, stdout + '\n' + stderr); + + const chrome_notes = process.env.CHROME_VERSION_NOTES; + if(chrome_notes) { + console.warn(chrome_notes) + } + process.exit(1); } })(); From fd00cc045c99cdcfe3c9cf4ce1110d4d679dee8c Mon Sep 17 00:00:00 2001 From: DellaBitta Date: Thu, 14 Dec 2023 16:20:40 -0500 Subject: [PATCH 14/23] export CHROME_VERSION_MISMATCH_MESSAGE in workflows --- .github/workflows/test-all.yml | 21 +++++++++++++-------- .github/workflows/test-changed-auth.yml | 7 ++++++- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/.github/workflows/test-all.yml b/.github/workflows/test-all.yml index 000afb63197..13c9abb6eac 100644 --- a/.github/workflows/test-all.yml +++ b/.github/workflows/test-all.yml @@ -25,7 +25,8 @@ env: # the beahvior to use the new URLs. CHROMEDRIVER_CDNURL: https://googlechromelabs.github.io/ CHROMEDRIVER_CDNBINARIESURL: https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/ - CHROME_VALIDATED_VERSION: linux-120.0.6099.71 + CHROME_VALIDATED_VERSION: blinux-120.0.6099.71 + CHROME_VERSION_MISMATCH_MESSAGE: "The Chrome version doesn't match the previously validated version. Consider updating CHROME_VALIDATED_VERSION in the GitHub workflow if tests pass." artifactRetentionDays: 14 # Bump Node memory limit NODE_OPTIONS: "--max_old_space_size=4096" @@ -38,13 +39,17 @@ 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 - run: | - npx @puppeteer/browsers install chrome@stable - chromeVersionString=$(ls chrome) - if [ "$CHROME_VALIDATED_VERSION" != "$chromeVersionString" ]; then - echo "::warning ::The Chrome version doesn't match the previously validated version. Consider updating CHROME_VALIDATED_VERSION in the GitHub workflow if tests pass." - echo "::warning ::Previously validated version: ${CHROME_VALIDATED_VERSION} vs. Installed version: $chromeVersionString" - fi + run: | + npx @puppeteer/browsers install chrome@stable + chromeVersionString=$(ls chrome) + if [ "$CHROME_VALIDATED_VERSION" != "$chromeVersionString" ]; then + echo "::warning ::The Chrome version doesn't match the previously validated version. Consider updating CHROME_VALIDATED_VERSION in the GitHub workflow if tests pass." + echo "::warning ::Previously validated version: ${CHROME_VALIDATED_VERSION} vs. Installed version: $chromeVersionString" + echo "CHROME_VERSION_NOTES=$CHROME_VERSION_MISMATCH_MESSAGE" >> "$GITHUB_ENV" + fi + - name: Test Evn TEMP + run: | + echo $CHROME_VERSION_NOTES=$CHROME_VERSION_MISMATCH_MESSAGE - uses: actions/checkout@v3 - name: Set up Node (16) uses: actions/setup-node@v3 diff --git a/.github/workflows/test-changed-auth.yml b/.github/workflows/test-changed-auth.yml index 5a27e96fd46..dacadcb2584 100644 --- a/.github/workflows/test-changed-auth.yml +++ b/.github/workflows/test-changed-auth.yml @@ -23,7 +23,8 @@ env: # the beahvior to use the new URLs. CHROMEDRIVER_CDNURL: https://googlechromelabs.github.io/ CHROMEDRIVER_CDNBINARIESURL: https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/ - CHROME_VALIDATED_VERSION: linux-120.0.6099.71 + CHROME_VALIDATED_VERSION: blinux-120.0.6099.71 + CHROME_VERSION_MISMATCH_MESSAGE: "The Chrome version doesn't match the previously validated version. Consider updating CHROME_VALIDATED_VERSION in the GitHub workflow if tests pass." # Bump Node memory limit NODE_OPTIONS: "--max_old_space_size=4096" @@ -45,7 +46,11 @@ jobs: if [ "$CHROME_VALIDATED_VERSION" != "$chromeVersionString" ]; then echo "::warning ::The Chrome version doesn't match the previously validated version. Consider updating CHROME_VALIDATED_VERSION in the GitHub workflow if tests pass." echo "::warning ::Previously validated version: ${CHROME_VALIDATED_VERSION} vs. Installed version: $chromeVersionString" + echo "CHROME_VERSION_NOTES=$CHROME_VERSION_MISMATCH_MESSAGE" >> "$GITHUB_ENV" fi + - name: Test Evn TEMP + run: | + echo $CHROME_VERSION_NOTES=$CHROME_VERSION_MISMATCH_MESSAGE - name: Checkout Repo uses: actions/checkout@master with: From a87b6175bf1cf8d2bb4fdaa863c8e3bb6650118f Mon Sep 17 00:00:00 2001 From: DellaBitta Date: Thu, 14 Dec 2023 16:20:58 -0500 Subject: [PATCH 15/23] temporarily cause auth tests to fail. --- packages/auth/test/integration/flows/anonymous.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/auth/test/integration/flows/anonymous.test.ts b/packages/auth/test/integration/flows/anonymous.test.ts index 1d41423f563..69acbd2c16f 100644 --- a/packages/auth/test/integration/flows/anonymous.test.ts +++ b/packages/auth/test/integration/flows/anonymous.test.ts @@ -52,7 +52,7 @@ describe('Integration test: anonymous auth', () => { expect(userCred.operationType).to.eq(OperationType.SIGN_IN); const user = userCred.user; - expect(user.isAnonymous).to.be.true; + expect(user.isAnonymous).to.be.false; expect(user.uid).to.be.a('string'); }); From a1b920f0bf29945eab6ac4ebe6ee3f93cf4c8a5e Mon Sep 17 00:00:00 2001 From: DellaBitta Date: Thu, 14 Dec 2023 16:23:14 -0500 Subject: [PATCH 16/23] testall yaml fix --- .github/workflows/test-all.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/test-all.yml b/.github/workflows/test-all.yml index 13c9abb6eac..5e8c9e8bd87 100644 --- a/.github/workflows/test-all.yml +++ b/.github/workflows/test-all.yml @@ -39,17 +39,17 @@ 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 - run: | - npx @puppeteer/browsers install chrome@stable - chromeVersionString=$(ls chrome) - if [ "$CHROME_VALIDATED_VERSION" != "$chromeVersionString" ]; then - echo "::warning ::The Chrome version doesn't match the previously validated version. Consider updating CHROME_VALIDATED_VERSION in the GitHub workflow if tests pass." - echo "::warning ::Previously validated version: ${CHROME_VALIDATED_VERSION} vs. Installed version: $chromeVersionString" - echo "CHROME_VERSION_NOTES=$CHROME_VERSION_MISMATCH_MESSAGE" >> "$GITHUB_ENV" - fi - - name: Test Evn TEMP - run: | - echo $CHROME_VERSION_NOTES=$CHROME_VERSION_MISMATCH_MESSAGE + run: | + npx @puppeteer/browsers install chrome@stable + chromeVersionString=$(ls chrome) + if [ "$CHROME_VALIDATED_VERSION" != "$chromeVersionString" ]; then + echo "::warning ::The Chrome version doesn't match the previously validated version. Consider updating CHROME_VALIDATED_VERSION in the GitHub workflow if tests pass." + echo "::warning ::Previously validated version: ${CHROME_VALIDATED_VERSION} vs. Installed version: $chromeVersionString" + echo "CHROME_VERSION_NOTES=$CHROME_VERSION_MISMATCH_MESSAGE" >> "$GITHUB_ENV" + fi + - name: Test Evn TEMP + run: | + echo $CHROME_VERSION_NOTES=$CHROME_VERSION_MISMATCH_MESSAGE - uses: actions/checkout@v3 - name: Set up Node (16) uses: actions/setup-node@v3 From 103aa24cdcae0cf0a7a475a4e592864189e806b6 Mon Sep 17 00:00:00 2001 From: DellaBitta Date: Thu, 14 Dec 2023 16:36:41 -0500 Subject: [PATCH 17/23] move output to before WriteLogs --- scripts/run_tests_in_ci.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/run_tests_in_ci.js b/scripts/run_tests_in_ci.js index a92903da045..b0ca055bb76 100644 --- a/scripts/run_tests_in_ci.js +++ b/scripts/run_tests_in_ci.js @@ -87,13 +87,14 @@ const argv = yargs.options({ console.error('Failure: ' + name); console.log(stdout); console.error(stderr); - writeLogs('Failure', name, stdout + '\n' + stderr); const chrome_notes = process.env.CHROME_VERSION_NOTES; if(chrome_notes) { - console.warn(chrome_notes) + console.error(chrome_notes) } - + + writeLogs('Failure', name, stdout + '\n' + stderr); + process.exit(1); } })(); From c5cb816c6ff9776f7ba5b30c7e0e7aeb0910fdbd Mon Sep 17 00:00:00 2001 From: DellaBitta Date: Thu, 14 Dec 2023 18:31:25 -0500 Subject: [PATCH 18/23] more output --- .github/workflows/test-all.yml | 18 +++++++++--------- .github/workflows/test-changed-auth.yml | 5 ++--- scripts/ci-test/test_changed.ts | 8 ++++++++ scripts/run_tests_in_ci.js | 2 ++ 4 files changed, 21 insertions(+), 12 deletions(-) diff --git a/.github/workflows/test-all.yml b/.github/workflows/test-all.yml index 5e8c9e8bd87..3a8781b2255 100644 --- a/.github/workflows/test-all.yml +++ b/.github/workflows/test-all.yml @@ -41,15 +41,6 @@ jobs: - name: install Chrome stable run: | npx @puppeteer/browsers install chrome@stable - chromeVersionString=$(ls chrome) - if [ "$CHROME_VALIDATED_VERSION" != "$chromeVersionString" ]; then - echo "::warning ::The Chrome version doesn't match the previously validated version. Consider updating CHROME_VALIDATED_VERSION in the GitHub workflow if tests pass." - echo "::warning ::Previously validated version: ${CHROME_VALIDATED_VERSION} vs. Installed version: $chromeVersionString" - echo "CHROME_VERSION_NOTES=$CHROME_VERSION_MISMATCH_MESSAGE" >> "$GITHUB_ENV" - fi - - name: Test Evn TEMP - run: | - echo $CHROME_VERSION_NOTES=$CHROME_VERSION_MISMATCH_MESSAGE - uses: actions/checkout@v3 - name: Set up Node (16) uses: actions/setup-node@v3 @@ -126,6 +117,15 @@ jobs: - name: install Chrome stable run: | npx @puppeteer/browsers install chrome@stable + chromeVersionString=$(ls chrome) + if [ "$CHROME_VALIDATED_VERSION" != "$chromeVersionString" ]; then + echo "::warning ::The Chrome version doesn't match the previously validated version. Consider updating CHROME_VALIDATED_VERSION in the GitHub workflow if tests pass." + echo "::warning ::Previously validated version: ${CHROME_VALIDATED_VERSION} vs. Installed version: $chromeVersionString" + echo "CHROME_VERSION_NOTES=$CHROME_VERSION_MISMATCH_MESSAGE" >> "$GITHUB_ENV" + fi + - name: Test Evn TEMP + run: | + echo $CHROME_VERSION_NOTES=$CHROME_VERSION_MISMATCH_MESSAGE - name: Download build archive uses: actions/download-artifact@v3 with: diff --git a/.github/workflows/test-changed-auth.yml b/.github/workflows/test-changed-auth.yml index dacadcb2584..d6de69587e5 100644 --- a/.github/workflows/test-changed-auth.yml +++ b/.github/workflows/test-changed-auth.yml @@ -24,7 +24,6 @@ env: CHROMEDRIVER_CDNURL: https://googlechromelabs.github.io/ CHROMEDRIVER_CDNBINARIESURL: https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/ CHROME_VALIDATED_VERSION: blinux-120.0.6099.71 - CHROME_VERSION_MISMATCH_MESSAGE: "The Chrome version doesn't match the previously validated version. Consider updating CHROME_VALIDATED_VERSION in the GitHub workflow if tests pass." # Bump Node memory limit NODE_OPTIONS: "--max_old_space_size=4096" @@ -32,7 +31,6 @@ jobs: test-chrome: name: Test Auth on Chrome and Node If Changed runs-on: ubuntu-latest - steps: # install Chrome first, so the correct version of webdriver can be installed by chromedriver # when setting up the repo @@ -40,10 +38,11 @@ jobs: # Note: we only need to check the chrome version change in one job as the warning annotation # is appended to the entire workflow results, not just this job's results. - name: install Chrome stable + env: env: CHROME_VERSION_MISMATCH_MESSAGE: "The Chrome version doesn't match the previously validated version. Consider updating CHROME_VALIDATED_VERSION in the GitHub workflow if tests pass." run: | npx @puppeteer/browsers install chrome@stable chromeVersionString=$(ls chrome) - if [ "$CHROME_VALIDATED_VERSION" != "$chromeVersionString" ]; then + if [ "$CHROME_VALIDATED_VERSION" != "$chromeVersionString" ]; then echo "::warning ::The Chrome version doesn't match the previously validated version. Consider updating CHROME_VALIDATED_VERSION in the GitHub workflow if tests pass." echo "::warning ::Previously validated version: ${CHROME_VALIDATED_VERSION} vs. Installed version: $chromeVersionString" echo "CHROME_VERSION_NOTES=$CHROME_VERSION_MISMATCH_MESSAGE" >> "$GITHUB_ENV" diff --git a/scripts/ci-test/test_changed.ts b/scripts/ci-test/test_changed.ts index 5d2f30865ed..9e769e07bb9 100644 --- a/scripts/ci-test/test_changed.ts +++ b/scripts/ci-test/test_changed.ts @@ -80,6 +80,14 @@ async function runTests(config: TestConfig) { process.exit(0); } catch (e) { console.error(chalk`{red ${e}}`); + + const chrome_notes = process.env.CHROME_VERSION_NOTES; + if(chrome_notes) { + console.error(chrome_notes) + } else { + console.error("No chrome notes!") + } + process.exit(1); } } diff --git a/scripts/run_tests_in_ci.js b/scripts/run_tests_in_ci.js index b0ca055bb76..4b19afb3484 100644 --- a/scripts/run_tests_in_ci.js +++ b/scripts/run_tests_in_ci.js @@ -91,6 +91,8 @@ const argv = yargs.options({ const chrome_notes = process.env.CHROME_VERSION_NOTES; if(chrome_notes) { console.error(chrome_notes) + } else { + console.error("No chrome notes!") } writeLogs('Failure', name, stdout + '\n' + stderr); From 105831e2bf879833d23782385c53f6e21a976814 Mon Sep 17 00:00:00 2001 From: DellaBitta Date: Thu, 14 Dec 2023 18:34:24 -0500 Subject: [PATCH 19/23] fix yaml --- .github/workflows/test-changed-auth.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-changed-auth.yml b/.github/workflows/test-changed-auth.yml index d6de69587e5..e3be0925f9d 100644 --- a/.github/workflows/test-changed-auth.yml +++ b/.github/workflows/test-changed-auth.yml @@ -38,7 +38,8 @@ jobs: # Note: we only need to check the chrome version change in one job as the warning annotation # is appended to the entire workflow results, not just this job's results. - name: install Chrome stable - env: env: CHROME_VERSION_MISMATCH_MESSAGE: "The Chrome version doesn't match the previously validated version. Consider updating CHROME_VALIDATED_VERSION in the GitHub workflow if tests pass." + env: + CHROME_VERSION_MISMATCH_MESSAGE: "The Chrome version doesn't match the previously validated version. Consider updating CHROME_VALIDATED_VERSION in the GitHub workflow if tests pass." run: | npx @puppeteer/browsers install chrome@stable chromeVersionString=$(ls chrome) From 10b530b7c0e6874a534dc0959748fbd32a051993 Mon Sep 17 00:00:00 2001 From: DellaBitta Date: Thu, 14 Dec 2023 18:42:51 -0500 Subject: [PATCH 20/23] red formatting, and a yo test --- scripts/ci-test/test_changed.ts | 4 +++- scripts/run_tests_in_ci.js | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/ci-test/test_changed.ts b/scripts/ci-test/test_changed.ts index 9e769e07bb9..2f8ef9043bf 100644 --- a/scripts/ci-test/test_changed.ts +++ b/scripts/ci-test/test_changed.ts @@ -83,7 +83,9 @@ async function runTests(config: TestConfig) { const chrome_notes = process.env.CHROME_VERSION_NOTES; if(chrome_notes) { - console.error(chrome_notes) + console.error(); + console.error(chalk`{red ${chrome_notes}}`); + console.error(" yo "); } else { console.error("No chrome notes!") } diff --git a/scripts/run_tests_in_ci.js b/scripts/run_tests_in_ci.js index 4b19afb3484..9a9dffe9ab4 100644 --- a/scripts/run_tests_in_ci.js +++ b/scripts/run_tests_in_ci.js @@ -90,9 +90,9 @@ const argv = yargs.options({ const chrome_notes = process.env.CHROME_VERSION_NOTES; if(chrome_notes) { + console.error() console.error(chrome_notes) - } else { - console.error("No chrome notes!") + console.error() } writeLogs('Failure', name, stdout + '\n' + stderr); From c74725dad2bbef43ea8aecd8cadfce05768e8fda Mon Sep 17 00:00:00 2001 From: DellaBitta Date: Thu, 14 Dec 2023 18:57:44 -0500 Subject: [PATCH 21/23] one more run_tests_in_cjs.js --- scripts/ci-test/test_changed.ts | 4 +--- scripts/run_tests_in_ci.js | 9 +++++---- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/scripts/ci-test/test_changed.ts b/scripts/ci-test/test_changed.ts index 2f8ef9043bf..16eb9bca7d9 100644 --- a/scripts/ci-test/test_changed.ts +++ b/scripts/ci-test/test_changed.ts @@ -85,9 +85,7 @@ async function runTests(config: TestConfig) { if(chrome_notes) { console.error(); console.error(chalk`{red ${chrome_notes}}`); - console.error(" yo "); - } else { - console.error("No chrome notes!") + console.error(); } process.exit(1); diff --git a/scripts/run_tests_in_ci.js b/scripts/run_tests_in_ci.js index 9a9dffe9ab4..250d7fec759 100644 --- a/scripts/run_tests_in_ci.js +++ b/scripts/run_tests_in_ci.js @@ -88,11 +88,12 @@ const argv = yargs.options({ console.log(stdout); console.error(stderr); - const chrome_notes = process.env.CHROME_VERSION_NOTES; - if(chrome_notes) { - console.error() - console.error(chrome_notes) + if(process.env.CHROME_VERSION_NOTES) { console.error() + console.error(process.env.CHROME_VERSION_NOTES) + console.error(" yo yo ho ho ") + } else { + } writeLogs('Failure', name, stdout + '\n' + stderr); From e277ce862041caf9ab575473b9a1545d484d3d6e Mon Sep 17 00:00:00 2001 From: DellaBitta Date: Thu, 14 Dec 2023 19:40:51 -0500 Subject: [PATCH 22/23] remove purposeful failures --- .github/workflows/test-all.yml | 2 +- .github/workflows/test-changed-auth.yml | 2 +- packages/auth/test/integration/flows/anonymous.test.ts | 2 +- scripts/run_tests_in_ci.js | 4 +--- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test-all.yml b/.github/workflows/test-all.yml index 3a8781b2255..10d67c00930 100644 --- a/.github/workflows/test-all.yml +++ b/.github/workflows/test-all.yml @@ -25,7 +25,7 @@ env: # the beahvior to use the new URLs. CHROMEDRIVER_CDNURL: https://googlechromelabs.github.io/ CHROMEDRIVER_CDNBINARIESURL: https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/ - CHROME_VALIDATED_VERSION: blinux-120.0.6099.71 + CHROME_VALIDATED_VERSION: linux-120.0.6099.71 CHROME_VERSION_MISMATCH_MESSAGE: "The Chrome version doesn't match the previously validated version. Consider updating CHROME_VALIDATED_VERSION in the GitHub workflow if tests pass." artifactRetentionDays: 14 # Bump Node memory limit diff --git a/.github/workflows/test-changed-auth.yml b/.github/workflows/test-changed-auth.yml index e3be0925f9d..2eba81a8e99 100644 --- a/.github/workflows/test-changed-auth.yml +++ b/.github/workflows/test-changed-auth.yml @@ -23,7 +23,7 @@ env: # the beahvior to use the new URLs. CHROMEDRIVER_CDNURL: https://googlechromelabs.github.io/ CHROMEDRIVER_CDNBINARIESURL: https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/ - CHROME_VALIDATED_VERSION: blinux-120.0.6099.71 + CHROME_VALIDATED_VERSION: linux-120.0.6099.71 # Bump Node memory limit NODE_OPTIONS: "--max_old_space_size=4096" diff --git a/packages/auth/test/integration/flows/anonymous.test.ts b/packages/auth/test/integration/flows/anonymous.test.ts index 69acbd2c16f..1d41423f563 100644 --- a/packages/auth/test/integration/flows/anonymous.test.ts +++ b/packages/auth/test/integration/flows/anonymous.test.ts @@ -52,7 +52,7 @@ describe('Integration test: anonymous auth', () => { expect(userCred.operationType).to.eq(OperationType.SIGN_IN); const user = userCred.user; - expect(user.isAnonymous).to.be.false; + expect(user.isAnonymous).to.be.true; expect(user.uid).to.be.a('string'); }); diff --git a/scripts/run_tests_in_ci.js b/scripts/run_tests_in_ci.js index 250d7fec759..4e39e1bfd52 100644 --- a/scripts/run_tests_in_ci.js +++ b/scripts/run_tests_in_ci.js @@ -91,9 +91,7 @@ const argv = yargs.options({ if(process.env.CHROME_VERSION_NOTES) { console.error() console.error(process.env.CHROME_VERSION_NOTES) - console.error(" yo yo ho ho ") - } else { - + console.error() } writeLogs('Failure', name, stdout + '\n' + stderr); From 8cfec2149e787834b766fbba8f75d0b89f070ae5 Mon Sep 17 00:00:00 2001 From: DellaBitta Date: Thu, 14 Dec 2023 20:04:41 -0500 Subject: [PATCH 23/23] formatter. --- scripts/ci-test/test_changed.ts | 2 +- scripts/run_tests_in_ci.js | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/ci-test/test_changed.ts b/scripts/ci-test/test_changed.ts index 16eb9bca7d9..ed60cdc8e4a 100644 --- a/scripts/ci-test/test_changed.ts +++ b/scripts/ci-test/test_changed.ts @@ -82,7 +82,7 @@ async function runTests(config: TestConfig) { console.error(chalk`{red ${e}}`); const chrome_notes = process.env.CHROME_VERSION_NOTES; - if(chrome_notes) { + if (chrome_notes) { console.error(); console.error(chalk`{red ${chrome_notes}}`); console.error(); diff --git a/scripts/run_tests_in_ci.js b/scripts/run_tests_in_ci.js index 4e39e1bfd52..96f85979165 100644 --- a/scripts/run_tests_in_ci.js +++ b/scripts/run_tests_in_ci.js @@ -88,10 +88,10 @@ const argv = yargs.options({ console.log(stdout); console.error(stderr); - if(process.env.CHROME_VERSION_NOTES) { - console.error() - console.error(process.env.CHROME_VERSION_NOTES) - console.error() + if (process.env.CHROME_VERSION_NOTES) { + console.error(); + console.error(process.env.CHROME_VERSION_NOTES); + console.error(); } writeLogs('Failure', name, stdout + '\n' + stderr);