From 37eaac3c5dc93804413c10a6ca124fd7831befc0 Mon Sep 17 00:00:00 2001 From: Jarek Potiuk Date: Thu, 29 Oct 2020 08:07:02 +0100 Subject: [PATCH] The PRs which are not approved run subset of tests (#11828) This PR is an implementation of optimisation - to only run default values for build matrix in case PR does not have "okay to test" label. This "okay to test" label is set when the PR gets approved but it was not approved before, also then a comment is generated urging the committer to rebase the PR to run full set of tests. Additionally a check is added (in-progress) that makes the PR not yet ready to be merged. Only after re-running it it will become truly readty to be merged. --- .../workflows/build-images-workflow-run.yml | 7 +- .github/workflows/ci.yml | 14 +- .github/workflows/codeql-analysis.yml | 17 +++ .github/workflows/delete_old_artifacts.yml | 17 +++ .github/workflows/label_when_reviewed.yml | 29 ++++ .../label_when_reviewed_workflow_run.yml | 127 ++++++++++++++++++ .../google/backport_provider_setup.py | 2 +- .../ci/images/ci_wait_for_all_ci_images.sh | 4 +- .../ci/images/ci_wait_for_all_prod_images.sh | 4 +- scripts/ci/selective_ci_checks.sh | 84 +++++++++--- 10 files changed, 276 insertions(+), 29 deletions(-) create mode 100644 .github/workflows/label_when_reviewed.yml create mode 100644 .github/workflows/label_when_reviewed_workflow_run.yml diff --git a/.github/workflows/build-images-workflow-run.yml b/.github/workflows/build-images-workflow-run.yml index 71f8cc52b1721..19018d849b2c4 100644 --- a/.github/workflows/build-images-workflow-run.yml +++ b/.github/workflows/build-images-workflow-run.yml @@ -53,15 +53,15 @@ jobs: sourceHeadSha: ${{ steps.source-run-info.outputs.sourceHeadSha }} mergeCommitSha: ${{ steps.source-run-info.outputs.mergeCommitSha }} targetCommitSha: ${{ steps.source-run-info.outputs.targetCommitSha }} - pullRequestNumber: ${{ steps.workflow-run-info.outputs.pullRequestNumber }} - pullRequestLabels: ${{ steps.workflow-run-info.outputs.pullRequestLabels }} + pullRequestNumber: ${{ steps.source-run-info.outputs.pullRequestNumber }} + pullRequestLabels: ${{ steps.source-run-info.outputs.pullRequestLabels }} sourceEvent: ${{ steps.source-run-info.outputs.sourceEvent }} cacheDirective: ${{ steps.cache-directive.outputs.docker-cache }} buildImages: ${{ steps.build-images.outputs.buildImages }} upgradeToLatestConstraints: ${{ steps.upgrade-constraints.outputs.upgradeToLatestConstraints }} steps: - name: "Get information about the original trigger of the run" - uses: potiuk/get-workflow-origin@e3ba776faee1134e17551924b852bfb374e1703d # v1_1 + uses: potiuk/get-workflow-origin@2ef0b065db6b688a2231f8a7f464df1aac254328 # v1_2 id: source-run-info with: token: ${{ secrets.GITHUB_TOKEN }} @@ -228,6 +228,7 @@ jobs: env: EVENT_NAME: ${{ needs.cancel-workflow-runs.outputs.sourceEvent }} INCOMING_COMMIT_SHA: ${{ needs.cancel-workflow-runs.outputs.targetCommitSha }} + PR_LABELS: ${{ needs.cancel-workflow-runs.outputs.pullRequestLabels }} run: | if [[ ${EVENT_NAME} == "pull_request" ]]; then # Run selective checks diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 288a8128384b7..6c90db2951501 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -71,6 +71,7 @@ jobs: outputs: waitForImage: ${{ steps.wait-for-image.outputs.wait-for-image }} pythonVersions: ${{ steps.selective-checks.outputs.python-versions }} + pythonVersionsListAsString: ${{ steps.selective-checks.outputs.python-versions-list-as-string }} defaultPythonVersion: ${{ steps.selective-checks.outputs.default-python-version }} kubernetesVersions: ${{ steps.selective-checks.outputs.kubernetes-versions }} defaultKubernetesVersion: ${{ steps.selective-checks.outputs.default-kubernetes-version }} @@ -98,7 +99,7 @@ jobs: pullRequestLabels: ${{ steps.source-run-info.outputs.pullRequestLabels }} steps: - name: "Get information about the PR" - uses: potiuk/get-workflow-origin@e3ba776faee1134e17551924b852bfb374e1703d # v1_1 + uses: potiuk/get-workflow-origin@2ef0b065db6b688a2231f8a7f464df1aac254328 # v1_2 id: source-run-info with: token: ${{ secrets.GITHUB_TOKEN }} @@ -131,6 +132,7 @@ jobs: env: EVENT_NAME: ${{ github.event_name }} INCOMING_COMMIT_SHA: ${{ github.sha }} + PR_LABELS: "${{ steps.source-run-info.outputs.pullRequestLabels }}" run: | if [[ ${EVENT_NAME} == "pull_request" ]]; then # Run selective checks @@ -189,6 +191,9 @@ jobs: - name: > Wait for CI images ${{ needs.build-info.outputs.pythonVersions }}:${{ env.GITHUB_REGISTRY_PULL_IMAGE_TAG }}" + env: + CURRENT_PYTHON_MAJOR_MINOR_VERSIONS_AS_STRING: > + ${{needs.build-info.outputs.pythonVersionsListAsString}} # We wait for the images to be available either from the build-ci-image step or from # "build-images-workflow-run.yml' run as pull_request_target (it has the write # permissions in case pull_request from fork is run. @@ -469,7 +474,7 @@ jobs: tests-postgres: - timeout-minutes: 60 + timeout-minutes: 80 name: > Postgres${{matrix.postgres-version}},Py${{matrix.python-version}}: ${{needs.build-info.outputs.testTypes}} @@ -523,7 +528,7 @@ jobs: path: "./files/coverage.xml" tests-mysql: - timeout-minutes: 60 + timeout-minutes: 80 name: > MySQL${{matrix.mysql-version}}, Py${{matrix.python-version}}: ${{needs.build-info.outputs.testTypes}} runs-on: ubuntu-latest @@ -745,6 +750,9 @@ jobs: - name: > Wait for PROD images ${{ needs.build-info.outputs.pythonVersions }}:${{ env.GITHUB_REGISTRY_PULL_IMAGE_TAG }}" + env: + CURRENT_PYTHON_MAJOR_MINOR_VERSIONS_AS_STRING: > + ${{needs.build-info.outputs.pythonVersionsListAsString}} run: ./scripts/ci/images/ci_wait_for_all_prod_images.sh if: needs.build-info.outputs.waitForImage == 'true' diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index e4765caf23aa7..8ad244c0ca8d7 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -1,3 +1,20 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# --- name: "CodeQL" diff --git a/.github/workflows/delete_old_artifacts.yml b/.github/workflows/delete_old_artifacts.yml index b902caa357490..8b3571196b617 100644 --- a/.github/workflows/delete_old_artifacts.yml +++ b/.github/workflows/delete_old_artifacts.yml @@ -1,3 +1,20 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# --- name: 'Delete old artifacts' on: # yamllint disable-line rule:truthy diff --git a/.github/workflows/label_when_reviewed.yml b/.github/workflows/label_when_reviewed.yml new file mode 100644 index 0000000000000..62d7cc642fc88 --- /dev/null +++ b/.github/workflows/label_when_reviewed.yml @@ -0,0 +1,29 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +--- +name: Label when reviewed +on: pull_request_review # yamllint disable-line rule:truthy + +jobs: + + label-when-reviewed: + name: "Label PRs when reviewed" + runs-on: ubuntu-latest + steps: + - name: "Do nothing. Only trigger corresponding workflow_run event" + run: echo diff --git a/.github/workflows/label_when_reviewed_workflow_run.yml b/.github/workflows/label_when_reviewed_workflow_run.yml new file mode 100644 index 0000000000000..0fcab12d6f51f --- /dev/null +++ b/.github/workflows/label_when_reviewed_workflow_run.yml @@ -0,0 +1,127 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +--- +name: Label when reviewed workflow run +on: # yamllint disable-line rule:truthy + workflow_run: + workflows: ["Label when reviewed"] + types: ['requested'] +jobs: + + label-when-reviewed: + name: "Label PRs when reviewed workflow run" + runs-on: ubuntu-latest + outputs: + labelSet: ${{ steps.label-when-reviewed.outputs.labelSet }} + steps: + - name: "Get information about the original trigger of the run" + uses: potiuk/get-workflow-origin@2ef0b065db6b688a2231f8a7f464df1aac254328 # v1_2 + id: source-run-info + with: + token: ${{ secrets.GITHUB_TOKEN }} + sourceRunId: ${{ github.event.workflow_run.id }} + - name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )" + uses: actions/checkout@v2 + - name: > + Event: ${{ steps.source-run-info.outputs.sourceEvent }} + Repo: ${{ steps.source-run-info.outputs.sourceHeadRepo }} + Branch: ${{ steps.source-run-info.outputs.sourceHeadBranch }} + Run id: ${{ github.run_id }} + Source Run id: ${{ github.event.workflow_run.id }} + Sha: ${{ github.sha }} + Source Sha: ${{ steps.source-run-info.outputs.sourceHeadSha }} + Merge commit Sha: ${{ steps.source-run-info.outputs.mergeCommitSha }} + Target commit Sha: ${{ steps.source-run-info.outputs.targetCommitSha }} + run: printenv + - name: > + Fetch incoming commit ${{ steps.source-run-info.outputs.targetCommitSha }} with its parent + uses: actions/checkout@v2 + with: + ref: ${{ steps.source-run-info.outputs.targetCommitSha }} + fetch-depth: 2 + # checkout the master version again, to use the right script in master workflow + - name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )" + uses: actions/checkout@v2 + - name: Selective checks + id: selective-checks + env: + EVENT_NAME: ${{ steps.source-run-info.outputs.sourceEvent }} + INCOMING_COMMIT_SHA: ${{ steps.source-run-info.outputs.targetCommitSha }} + PR_LABELS: ${{ steps.source-run-info.outputs.pullRequestLabels }} + run: | + if [[ ${EVENT_NAME} == "pull_request_review" ]]; then + # Run selective checks + ./scripts/ci/selective_ci_checks.sh "${INCOMING_COMMIT_SHA}" + else + # Run all checks + ./scripts/ci/selective_ci_checks.sh + fi + - name: "Label when approved by committers for PRs that require full tests" + uses: TobKed/label-when-approved-action@7872312da76508d29f98d4fa68843ea91754cc59 # v1.2 + id: label-full-test-prs-when-approved-by-commiters + if: > + steps.selective-checks.outputs.run-tests == 'true' && + contains(steps.selective-checks.outputs.test-types, 'Core') + with: + token: ${{ secrets.GITHUB_TOKEN }} + label: 'full tests needed' + require_committers_approval: 'true' + pullRequestNumber: ${{ steps.source-run-info.outputs.pullRequestNumber }} + comment: > + The PR needs to run all tests because it modifies core of Airflow! Please rebase it to latest + master or ask committer to re-run it! + - name: "Initiate GitHub Check forcing rerun of SH ${{ github.event.pull_request.head.sha }}" + uses: LouisBrunner/checks-action@9f02872da71b6f558c6a6f190f925dde5e4d8798 # v1.1.0 + id: full-test-check + if: steps.label-full-test-prs-when-approved-by-commiters.outputs.labelSet == 'true' + with: + token: ${{ secrets.GITHUB_TOKEN }} + name: "Please rebase or re-run to run full tests" + status: "in_progress" + sha: ${{ github.event.pull_request.head.sha }} + details_url: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} + output: > + {"summary": + "The PR needs to run all tests! This was determined via + [the run](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}) + "} + - name: "Label when approved by committers for PRs that do not require full tests" + uses: TobKed/label-when-approved-action@7872312da76508d29f98d4fa68843ea91754cc59 # v1.2 + id: label-simple-test-prs-when-approved-by-commiters + if: > + steps.selective-checks.outputs.run-tests == 'true' && + ! contains(steps.selective-checks.outputs.test-types, 'Core') + with: + token: ${{ secrets.GITHUB_TOKEN }} + label: 'okay to merge' + require_committers_approval: 'true' + pullRequestNumber: ${{ steps.source-run-info.outputs.pullRequestNumber }} + comment: > + The PR should be OK to be merged with just subset of tests as it does not modify Core of + Airflow. The committers might merge it or can add a label 'full tests needed' and re-run it + to run all tests if they see it is needed! + - name: "Label when approved by committers for PRs that do not require tests at all" + uses: TobKed/label-when-approved-action@7872312da76508d29f98d4fa68843ea91754cc59 # v1.2 + id: label-no-test-prs-when-approved-by-commiters + if: steps.selective-checks.outputs.run-tests != 'true' + with: + token: ${{ secrets.GITHUB_TOKEN }} + label: 'okay to merge' + pullRequestNumber: ${{ steps.source-run-info.outputs.pullRequestNumber }} + require_committers_approval: 'true' + comment: "The PR is ready to be merged. No tests are needed!" diff --git a/airflow/providers/google/backport_provider_setup.py b/airflow/providers/google/backport_provider_setup.py index f89077e43a136..d150da5045691 100644 --- a/airflow/providers/google/backport_provider_setup.py +++ b/airflow/providers/google/backport_provider_setup.py @@ -19,7 +19,7 @@ # NOTE! THIS FILE IS AUTOMATICALLY GENERATED AND WILL BE\ # OVERWRITTEN WHEN RUNNING # -# ./breeze prepare-provider-readme +# ./breeze prepare-provider-readmes # # IF YOU WANT TO MODIFY IT, YOU SHOULD MODIFY THE TEMPLATE # `SETUP_TEMPLATE.py.jinja2` IN the `provider_packages` DIRECTORY diff --git a/scripts/ci/images/ci_wait_for_all_ci_images.sh b/scripts/ci/images/ci_wait_for_all_ci_images.sh index 7e86977e50748..edb6b294640e7 100755 --- a/scripts/ci/images/ci_wait_for_all_ci_images.sh +++ b/scripts/ci/images/ci_wait_for_all_ci_images.sh @@ -32,7 +32,7 @@ if [[ ${USE_GITHUB_REGISTRY} != "true" || ${GITHUB_REGISTRY_WAIT_FOR_IMAGE} != fi echo -echo "Waiting for all images to appear: ${CURRENT_PYTHON_MAJOR_MINOR_VERSIONS[*]}" +echo "Waiting for all images to appear: ${CURRENT_PYTHON_MAJOR_MINOR_VERSIONS_AS_STRING}" echo echo @@ -49,7 +49,7 @@ source "${AIRFLOW_SOURCES}/scripts/ci/libraries/_all_libs.sh" initialization::initialize_common_environment -for PYTHON_MAJOR_MINOR_VERSION in "${CURRENT_PYTHON_MAJOR_MINOR_VERSIONS[@]}" +for PYTHON_MAJOR_MINOR_VERSION in ${CURRENT_PYTHON_MAJOR_MINOR_VERSIONS_AS_STRING} do export AIRFLOW_CI_IMAGE_NAME="${BRANCH_NAME}-python${PYTHON_MAJOR_MINOR_VERSION}-ci" push_pull_remove_images::wait_for_github_registry_image "${AIRFLOW_CI_IMAGE_NAME}" "${GITHUB_REGISTRY_PULL_IMAGE_TAG}" diff --git a/scripts/ci/images/ci_wait_for_all_prod_images.sh b/scripts/ci/images/ci_wait_for_all_prod_images.sh index f8cf2c05296d7..66196c3257eba 100755 --- a/scripts/ci/images/ci_wait_for_all_prod_images.sh +++ b/scripts/ci/images/ci_wait_for_all_prod_images.sh @@ -32,7 +32,7 @@ if [[ ${USE_GITHUB_REGISTRY} != "true" || ${GITHUB_REGISTRY_WAIT_FOR_IMAGE} != fi echo -echo "Waiting for all images to appear: ${CURRENT_PYTHON_MAJOR_MINOR_VERSIONS[*]}" +echo "Waiting for all images to appear: ${CURRENT_PYTHON_MAJOR_MINOR_VERSIONS_AS_STRING}" echo echo @@ -49,7 +49,7 @@ source "${AIRFLOW_SOURCES}/scripts/ci/libraries/_all_libs.sh" initialization::initialize_common_environment -for PYTHON_MAJOR_MINOR_VERSION in "${CURRENT_PYTHON_MAJOR_MINOR_VERSIONS[@]}" +for PYTHON_MAJOR_MINOR_VERSION in ${CURRENT_PYTHON_MAJOR_MINOR_VERSIONS_AS_STRING} do export AIRFLOW_PROD_IMAGE_NAME="${BRANCH_NAME}-python${PYTHON_MAJOR_MINOR_VERSION}" export AIRFLOW_PROD_BUILD_IMAGE_NAME="${BRANCH_NAME}-python${PYTHON_MAJOR_MINOR_VERSION}-build" diff --git a/scripts/ci/selective_ci_checks.sh b/scripts/ci/selective_ci_checks.sh index 551ff62bb3432..ebb76dbdce277 100755 --- a/scripts/ci/selective_ci_checks.sh +++ b/scripts/ci/selective_ci_checks.sh @@ -30,27 +30,66 @@ # declare -a pattern_array +if [[ ${PR_LABELS=} == *"full tests needed"* ]]; then + echo + echo "Found the right PR labels in '${PR_LABELS=}': 'full tests needed''" + echo + FULL_TESTS_NEEDED="true" +else + echo + echo "Did not find the right PR labels in '${PR_LABELS=}': 'full tests needed'" + echo + FULL_TESTS_NEEDED="false" +fi + function output_all_basic_variables() { - initialization::ga_output python-versions \ - "$(initialization::parameters_to_json "${CURRENT_PYTHON_MAJOR_MINOR_VERSIONS[@]}")" + if [[ ${FULL_TESTS_NEEDED} == "true" ]]; then + initialization::ga_output python-versions \ + "$(initialization::parameters_to_json "${CURRENT_PYTHON_MAJOR_MINOR_VERSIONS[@]}")" + initialization::ga_output all-python-versions \ + "$(initialization::parameters_to_json "${ALL_PYTHON_MAJOR_MINOR_VERSIONS[@]}")" + initialization::ga_output python-versions-list-as-string "${CURRENT_PYTHON_MAJOR_MINOR_VERSIONS[*]}" + else + initialization::ga_output python-versions \ + "$(initialization::parameters_to_json "${DEFAULT_PYTHON_MAJOR_MINOR_VERSION}")" + # this will work as long as DEFAULT_PYTHON_MAJOR_VERSION is the same master/v1-10 + # all-python-versions are used in BuildImage Workflow + initialization::ga_output all-python-versions \ + "$(initialization::parameters_to_json "${DEFAULT_PYTHON_MAJOR_MINOR_VERSION}")" + initialization::ga_output python-versions-list-as-string "${DEFAULT_PYTHON_MAJOR_MINOR_VERSION}" + fi initialization::ga_output default-python-version "${DEFAULT_PYTHON_MAJOR_MINOR_VERSION}" - initialization::ga_output all-python-versions \ - "$(initialization::parameters_to_json "${ALL_PYTHON_MAJOR_MINOR_VERSIONS[@]}")" - initialization::ga_output kubernetes-versions \ - "$(initialization::parameters_to_json "${CURRENT_KUBERNETES_VERSIONS[@]}")" + if [[ ${FULL_TESTS_NEEDED} == "true" ]]; then + initialization::ga_output kubernetes-versions \ + "$(initialization::parameters_to_json "${CURRENT_KUBERNETES_VERSIONS[@]}")" + else + initialization::ga_output kubernetes-versions \ + "$(initialization::parameters_to_json "${KUBERNETES_VERSION}")" + fi initialization::ga_output default-kubernetes-version "${KUBERNETES_VERSION}" initialization::ga_output kubernetes-modes \ "$(initialization::parameters_to_json "${CURRENT_KUBERNETES_MODES[@]}")" initialization::ga_output default-kubernetes-mode "${KUBERNETES_MODE}" - initialization::ga_output postgres-versions \ - "$(initialization::parameters_to_json "${CURRENT_POSTGRES_VERSIONS[@]}")" + if [[ ${FULL_TESTS_NEEDED} == "true" ]]; then + initialization::ga_output postgres-versions \ + "$(initialization::parameters_to_json "${CURRENT_POSTGRES_VERSIONS[@]}")" + else + initialization::ga_output postgres-versions \ + "$(initialization::parameters_to_json "${POSTGRES_VERSION}")" + fi initialization::ga_output default-postgres-version "${POSTGRES_VERSION}" - initialization::ga_output mysql-versions \ - "$(initialization::parameters_to_json "${CURRENT_MYSQL_VERSIONS[@]}")" + if [[ ${FULL_TESTS_NEEDED} == "true" ]]; then + initialization::ga_output mysql-versions \ + "$(initialization::parameters_to_json "${CURRENT_MYSQL_VERSIONS[@]}")" + else + initialization::ga_output mysql-versions \ + "$(initialization::parameters_to_json "${MYSQL_VERSION}")" + fi + initialization::ga_output default-mysql-version "${MYSQL_VERSION}" initialization::ga_output kind-versions \ @@ -61,11 +100,15 @@ function output_all_basic_variables() { "$(initialization::parameters_to_json "${CURRENT_HELM_VERSIONS[@]}")" initialization::ga_output default-helm-version "${HELM_VERSION}" - initialization::ga_output postgres-exclude '[{ "python-version": "3.6" }]' - - initialization::ga_output mysql-exclude '[{ "python-version": "3.7" }]' - - initialization::ga_output sqlite-exclude '[{ "python-version": "3.8" }]' + if [[ ${FULL_TESTS_NEEDED} == "true" ]]; then + initialization::ga_output postgres-exclude '[{ "python-version": "3.6" }]' + initialization::ga_output mysql-exclude '[{ "python-version": "3.7" }]' + initialization::ga_output sqlite-exclude '[{ "python-version": "3.8" }]' + else + initialization::ga_output postgres-exclude '[]' + initialization::ga_output mysql-exclude '[]' + initialization::ga_output sqlite-exclude '[]' + fi initialization::ga_output kubernetes-exclude '[]' } @@ -441,15 +484,20 @@ function calculate_test_types_to_run() { fi } -output_all_basic_variables - if (($# < 1)); then echo - echo "No Commit SHA - running all tests!" + echo "No Commit SHA - running all tests (likely direct master merge, or scheduled run)!" echo + # override FULL_TESTS_NEEDED in master/scheduled run + FULL_TESTS_NEEDED="true" + readonly FULL_TESTS_NEEDED + output_all_basic_variables set_outputs_run_everything_and_exit fi +readonly FULL_TESTS_NEEDED +output_all_basic_variables + image_build_needed="false" tests_needed="false" kubernetes_tests_needed="false"