From 288831f838999c05443a28cc70b180998d33c6f8 Mon Sep 17 00:00:00 2001 From: Sourav Maji Date: Thu, 7 Nov 2024 09:42:22 -0800 Subject: [PATCH] run completion step always --- .../rawWorkflows/gh-ci-completion-flow.txt | 2 +- .github/workflows/VeniceCI-E2ETests-Main.yml | 62 +++---------------- .github/workflows/VeniceCI-E2ETests.yml | 1 + internal/venice-test-common/build.gradle | 5 +- 4 files changed, 13 insertions(+), 57 deletions(-) diff --git a/.github/rawWorkflows/gh-ci-completion-flow.txt b/.github/rawWorkflows/gh-ci-completion-flow.txt index 3d03fcac7a..cb29d78d2e 100644 --- a/.github/rawWorkflows/gh-ci-completion-flow.txt +++ b/.github/rawWorkflows/gh-ci-completion-flow.txt @@ -5,7 +5,7 @@ jdk: [17] runs-on: ubuntu-latest needs: $Dependency - if: $Conditional + if: ${{ always() && !failure() }} timeout-minutes: $TimeOut steps: - name: NoOp diff --git a/.github/workflows/VeniceCI-E2ETests-Main.yml b/.github/workflows/VeniceCI-E2ETests-Main.yml index f1a8e0e41f..0560c53138 100644 --- a/.github/workflows/VeniceCI-E2ETests-Main.yml +++ b/.github/workflows/VeniceCI-E2ETests-Main.yml @@ -1970,66 +1970,18 @@ jobs: retention-days: 30 E2ETestsCompletion: - strategy: fail-fast: false matrix: jdk: [17] runs-on: ubuntu-latest - permissions: - id-token: write - contents: read - checks: write needs: [IntegrationTests_1000, IntegrationTests_1010, IntegrationTests_1020, IntegrationTests_1030, IntegrationTests_1040, IntegrationTests_1050, IntegrationTests_1060, IntegrationTests_1070, IntegrationTests_1080, IntegrationTests_1090, IntegrationTests_1100, IntegrationTests_1110, IntegrationTests_1120, IntegrationTests_1130, IntegrationTests_1200, IntegrationTests_1210, IntegrationTests_1220, IntegrationTests_1230, IntegrationTests_1240, IntegrationTests_1250, IntegrationTests_1260, IntegrationTests_1270, IntegrationTests_1280, IntegrationTests_1400, IntegrationTests_1410, IntegrationTests_1420, IntegrationTests_1430, IntegrationTests_1440, IntegrationTests_1500, IntegrationTests_1550, IntegrationTests_9999] - timeout-minutes: 120 + if: ${{ always() && !failure() }} + timeout-minutes: 20 steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: Set up JDK - uses: actions/setup-java@v4 - with: - java-version: ${{ matrix.jdk }} - distribution: 'temurin' - cache: 'gradle' - - shell: bash - run: | - git remote set-head origin --auto - git remote add upstream https://github.com/linkedin/venice - git fetch upstream - - name: Setup Gradle - uses: gradle/actions/setup-gradle@v4 - - name: Run Integration Tests - run: ./gradlew clean - - name: Package Build Artifacts - if: success() || failure() - shell: bash - run: | - mkdir ${{ github.job }}-artifacts - echo "Repository owner: ${{ github.repository_owner }}" - echo "event name: ${{ github.event_name }}" - find . -path "**/build/reports/*" -or -path "**/build/test-results/*" > artifacts.list - rsync -R --files-from=artifacts.list . ${{ github.job }}-artifacts - tar -zcvf ${{ github.job }}-jdk${{ matrix.jdk }}-logs.tar.gz ${{ github.job }}-artifacts - - name: Generate Test Reports - if: ${{ (github.repository_owner == 'linkedin') && (success() || failure()) }} - uses: dorny/test-reporter@v1.9.1 - env: - NODE_OPTIONS: --max-old-space-size=9182 - with: - token: ${{ secrets.GITHUB_TOKEN }} - name: ${{ github.job }} Test Reports # Name where it report the test results - path: '**/TEST-*.xml' - fail-on-error: 'false' - max-annotations: '10' - list-tests: 'all' - list-suites: 'all' - reporter: java-junit - - name: Upload Build Artifacts - if: success() || failure() - uses: actions/upload-artifact@v4 - with: - name: ${{ github.job }} - path: ${{ github.job }}-jdk${{ matrix.jdk }}-logs.tar.gz - retention-days: 30 + - name: NoOp + shell: bash + run: | + echo "Successfully ran all E2E tests!" + diff --git a/.github/workflows/VeniceCI-E2ETests.yml b/.github/workflows/VeniceCI-E2ETests.yml index cfeae530e4..7376740944 100644 --- a/.github/workflows/VeniceCI-E2ETests.yml +++ b/.github/workflows/VeniceCI-E2ETests.yml @@ -1973,6 +1973,7 @@ jobs: jdk: [17] runs-on: ubuntu-latest needs: [IntegrationTests_1000, IntegrationTests_1010, IntegrationTests_1020, IntegrationTests_1030, IntegrationTests_1040, IntegrationTests_1050, IntegrationTests_1060, IntegrationTests_1070, IntegrationTests_1080, IntegrationTests_1090, IntegrationTests_1100, IntegrationTests_1110, IntegrationTests_1120, IntegrationTests_1130, IntegrationTests_1200, IntegrationTests_1210, IntegrationTests_1220, IntegrationTests_1230, IntegrationTests_1240, IntegrationTests_1250, IntegrationTests_1260, IntegrationTests_1270, IntegrationTests_1280, IntegrationTests_1400, IntegrationTests_1410, IntegrationTests_1420, IntegrationTests_1430, IntegrationTests_1440, IntegrationTests_1500, IntegrationTests_1550, IntegrationTests_9999] + if: ${{ always() && !failure() }} timeout-minutes: 20 steps: - name: NoOp diff --git a/internal/venice-test-common/build.gradle b/internal/venice-test-common/build.gradle index 2d2e6182bd..2ece62b77b 100644 --- a/internal/venice-test-common/build.gradle +++ b/internal/venice-test-common/build.gradle @@ -333,6 +333,9 @@ task generateGHCIMain() { def paramFilePath = Paths.get(paramFile.getPath()) def paramFileContent = new String(Files.readAllBytes(paramFilePath)) + def completionFile = new File(targetDir, "gh-ci-completion-flow.txt") + def completionFileContent = new String(Files.readAllBytes(Paths.get(completionFile.getPath()))) + targetFile.delete() targetFile.createNewFile() @@ -359,7 +362,7 @@ task generateGHCIMain() { jobs << otherTest // define a job that depends others to manage the status check - appendToGHCI(paramFileContent, targetFilePath, "E2ETestsCompletion", 120, "clean", jobs, true) + appendToGHCI(completionFileContent, targetFilePath, "E2ETestsCompletion", 20, "null", jobs, true) def finalDestinationPath = Paths.get(rootDir.getPath() + "/.github/workflows/VeniceCI-E2ETests-Main.yml") Files.move(targetFilePath, finalDestinationPath, StandardCopyOption.REPLACE_EXISTING)