From 7939cf986652282eac4adff5aaa19431db270bc4 Mon Sep 17 00:00:00 2001 From: Ryan Manuel Date: Mon, 13 Feb 2023 09:17:57 -0600 Subject: [PATCH 01/11] Update workflows.yml --- .circleci/workflows.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.circleci/workflows.yml b/.circleci/workflows.yml index 5627bc82e55f..376625b158a1 100644 --- a/.circleci/workflows.yml +++ b/.circleci/workflows.yml @@ -28,7 +28,8 @@ mainBuildFilters: &mainBuildFilters only: - develop - /^release\/\d+\.\d+\.\d+$/ - - 'mikep/22825-next-middleware' + # use the following branch as well to ensure that v8 snapshot cache updates are fully tested + - 'update-v8-snapshot-cache-on-develop' # usually we don't build Mac app - it takes a long time # but sometimes we want to really confirm we are doing the right thing @@ -37,7 +38,8 @@ macWorkflowFilters: &darwin-workflow-filters when: or: - equal: [ develop, << pipeline.git.branch >> ] - - equal: [ 'mikep/22825-next-middleware', << pipeline.git.branch >> ] + # use the following branch as well to ensure that v8 snapshot cache updates are fully tested + - equal: [ 'update-v8-snapshot-cache-on-develop', << pipeline.git.branch >> ] - matches: pattern: /^release\/\d+\.\d+\.\d+$/ value: << pipeline.git.branch >> @@ -46,7 +48,8 @@ linuxArm64WorkflowFilters: &linux-arm64-workflow-filters when: or: - equal: [ develop, << pipeline.git.branch >> ] - - equal: [ 'mikep/22825-next-middleware', << pipeline.git.branch >> ] + # use the following branch as well to ensure that v8 snapshot cache updates are fully tested + - equal: [ 'update-v8-snapshot-cache-on-develop', << pipeline.git.branch >> ] - matches: pattern: /^release\/\d+\.\d+\.\d+$/ value: << pipeline.git.branch >> @@ -64,7 +67,8 @@ windowsWorkflowFilters: &windows-workflow-filters when: or: - equal: [ develop, << pipeline.git.branch >> ] - - equal: [ 'mschile/chrome_memory_fix', << pipeline.git.branch >> ] + # use the following branch as well to ensure that v8 snapshot cache updates are fully tested + - equal: [ 'update-v8-snapshot-cache-on-develop', << pipeline.git.branch >> ] - matches: pattern: /^release\/\d+\.\d+\.\d+$/ value: << pipeline.git.branch >> From 322873a69303e484bf2961668476f6288178e2f5 Mon Sep 17 00:00:00 2001 From: Ryan Manuel Date: Mon, 13 Feb 2023 09:45:58 -0600 Subject: [PATCH 02/11] Update update_v8_snapshot_cache.yml --- .github/workflows/update_v8_snapshot_cache.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update_v8_snapshot_cache.yml b/.github/workflows/update_v8_snapshot_cache.yml index 9b05036dec79..63b5eb4471be 100644 --- a/.github/workflows/update_v8_snapshot_cache.yml +++ b/.github/workflows/update_v8_snapshot_cache.yml @@ -51,7 +51,7 @@ jobs: uses: actions/checkout@v3 with: fetch-depth: 0 - token: ${{ secrets.GITHUB_TOKEN }} + token: ${{ secrets.BOT_GITHUB_TOKEN }} ref: ${{ env.BASE_BRANCH }} - name: Set committer info ## attribute the commit to cypress-bot: https://github.community/t/logging-into-git-as-a-github-app/115916 From 4fcc2efb679babf127c1c8dbab99903436d48e54 Mon Sep 17 00:00:00 2001 From: Ryan Manuel Date: Mon, 13 Feb 2023 09:47:13 -0600 Subject: [PATCH 03/11] Update workflows.yml --- .circleci/workflows.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.circleci/workflows.yml b/.circleci/workflows.yml index 376625b158a1..413ae3028691 100644 --- a/.circleci/workflows.yml +++ b/.circleci/workflows.yml @@ -134,7 +134,8 @@ commands: - run: name: Check current branch to persist artifacts command: | - if [[ "$CIRCLE_BRANCH" != "develop" && "$CIRCLE_BRANCH" != "release/"* && "$CIRCLE_BRANCH" != "mikep/22825-next-middleware" ]]; then + # Keep update-v8-snapshot-cache-on-develop to ensure that we fully test v8 snapshot cache updates + if [[ "$CIRCLE_BRANCH" != "develop" && "$CIRCLE_BRANCH" != "release/"* && "$CIRCLE_BRANCH" != "update-v8-snapshot-cache-on-develop" ]]; then echo "Not uploading artifacts or posting install comment for this branch." circleci-agent step halt fi From ab80654ff81d9b723590213ba15d5515eb9fbe6e Mon Sep 17 00:00:00 2001 From: Ryan Manuel Date: Mon, 13 Feb 2023 10:29:22 -0600 Subject: [PATCH 04/11] Update update_v8_snapshot_cache.yml --- .github/workflows/update_v8_snapshot_cache.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update_v8_snapshot_cache.yml b/.github/workflows/update_v8_snapshot_cache.yml index 63b5eb4471be..31dd2e9e5cfd 100644 --- a/.github/workflows/update_v8_snapshot_cache.yml +++ b/.github/workflows/update_v8_snapshot_cache.yml @@ -51,7 +51,7 @@ jobs: uses: actions/checkout@v3 with: fetch-depth: 0 - token: ${{ secrets.BOT_GITHUB_TOKEN }} + token: ${{ secrets.BOT_GITHUB_ACTION_TOKEN }} ref: ${{ env.BASE_BRANCH }} - name: Set committer info ## attribute the commit to cypress-bot: https://github.community/t/logging-into-git-as-a-github-app/115916 From 659e9a6f7b5497ff49b62318b982016e918725b1 Mon Sep 17 00:00:00 2001 From: Ryan Manuel Date: Mon, 13 Feb 2023 10:45:21 -0600 Subject: [PATCH 05/11] Update update_v8_snapshot_cache.yml --- .github/workflows/update_v8_snapshot_cache.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/update_v8_snapshot_cache.yml b/.github/workflows/update_v8_snapshot_cache.yml index 31dd2e9e5cfd..48b23d7f4535 100644 --- a/.github/workflows/update_v8_snapshot_cache.yml +++ b/.github/workflows/update_v8_snapshot_cache.yml @@ -1,6 +1,8 @@ name: Update V8 Snapshot Cache on: schedule: + # Run everyday at 00:00 UTC + - cron: '0 0 * * *' # Run every Wednesday at 00:00 UTC - cron: '0 0 * * 3' push: @@ -35,7 +37,8 @@ jobs: env: CYPRESS_BOT_APP_ID: ${{ secrets.RAM_APP }} BASE_BRANCH: ${{ inputs.branch || github.ref_name }} - GENERATE_FROM_SCRATCH: ${{ inputs.generate_from_scratch == true || github.event_name == 'schedule' }} + # Flex the generate from scratch based on input and which schedule we are running. Only do it weekly. + GENERATE_FROM_SCRATCH: ${{ inputs.generate_from_scratch == true || (github.event_name == 'schedule' && github.event.schedule == '0 0 * * 3') }} steps: - name: Determine snapshot files - Windows if: ${{ matrix.platform == 'windows-latest' }} From b75f43a328295e312676a520184e1eea19f283d6 Mon Sep 17 00:00:00 2001 From: Ryan Manuel Date: Mon, 13 Feb 2023 10:46:05 -0600 Subject: [PATCH 06/11] Update .github/workflows/update_v8_snapshot_cache.yml --- .github/workflows/update_v8_snapshot_cache.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update_v8_snapshot_cache.yml b/.github/workflows/update_v8_snapshot_cache.yml index 48b23d7f4535..557dcfcf2925 100644 --- a/.github/workflows/update_v8_snapshot_cache.yml +++ b/.github/workflows/update_v8_snapshot_cache.yml @@ -37,7 +37,7 @@ jobs: env: CYPRESS_BOT_APP_ID: ${{ secrets.RAM_APP }} BASE_BRANCH: ${{ inputs.branch || github.ref_name }} - # Flex the generate from scratch based on input and which schedule we are running. Only do it weekly. + # Flex the generate from scratch option based on manual input or if we are on the weekly schedule GENERATE_FROM_SCRATCH: ${{ inputs.generate_from_scratch == true || (github.event_name == 'schedule' && github.event.schedule == '0 0 * * 3') }} steps: - name: Determine snapshot files - Windows From 3ef8ad13f3514dd66fab3de01b7839e143e2ec14 Mon Sep 17 00:00:00 2001 From: Ryan Manuel Date: Mon, 13 Feb 2023 10:49:30 -0600 Subject: [PATCH 07/11] Update snapshot-meta.json --- tooling/v8-snapshot/cache/linux/snapshot-meta.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tooling/v8-snapshot/cache/linux/snapshot-meta.json b/tooling/v8-snapshot/cache/linux/snapshot-meta.json index d002f105709c..32d1f77e49c1 100644 --- a/tooling/v8-snapshot/cache/linux/snapshot-meta.json +++ b/tooling/v8-snapshot/cache/linux/snapshot-meta.json @@ -528,7 +528,6 @@ "./node_modules/picomatch/lib/picomatch.js", "./node_modules/pidusage/lib/stats.js", "./node_modules/pinkie/index.js", - "./node_modules/pngjs/lib/chunkstream.js", "./node_modules/pngjs/lib/filter-parse-async.js", "./node_modules/pngjs/lib/packer-async.js", "./node_modules/pngjs/lib/packer-sync.js", @@ -4300,4 +4299,4 @@ ], "deferredHashFile": "yarn.lock", "deferredHash": "1e1cdbc2bd022450246378229f01fad8593a9c52be60e43ced5ba9fd685ead92" -} \ No newline at end of file +} From 1ec336ebbe5d1b09f36ac22a144ab444be4e61a7 Mon Sep 17 00:00:00 2001 From: "cypress-bot[bot]" <+cypress-bot[bot]@users.noreply.github.com> Date: Mon, 13 Feb 2023 17:20:05 +0000 Subject: [PATCH 08/11] chore: updating v8 snapshot cache --- tooling/v8-snapshot/cache/linux/snapshot-meta.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tooling/v8-snapshot/cache/linux/snapshot-meta.json b/tooling/v8-snapshot/cache/linux/snapshot-meta.json index 32d1f77e49c1..d002f105709c 100644 --- a/tooling/v8-snapshot/cache/linux/snapshot-meta.json +++ b/tooling/v8-snapshot/cache/linux/snapshot-meta.json @@ -528,6 +528,7 @@ "./node_modules/picomatch/lib/picomatch.js", "./node_modules/pidusage/lib/stats.js", "./node_modules/pinkie/index.js", + "./node_modules/pngjs/lib/chunkstream.js", "./node_modules/pngjs/lib/filter-parse-async.js", "./node_modules/pngjs/lib/packer-async.js", "./node_modules/pngjs/lib/packer-sync.js", @@ -4299,4 +4300,4 @@ ], "deferredHashFile": "yarn.lock", "deferredHash": "1e1cdbc2bd022450246378229f01fad8593a9c52be60e43ced5ba9fd685ead92" -} +} \ No newline at end of file From 393f252361e278a2003b751f4722e96d5ba04046 Mon Sep 17 00:00:00 2001 From: Ryan Manuel Date: Mon, 13 Feb 2023 11:25:24 -0600 Subject: [PATCH 09/11] Update update-browser-versions.yml --- .github/workflows/update-browser-versions.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update-browser-versions.yml b/.github/workflows/update-browser-versions.yml index 974281fc06e2..60ecdbe71099 100644 --- a/.github/workflows/update-browser-versions.yml +++ b/.github/workflows/update-browser-versions.yml @@ -13,7 +13,7 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 - token: ${{ secrets.GITHUB_TOKEN }} + token: ${{ secrets.BOT_GITHUB_ACTION_TOKEN }} - name: Set committer info ## attribute the commit to cypress-bot: https://github.community/t/logging-into-git-as-a-github-app/115916 run: | From ca7a4be267eb54636c5803e8b3fce1bff3be0f69 Mon Sep 17 00:00:00 2001 From: Ryan Manuel Date: Mon, 13 Feb 2023 12:10:12 -0600 Subject: [PATCH 10/11] Update update_v8_snapshot_cache.yml --- .github/workflows/update_v8_snapshot_cache.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/update_v8_snapshot_cache.yml b/.github/workflows/update_v8_snapshot_cache.yml index 557dcfcf2925..345b718fb22c 100644 --- a/.github/workflows/update_v8_snapshot_cache.yml +++ b/.github/workflows/update_v8_snapshot_cache.yml @@ -1,14 +1,12 @@ name: Update V8 Snapshot Cache on: schedule: - # Run everyday at 00:00 UTC - - cron: '0 0 * * *' + # Run everyday except Wednesday at 00:00 UTC + - cron: '0 0 * * 0,1,2,4,5,6' # Run every Wednesday at 00:00 UTC - cron: '0 0 * * 3' push: branches: - - ryanm/feature/v8-snapshots-auto-pr - - develop - 'release/**' workflow_dispatch: inputs: From 915bfb23077c82bbebe2296a7f22cf3c98f7bc01 Mon Sep 17 00:00:00 2001 From: Ryan Manuel Date: Tue, 14 Feb 2023 11:57:29 -0600 Subject: [PATCH 11/11] Update workflows.yml --- .circleci/workflows.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.circleci/workflows.yml b/.circleci/workflows.yml index 8046a523a39e..8ef2152d5aa1 100644 --- a/.circleci/workflows.yml +++ b/.circleci/workflows.yml @@ -206,7 +206,8 @@ commands: name: Generate v8 snapshot command: | source ./scripts/ensure-node.sh - yarn build-v8-snapshot-prod + # Minification takes some time. We only really need to do that for the binary (and we regenerate snapshots separately there) + V8_SNAPSHOT_DISABLE_MINIFY=1 yarn build-v8-snapshot-prod - prepare-modules-cache # So we don't throw these in the workspace cache - persist_to_workspace: root: ~/