From 381d39ba9e1487d6d32cdfcefaf547229005be05 Mon Sep 17 00:00:00 2001 From: Christopher Mead Date: Wed, 18 Dec 2024 15:53:52 -0700 Subject: [PATCH] Test: retry build on fail (rework) (#5822) reworking retry logic for build failures ### QA Notes All tests should pass. Failed builds should retry --- .github/workflows/test-e2e-linux.yml | 8 +++++--- .github/workflows/test-integration.yml | 8 +++++--- .github/workflows/test-unit.yml | 8 +++++--- test/automation/src/positron/positronDataExplorer.ts | 2 +- 4 files changed, 16 insertions(+), 10 deletions(-) diff --git a/.github/workflows/test-e2e-linux.yml b/.github/workflows/test-e2e-linux.yml index 60d774d66c6..f37c4b34996 100644 --- a/.github/workflows/test-e2e-linux.yml +++ b/.github/workflows/test-e2e-linux.yml @@ -86,20 +86,22 @@ jobs: uses: ./.github/actions/cache-multi-paths - name: Attempt 1 - Setup Build and Compile + id: attempt1 uses: ./.github/actions/setup-build-env continue-on-error: true - name: Attempt 2 - Setup Build and Compile - if: ${{ failure() }} + if: ${{ steps.attempt1.outcome == 'failure' }} + id: attempt2 uses: ./.github/actions/setup-build-env continue-on-error: true - name: Attempt 3 - Setup Build and Compile - if: ${{ failure() }} + if: ${{ steps.attempt2.outcome == 'failure' }} uses: ./.github/actions/setup-build-env - name: Fail if Retries Exhausted - if: ${{ failure() }} + if: ${{ steps.attempt3.outcome == 'failure' }} run: exit 1 - name: Install Positron License diff --git a/.github/workflows/test-integration.yml b/.github/workflows/test-integration.yml index c498964b166..fd6404c541c 100644 --- a/.github/workflows/test-integration.yml +++ b/.github/workflows/test-integration.yml @@ -30,20 +30,22 @@ jobs: uses: ./.github/actions/cache-multi-paths - name: Attempt 1 - Setup Build and Compile + id: attempt1 uses: ./.github/actions/setup-build-env continue-on-error: true - name: Attempt 2 - Setup Build and Compile - if: ${{ failure() }} + if: ${{ steps.attempt1.outcome == 'failure' }} + id: attempt2 uses: ./.github/actions/setup-build-env continue-on-error: true - name: Attempt 3 - Setup Build and Compile - if: ${{ failure() }} + if: ${{ steps.attempt2.outcome == 'failure' }} uses: ./.github/actions/setup-build-env - name: Fail if Retries Exhausted - if: ${{ failure() }} + if: ${{ steps.attempt3.outcome == 'failure' }} run: exit 1 - name: Install Positron License diff --git a/.github/workflows/test-unit.yml b/.github/workflows/test-unit.yml index 477cec0d85f..7f9c91f96ee 100644 --- a/.github/workflows/test-unit.yml +++ b/.github/workflows/test-unit.yml @@ -30,20 +30,22 @@ jobs: uses: ./.github/actions/cache-multi-paths - name: Attempt 1 - Setup Build and Compile + id: attempt1 uses: ./.github/actions/setup-build-env continue-on-error: true - name: Attempt 2 - Setup Build and Compile - if: ${{ failure() }} + if: ${{ steps.attempt1.outcome == 'failure' }} + id: attempt2 uses: ./.github/actions/setup-build-env continue-on-error: true - name: Attempt 3 - Setup Build and Compile - if: ${{ failure() }} + if: ${{ steps.attempt2.outcome == 'failure' }} uses: ./.github/actions/setup-build-env - name: Fail if Retries Exhausted - if: ${{ failure() }} + if: ${{ steps.attempt3.outcome == 'failure' }} run: exit 1 - name: Install Positron License diff --git a/test/automation/src/positron/positronDataExplorer.ts b/test/automation/src/positron/positronDataExplorer.ts index ba7becfaa0e..5629a75418c 100644 --- a/test/automation/src/positron/positronDataExplorer.ts +++ b/test/automation/src/positron/positronDataExplorer.ts @@ -58,7 +58,7 @@ export class PositronDataExplorer { */ async getDataExplorerTableData(): Promise { - await this.code.driver.page.locator(IDLE_STATUS).waitFor({ state: 'visible', timeout: 60000 }); + await expect(this.code.driver.page.locator(IDLE_STATUS)).toBeVisible({ timeout: 60000 }); // need a brief additional wait await this.code.wait(1000);