diff --git a/.github/workflows/bashlib.sh b/.github/workflows/bashlib.sh index e1b622b6afa..d36369f4353 100644 --- a/.github/workflows/bashlib.sh +++ b/.github/workflows/bashlib.sh @@ -256,7 +256,7 @@ cypress-run-all() { # UNCOMMENT the next few commands to monitor memory usage # monitor_memory & # Start memory monitoring in the background # memoryMonitorPid=$! - python ../../scripts/cypress_run.py --parallelism $PARALLELISM --parallelism-id $PARALLEL_ID --group $PARALLEL_ID --retries 5 $USE_DASHBOARD_FLAG + python ../../scripts/cypress_run.py --retries 5 $USE_DASHBOARD_FLAG # kill $memoryMonitorPid } diff --git a/.github/workflows/superset-e2e.yml b/.github/workflows/superset-e2e.yml index 4df02fd0984..9d50e7866ae 100644 --- a/.github/workflows/superset-e2e.yml +++ b/.github/workflows/superset-e2e.yml @@ -57,19 +57,13 @@ jobs: pull-requests: read strategy: # when one test fails, DO NOT cancel the other - # parallel_id, because this will kill Cypress processes + # app_root variant, because this will kill Cypress processes # leaving the Dashboard hanging ... # https://github.com/cypress-io/github-action/issues/48 fail-fast: false matrix: - parallel_id: [0, 1] browser: ["chrome"] app_root: ${{ github.event_name == 'push' && fromJSON('["", "/app/prefix"]') || fromJSON('[""]') }} - # The /app/prefix variant (push events only) is smoke-tested on a single - # shard rather than the full matrix, so exclude it from the other shards. - exclude: - - parallel_id: 1 - app_root: "/app/prefix" env: SUPERSET_ENV: development SUPERSET_CONFIG: tests.integration_tests.superset_test_config @@ -148,8 +142,6 @@ jobs: uses: ./.github/actions/cached-dependencies env: CYPRESS_BROWSER: ${{ matrix.browser }} - PARALLEL_ID: ${{ matrix.parallel_id }} - PARALLELISM: 2 CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} NODE_OPTIONS: "--max-old-space-size=4096" with: @@ -167,7 +159,7 @@ jobs: if: failure() with: path: ${{ github.workspace }}/superset-frontend/cypress-base/cypress/screenshots - name: cypress-artifact-${{ github.run_id }}-${{ github.job }}-${{ matrix.browser }}-${{ matrix.parallel_id }}--${{ steps.set-safe-app-root.outputs.safe_app_root }} + name: cypress-artifact-${{ github.run_id }}-${{ github.job }}-${{ matrix.browser }}--${{ steps.set-safe-app-root.outputs.safe_app_root }} playwright-tests: needs: changes diff --git a/scripts/cypress_run.py b/scripts/cypress_run.py index 3cf129bb2f9..66617049b2f 100644 --- a/scripts/cypress_run.py +++ b/scripts/cypress_run.py @@ -112,12 +112,6 @@ def main() -> None: action="store_true", help="Use Cypress Dashboard for parallelization", ) - parser.add_argument( - "--parallelism", type=int, default=10, help="Number of parallel groups" - ) - parser.add_argument( - "--parallelism-id", type=int, required=True, help="ID of the parallelism group" - ) parser.add_argument( "--filter", type=str, required=False, default=None, help="Filter to test" ) @@ -153,20 +147,8 @@ def main() -> None: ) print(f"Found {file_count} test files ({skipped_count} skipped).") - # Initialize groups for round-robin distribution - groups: dict[int, list[str]] = {i: [] for i in range(args.parallelism)} - - # Sort test files to ensure deterministic distribution - sorted_test_files = sorted(test_files) - - # Distribute test files in a round-robin manner - for index, test_file in enumerate(sorted_test_files): - group_index = index % args.parallelism - groups[group_index].append(test_file) - - # Only run tests for the group that matches the parallelism ID - group_id = args.parallelism_id - spec_list = groups[group_id] + # Sort test files for deterministic, readable run order. + spec_list = sorted(test_files) # Run each test file independently with retry logic or dry-run processed_file_count: int = 0