From 02be8e5d37df467e0f366926e09e6fa6b37199ee Mon Sep 17 00:00:00 2001 From: Bill Glesias Date: Thu, 3 Oct 2024 09:36:18 -0400 Subject: [PATCH] chore: temporarily patch windows build to install dependencies as caching is currently broken (#30350) --- .circleci/cache-version.txt | 2 +- .circleci/workflows.yml | 71 ++++++++++++++++++++++++++++++++++++- 2 files changed, 71 insertions(+), 2 deletions(-) diff --git a/.circleci/cache-version.txt b/.circleci/cache-version.txt index d1509d332c14..deafa871233e 100644 --- a/.circleci/cache-version.txt +++ b/.circleci/cache-version.txt @@ -1,3 +1,3 @@ # Bump this version to force CI to re-create the cache from scratch. -09-30-24 +09-30-24-windows-patch-server-2022 diff --git a/.circleci/workflows.yml b/.circleci/workflows.yml index 302cff2ac35a..d5785de9cef3 100644 --- a/.circleci/workflows.yml +++ b/.circleci/workflows.yml @@ -76,7 +76,7 @@ windowsWorkflowFilters: &windows-workflow-filters - equal: [ develop, << 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 >> ] - - equal: [ 'misc/remove_marionette_for_geckodriver', << pipeline.git.branch >> ] + - equal: [ 'chore/patch_windows_build', << pipeline.git.branch >> ] - matches: pattern: /^release\/\d+\.\d+\.\d+$/ value: << pipeline.git.branch >> @@ -623,6 +623,9 @@ commands: browser: description: browser shortname to target type: string + executor: + description: the executor in use. Only used if Windows for workaround purposes + type: executor percy: description: enable percy type: boolean @@ -637,6 +640,16 @@ commands: default: '' steps: - restore_cached_workspace + # this is a temporary work around while we wait for circle to resolve issues with packages + # with an @ character in windows during save_cache. + # @see https://github.com/cypress-io/cypress/issues/30343 for more details. + - when: + condition: + equal: [ *windows-executor, << parameters.executor >> ] + steps: + - run: + name: reinstall dependencies to work around cache issue (Windows only) + command: rm -rf node_modules && yarn - windows-install-chrome: browser: <> - run: @@ -1370,6 +1383,16 @@ jobs: resource_class: << parameters.resource_class >> steps: - restore_cached_workspace + # this is a temporary work around while we wait for circle to resolve issues with packages + # with an @ character in windows during save_cache. + # @see https://github.com/cypress-io/cypress/issues/30343 for more details. + - when: + condition: + equal: [ *windows-executor, << parameters.executor >> ] + steps: + - run: + name: reinstall dependencies to work around cache issue (Windows only) + command: rm -rf node_modules && yarn - run: name: Top level packages command: yarn list --depth=0 || true @@ -1483,6 +1506,16 @@ jobs: steps: - restore_cached_workspace - restore_cached_system_tests_deps + # this is a temporary work around while we wait for circle to resolve issues with packages + # with an @ character in windows during save_cache. + # @see https://github.com/cypress-io/cypress/issues/30343 for more details. + - when: + condition: + equal: [ *windows-executor, << parameters.executor >> ] + steps: + - run: + name: reinstall dependencies to work around cache issue (Windows only) + command: rm -rf node_modules && yarn # TODO: Remove this once we switch off self-hosted M1 runners - when: condition: @@ -1528,6 +1561,16 @@ jobs: parallelism: 1 steps: - restore_cached_workspace + # this is a temporary work around while we wait for circle to resolve issues with packages + # with an @ character in windows during save_cache. + # @see https://github.com/cypress-io/cypress/issues/30343 for more details. + - when: + condition: + equal: [ *windows-executor, << parameters.executor >> ] + steps: + - run: + name: reinstall dependencies to work around cache issue (Windows only) + command: rm -rf node_modules && yarn - run: name: Driver memory tests in Electron environment: @@ -1648,6 +1691,16 @@ jobs: equal: [ *darwin-arm64-executor, << parameters.executor >> ] steps: - run: rm -f /tmp/cypress/junit/* + # this is a temporary work around while we wait for circle to resolve issues with packages + # with an @ character in windows during save_cache. + # @see https://github.com/cypress-io/cypress/issues/30343 for more details. + - when: + condition: + equal: [ *windows-executor, << parameters.executor >> ] + steps: + - run: + name: reinstall dependencies to work around cache issue (Windows only) + command: rm -rf node_modules && yarn - run: yarn workspace @packages/server test-unit cloud/environment_spec.ts - verify-mocha-results: expectedResultCount: 1 @@ -1793,6 +1846,7 @@ jobs: steps: - run-new-ui-tests: browser: chrome + executor: << parameters.executor >> percy: << parameters.percy >> package: frontend-shared type: ct @@ -1808,6 +1862,7 @@ jobs: steps: - run-new-ui-tests: browser: chrome + executor: << parameters.executor >> percy: << parameters.percy >> package: launchpad type: ct @@ -1828,6 +1883,7 @@ jobs: steps: - run-new-ui-tests: browser: chrome + executor: << parameters.executor >> percy: << parameters.percy >> package: launchpad type: e2e @@ -1846,6 +1902,7 @@ jobs: steps: - run-new-ui-tests: browser: chrome + executor: << parameters.executor >> percy: << parameters.percy >> package: app type: ct @@ -1865,6 +1922,7 @@ jobs: steps: - run-new-ui-tests: browser: chrome + executor: << parameters.executor >> percy: << parameters.percy >> package: app type: e2e @@ -1921,6 +1979,7 @@ jobs: steps: - run-new-ui-tests: browser: chrome + executor: << parameters.executor >> percy: << parameters.percy >> package: reporter type: ct @@ -2203,6 +2262,16 @@ jobs: resource_class: << parameters.resource_class >> steps: - restore_cached_workspace + # this is a temporary work around while we wait for circle to resolve issues with packages + # with an @ character in windows during save_cache. + # @see https://github.com/cypress-io/cypress/issues/30343 for more details. + - when: + condition: + equal: [ *windows-executor, << parameters.executor >> ] + steps: + - run: + name: reinstall dependencies to work around cache issue (Windows only) + command: rm -rf node_modules && yarn - check-if-binary-exists - build-and-package-binary - build-cypress-npm-package: