This is an automated email from the ASF dual-hosted git repository. potiuk pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push: new 742bf80477 Fix post-test failure conditions (#38487) 742bf80477 is described below commit 742bf80477f515d4528e4a5d391ed14f5aae4ead Author: Jarek Potiuk <ja...@potiuk.com> AuthorDate: Tue Mar 26 10:23:42 2024 +0100 Fix post-test failure conditions (#38487) Integration tests are run either when we run tests on airflow runners (then we run them all as a single step) or when we run integration tests on public runners, we run each of the integration tests separately. However, success/failure conditions on the post-test actions were wrong - the || condition caused both success and failure post actions to be executed on postgres. This caused warnings on CI workflow runs as the artifacts to upload were missing. This PR fixes the condition and ignores warning on missing log files to upload - as there might still be cases when the test fail. --- .github/actions/post_tests_failure/action.yml | 3 +++ .github/actions/post_tests_success/action.yml | 1 + .github/workflows/integration-tests.yml | 4 ++-- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/actions/post_tests_failure/action.yml b/.github/actions/post_tests_failure/action.yml index 34d35ed47d..5586138c95 100644 --- a/.github/actions/post_tests_failure/action.yml +++ b/.github/actions/post_tests_failure/action.yml @@ -27,15 +27,18 @@ runs: name: airflow-logs-${{env.JOB_ID}} path: './files/airflow_logs*' retention-days: 7 + if-no-files-found: ignore - name: "Upload container logs" uses: actions/upload-artifact@v4 with: name: container-logs-${{env.JOB_ID}} path: "./files/container_logs*" retention-days: 7 + if-no-files-found: ignore - name: "Upload other logs" uses: actions/upload-artifact@v4 with: name: container-logs-${{env.JOB_ID}} path: "./files/other_logs*" retention-days: 7 + if-no-files-found: ignore diff --git a/.github/actions/post_tests_success/action.yml b/.github/actions/post_tests_success/action.yml index 214f731989..fbdc0aa1a3 100644 --- a/.github/actions/post_tests_success/action.yml +++ b/.github/actions/post_tests_success/action.yml @@ -27,6 +27,7 @@ runs: name: test-warnings-${{env.JOB_ID}} path: ./files/warnings-*.txt retention-days: 7 + if-no-files-found: ignore - name: "Move coverage artifacts in separate directory" if: env.ENABLE_COVERAGE == 'true' && env.TEST_TYPES != 'Helm' shell: bash diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 5685708d97..dcc0b4fbbb 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -148,7 +148,7 @@ jobs: if: inputs.is-airflow-runner == 'true' - name: "Post Tests success: Integration" uses: ./.github/actions/post_tests_success - if: success() && inputs.is-airflow-runner == 'true' || matrix.backend == 'postgres' + if: success() && (inputs.is-airflow-runner == 'true' || matrix.backend == 'postgres') - name: "Post Tests failure: Integration" uses: ./.github/actions/post_tests_failure - if: failure() && inputs.is-airflow-runner == 'true' || matrix.backend == 'postgres' + if: failure() && (inputs.is-airflow-runner == 'true' || matrix.backend == 'postgres')