diff --git a/.github/workflows/check-providers.yml b/.github/workflows/check-providers.yml
index 3faf19b61f532..c6a80334e09a9 100644
--- a/.github/workflows/check-providers.yml
+++ b/.github/workflows/check-providers.yml
@@ -40,7 +40,7 @@ on: # yamllint disable-line rule:truthy
description: "Whether to upgrade to newer dependencies"
required: true
type: string
- affected-providers-list-as-string:
+ selected-providers-list-as-string:
description: "List of affected providers as string"
required: false
type: string
@@ -163,7 +163,7 @@ jobs:
run: >
breeze release-management prepare-provider-packages --include-not-ready-providers
--version-suffix-for-pypi dev0 --package-format sdist
- ${{ inputs.affected-providers-list-as-string }}
+ ${{ inputs.selected-providers-list-as-string }}
- name: "Prepare airflow package: sdist"
run: >
breeze release-management prepare-airflow-package
@@ -187,7 +187,7 @@ jobs:
--providers-constraints-location
/files/constraints-${{env.PYTHON_MAJOR_MINOR_VERSION}}/constraints-source-providers-${{env.PYTHON_MAJOR_MINOR_VERSION}}.txt
--run-in-parallel
- if: inputs.affected-providers-list-as-string == ''
+ if: inputs.selected-providers-list-as-string == ''
- name: "Install affected provider packages and airflow via sdist files"
run: >
breeze release-management install-provider-packages
@@ -198,7 +198,7 @@ jobs:
--providers-constraints-location
/files/constraints-${{env.PYTHON_MAJOR_MINOR_VERSION}}/constraints-source-providers-${{env.PYTHON_MAJOR_MINOR_VERSION}}.txt
--run-in-parallel
- if: inputs.affected-providers-list-as-string != ''
+ if: inputs.selected-providers-list-as-string != ''
providers-compatibility-checks:
timeout-minutes: 80
@@ -268,7 +268,7 @@ jobs:
Airflow ${{ matrix.airflow-version }}:Python ${{ matrix.python-version }}
if: matrix.run-tests == 'true'
run: >
- breeze testing tests --run-in-parallel
+ breeze testing providers-tests --run-in-parallel
--parallel-test-types "${{ inputs.providers-test-types-list-as-string }}"
--use-packages-from-dist
--package-format wheel
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 9f61e356b3b27..318f866d26791 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -58,8 +58,8 @@ jobs:
image-tag: ${{ github.event.pull_request.head.sha || github.sha }}
docker-cache: ${{ steps.selective-checks.outputs.docker-cache }}
disable-airflow-repo-cache: ${{ steps.selective-checks.outputs.disable-airflow-repo-cache }}
- affected-providers-list-as-string: >-
- ${{ steps.selective-checks.outputs.affected-providers-list-as-string }}
+ selected-providers-list-as-string: >-
+ ${{ steps.selective-checks.outputs.selected-providers-list-as-string }}
upgrade-to-newer-dependencies: ${{ steps.selective-checks.outputs.upgrade-to-newer-dependencies }}
python-versions: ${{ steps.selective-checks.outputs.python-versions }}
python-versions-list-as-string: ${{ steps.selective-checks.outputs.python-versions-list-as-string }}
@@ -79,12 +79,12 @@ jobs:
default-kind-version: ${{ steps.selective-checks.outputs.default-kind-version }}
force-pip: ${{ steps.selective-checks.outputs.force-pip }}
full-tests-needed: ${{ steps.selective-checks.outputs.full-tests-needed }}
- parallel-test-types-list-as-string: >-
- ${{ steps.selective-checks.outputs.parallel-test-types-list-as-string }}
+ core-test-types-list-as-string: >-
+ ${{ steps.selective-checks.outputs.core-test-types-list-as-string }}
providers-test-types-list-as-string: >-
${{ steps.selective-checks.outputs.providers-test-types-list-as-string }}
- separate-test-types-list-as-string: >-
- ${{ steps.selective-checks.outputs.separate-test-types-list-as-string }}
+ individual-providers-test-types-list-as-string: >-
+ ${{ steps.selective-checks.outputs.individual-providers-test-types-list-as-string }}
include-success-outputs: ${{ steps.selective-checks.outputs.include-success-outputs }}
postgres-exclude: ${{ steps.selective-checks.outputs.postgres-exclude }}
mysql-exclude: ${{ steps.selective-checks.outputs.mysql-exclude }}
@@ -135,6 +135,7 @@ jobs:
testable-integrations: ${{ steps.selective-checks.outputs.testable-integrations }}
canary-run: ${{ steps.source-run-info.outputs.canary-run }}
run-coverage: ${{ steps.source-run-info.outputs.run-coverage }}
+ test-groups: ${{ steps.source-run-info.outputs.test-groups }}
steps:
- name: "Cleanup repo"
shell: bash
@@ -336,7 +337,7 @@ jobs:
canary-run: ${{ needs.build-info.outputs.canary-run }}
default-python-version: ${{ needs.build-info.outputs.default-python-version }}
upgrade-to-newer-dependencies: ${{ needs.build-info.outputs.upgrade-to-newer-dependencies }}
- affected-providers-list-as-string: ${{ needs.build-info.outputs.affected-providers-list-as-string }}
+ selected-providers-list-as-string: ${{ needs.build-info.outputs.selected-providers-list-as-string }}
providers-compatibility-checks: ${{ needs.build-info.outputs.providers-compatibility-checks }}
skip-provider-tests: ${{ needs.build-info.outputs.skip-provider-tests }}
python-versions: ${{ needs.build-info.outputs.python-versions }}
@@ -362,7 +363,7 @@ jobs:
needs.build-info.outputs.latest-versions-only != 'true'
tests-postgres:
- name: "Postgres tests"
+ name: "Postgres core tests"
uses: ./.github/workflows/run-unit-tests.yml
needs: [build-info, wait-for-ci-images]
permissions:
@@ -374,20 +375,22 @@ jobs:
backend: "postgres"
test-name: "Postgres"
test-scope: "DB"
+ test-groups: ${{ needs.build-info.outputs.test-groups }}
image-tag: ${{ needs.build-info.outputs.image-tag }}
python-versions: ${{ needs.build-info.outputs.python-versions }}
backend-versions: ${{ needs.build-info.outputs.postgres-versions }}
excluded-providers-as-string: ${{ needs.build-info.outputs.excluded-providers-as-string }}
excludes: ${{ needs.build-info.outputs.postgres-exclude }}
- parallel-test-types-list-as-string: ${{ needs.build-info.outputs.parallel-test-types-list-as-string }}
+ core-test-types-list-as-string: ${{ needs.build-info.outputs.core-test-types-list-as-string }}
+ providers-test-types-list-as-string: ${{ needs.build-info.outputs.providers-test-types-list-as-string }}
include-success-outputs: ${{ needs.build-info.outputs.include-success-outputs }}
run-migration-tests: "true"
run-coverage: ${{ needs.build-info.outputs.run-coverage }}
debug-resources: ${{ needs.build-info.outputs.debug-resources }}
- if: needs.build-info.outputs.run-tests == 'true' && needs.build-info.outputs.only-new-ui-files != 'true'
+ if: needs.build-info.outputs.run-tests == 'true'
tests-mysql:
- name: "MySQL tests"
+ name: "MySQL core tests"
uses: ./.github/workflows/run-unit-tests.yml
needs: [build-info, wait-for-ci-images]
permissions:
@@ -399,20 +402,22 @@ jobs:
backend: "mysql"
test-name: "MySQL"
test-scope: "DB"
+ test-groups: ${{ needs.build-info.outputs.test-groups }}
image-tag: ${{ needs.build-info.outputs.image-tag }}
python-versions: ${{ needs.build-info.outputs.python-versions }}
backend-versions: ${{ needs.build-info.outputs.mysql-versions }}
excluded-providers-as-string: ${{ needs.build-info.outputs.excluded-providers-as-string }}
excludes: ${{ needs.build-info.outputs.mysql-exclude }}
- parallel-test-types-list-as-string: ${{ needs.build-info.outputs.parallel-test-types-list-as-string }}
+ core-test-types-list-as-string: ${{ needs.build-info.outputs.core-test-types-list-as-string }}
+ providers-test-types-list-as-string: ${{ needs.build-info.outputs.providers-test-types-list-as-string }}
include-success-outputs: ${{ needs.build-info.outputs.include-success-outputs }}
run-coverage: ${{ needs.build-info.outputs.run-coverage }}
run-migration-tests: "true"
debug-resources: ${{ needs.build-info.outputs.debug-resources }}
- if: needs.build-info.outputs.run-tests == 'true' && needs.build-info.outputs.only-new-ui-files != 'true'
+ if: needs.build-info.outputs.run-tests == 'true'
tests-sqlite:
- name: "Sqlite tests"
+ name: "Sqlite core tests"
uses: ./.github/workflows/run-unit-tests.yml
needs: [build-info, wait-for-ci-images]
permissions:
@@ -425,21 +430,23 @@ jobs:
test-name: "Sqlite"
test-name-separator: ""
test-scope: "DB"
+ test-groups: ${{ needs.build-info.outputs.test-groups }}
image-tag: ${{ needs.build-info.outputs.image-tag }}
python-versions: ${{ needs.build-info.outputs.python-versions }}
# No versions for sqlite
backend-versions: "['']"
excluded-providers-as-string: ${{ needs.build-info.outputs.excluded-providers-as-string }}
excludes: ${{ needs.build-info.outputs.sqlite-exclude }}
- parallel-test-types-list-as-string: ${{ needs.build-info.outputs.parallel-test-types-list-as-string }}
+ core-test-types-list-as-string: ${{ needs.build-info.outputs.core-test-types-list-as-string }}
+ providers-test-types-list-as-string: ${{ needs.build-info.outputs.providers-test-types-list-as-string }}
include-success-outputs: ${{ needs.build-info.outputs.include-success-outputs }}
run-coverage: ${{ needs.build-info.outputs.run-coverage }}
run-migration-tests: "true"
debug-resources: ${{ needs.build-info.outputs.debug-resources }}
- if: needs.build-info.outputs.run-tests == 'true' && needs.build-info.outputs.only-new-ui-files != 'true'
+ if: needs.build-info.outputs.run-tests == 'true'
tests-non-db:
- name: "Non-DB tests"
+ name: "Non-DB core tests"
uses: ./.github/workflows/run-unit-tests.yml
needs: [build-info, wait-for-ci-images]
permissions:
@@ -452,17 +459,19 @@ jobs:
test-name: ""
test-name-separator: ""
test-scope: "Non-DB"
+ test-groups: ${{ needs.build-info.outputs.test-groups }}
image-tag: ${{ needs.build-info.outputs.image-tag }}
python-versions: ${{ needs.build-info.outputs.python-versions }}
# No versions for non-db
backend-versions: "['']"
excluded-providers-as-string: ${{ needs.build-info.outputs.excluded-providers-as-string }}
excludes: ${{ needs.build-info.outputs.sqlite-exclude }}
- parallel-test-types-list-as-string: ${{ needs.build-info.outputs.parallel-test-types-list-as-string }}
+ core-test-types-list-as-string: ${{ needs.build-info.outputs.core-test-types-list-as-string }}
+ providers-test-types-list-as-string: ${{ needs.build-info.outputs.providers-test-types-list-as-string }}
include-success-outputs: ${{ needs.build-info.outputs.include-success-outputs }}
run-coverage: ${{ needs.build-info.outputs.run-coverage }}
debug-resources: ${{ needs.build-info.outputs.debug-resources }}
- if: needs.build-info.outputs.run-tests == 'true' && needs.build-info.outputs.only-new-ui-files != 'true'
+ if: needs.build-info.outputs.run-tests == 'true'
tests-special:
name: "Special tests"
@@ -478,9 +487,11 @@ jobs:
needs.build-info.outputs.upgrade-to-newer-dependencies != 'false' ||
needs.build-info.outputs.full-tests-needed == 'true')
with:
+ test-groups: ${{ needs.build-info.outputs.test-groups }}
runs-on-as-json-default: ${{ needs.build-info.outputs.runs-on-as-json-default }}
image-tag: ${{ needs.build-info.outputs.image-tag }}
- parallel-test-types-list-as-string: ${{ needs.build-info.outputs.parallel-test-types-list-as-string }}
+ core-test-types-list-as-string: ${{ needs.build-info.outputs.core-test-types-list-as-string }}
+ providers-test-types-list-as-string: ${{ needs.build-info.outputs.providers-test-types-list-as-string }}
run-coverage: ${{ needs.build-info.outputs.run-coverage }}
default-python-version: ${{ needs.build-info.outputs.default-python-version }}
python-versions: ${{ needs.build-info.outputs.python-versions }}
@@ -511,7 +522,7 @@ jobs:
if: needs.build-info.outputs.run-tests == 'true'
tests-with-lowest-direct-resolution:
- name: "Lowest direct dependency resolution tests"
+ name: "Lowest direct dependency providers tests"
needs: [build-info, wait-for-ci-images]
uses: ./.github/workflows/run-unit-tests.yml
permissions:
@@ -525,13 +536,16 @@ jobs:
test-name: "LowestDeps-Postgres"
force-lowest-dependencies: "true"
test-scope: "All"
+ test-groups: ${{ needs.build-info.outputs.test-groups }}
backend: "postgres"
image-tag: ${{ needs.build-info.outputs.image-tag }}
python-versions: ${{ needs.build-info.outputs.python-versions }}
backend-versions: "['${{ needs.build-info.outputs.default-postgres-version }}']"
excluded-providers-as-string: ${{ needs.build-info.outputs.excluded-providers-as-string }}
excludes: "[]"
- parallel-test-types-list-as-string: ${{ needs.build-info.outputs.separate-test-types-list-as-string }}
+ core-test-types-list-as-string: ${{ needs.build-info.outputs.core-test-types-list-as-string }}
+ # yamllint disable rule:line-length
+ providers-test-types-list-as-string: ${{ needs.build-info.outputs.individual-providers-test-types-list-as-string }}
include-success-outputs: ${{ needs.build-info.outputs.include-success-outputs }}
run-coverage: ${{ needs.build-info.outputs.run-coverage }}
debug-resources: ${{ needs.build-info.outputs.debug-resources }}
diff --git a/.github/workflows/helm-tests.yml b/.github/workflows/helm-tests.yml
index 8b26769ff4bc7..4c1ec1023fc90 100644
--- a/.github/workflows/helm-tests.yml
+++ b/.github/workflows/helm-tests.yml
@@ -75,7 +75,7 @@ jobs:
- name: "Prepare breeze & CI image: ${{inputs.default-python-version}}:${{inputs.image-tag}}"
uses: ./.github/actions/prepare_breeze_and_image
- name: "Helm Unit Tests: ${{ matrix.helm-test-package }}"
- run: breeze testing helm-tests --helm-test-package "${{ matrix.helm-test-package }}"
+ run: breeze testing helm-tests --test-type "${{ matrix.helm-test-package }}"
tests-helm-release:
timeout-minutes: 80
diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml
index 530d0f9fc5636..1bcae812db5c6 100644
--- a/.github/workflows/integration-tests.yml
+++ b/.github/workflows/integration-tests.yml
@@ -28,8 +28,12 @@ on: # yamllint disable-line rule:truthy
description: "Tag to set for the image"
required: true
type: string
- testable-integrations:
- description: "The list of testable integrations as JSON array."
+ testable-core-integrations:
+ description: "The list of testable core integrations as JSON array."
+ required: true
+ type: string
+ testable-providers-integrations:
+ description: "The list of testable providers integrations as JSON array."
required: true
type: string
default-postgres-version:
@@ -57,21 +61,67 @@ on: # yamllint disable-line rule:truthy
required: true
type: string
jobs:
- tests-integration:
+ tests-core-integration:
+ timeout-minutes: 130
+ if: inputs.testable-core-integrations != '[]'
+ name: "Integration Tests: core ${{ matrix.integration }}"
+ runs-on: ${{ fromJSON(inputs.runs-on-as-json-public) }}
+ strategy:
+ fail-fast: false
+ matrix:
+ integration: ${{ fromJSON(inputs.testable-core-integrations) }}
+ env:
+ IMAGE_TAG: "${{ inputs.image-tag }}"
+ BACKEND: "postgres"
+ BACKEND_VERSION: ${{ inputs.default-postgres-version }}"
+ PYTHON_MAJOR_MINOR_VERSION: "${{ inputs.default-python-version }}"
+ JOB_ID: "integration-core-${{ matrix.integration }}"
+ SKIP_PROVIDER_TESTS: "${{ inputs.skip-provider-tests }}"
+ ENABLE_COVERAGE: "${{ inputs.run-coverage}}"
+ DEBUG_RESOURCES: "${{ inputs.debug-resources }}"
+ GITHUB_REPOSITORY: ${{ github.repository }}
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ GITHUB_USERNAME: ${{ github.actor }}
+ VERBOSE: "true"
+ steps:
+ - name: "Cleanup repo"
+ shell: bash
+ run: docker run -v "${GITHUB_WORKSPACE}:/workspace" -u 0:0 bash -c "rm -rf /workspace/*"
+ - name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
+ uses: actions/checkout@v4
+ with:
+ persist-credentials: false
+ - name: "Cleanup docker"
+ run: ./scripts/ci/cleanup_docker.sh
+ - name: "Prepare breeze & CI image: ${{ inputs.default-python-version }}:${{ inputs.image-tag }}"
+ uses: ./.github/actions/prepare_breeze_and_image
+ - name: "Integration Tests: core ${{ matrix.integration }}"
+ # yamllint disable rule:line-length
+ run: ./scripts/ci/testing/run_integration_tests_with_retry.sh core "${{ matrix.integration }}"
+ - name: "Post Tests success"
+ uses: ./.github/actions/post_tests_success
+ with:
+ codecov-token: ${{ secrets.CODECOV_TOKEN }}
+ python-version: ${{ inputs.default-python-version }}
+ - name: "Post Tests failure"
+ uses: ./.github/actions/post_tests_failure
+ if: failure()
+
+ tests-providers-integration:
timeout-minutes: 130
- if: inputs.testable-integrations != '[]'
- name: "Integration Tests: ${{ matrix.integration }}"
+ if: inputs.testable-providers-integrations != '[]'
+ name: "Integration Tests: providers ${{ matrix.integration }}"
runs-on: ${{ fromJSON(inputs.runs-on-as-json-public) }}
strategy:
fail-fast: false
matrix:
- integration: ${{ fromJSON(inputs.testable-integrations) }}
+ integration: ${{ fromJSON(inputs.testable-providers-integrations) }}
env:
IMAGE_TAG: "${{ inputs.image-tag }}"
BACKEND: "postgres"
BACKEND_VERSION: ${{ inputs.default-postgres-version }}"
PYTHON_MAJOR_MINOR_VERSION: "${{ inputs.default-python-version }}"
- JOB_ID: "integration-${{ matrix.integration }}"
+ JOB_ID: "integration-providers-${{ matrix.integration }}"
SKIP_PROVIDER_TESTS: "${{ inputs.skip-provider-tests }}"
ENABLE_COVERAGE: "${{ inputs.run-coverage}}"
DEBUG_RESOURCES: "${{ inputs.debug-resources }}"
@@ -91,13 +141,14 @@ jobs:
run: ./scripts/ci/cleanup_docker.sh
- name: "Prepare breeze & CI image: ${{ inputs.default-python-version }}:${{ inputs.image-tag }}"
uses: ./.github/actions/prepare_breeze_and_image
- - name: "Integration Tests: ${{ matrix.integration }}"
- run: ./scripts/ci/testing/run_integration_tests_with_retry.sh ${{ matrix.integration }}
- - name: "Post Tests success: Integration Tests ${{ matrix.integration }}"
+ - name: "Integration Tests: providers ${{ matrix.integration }}"
+ # yamllint disable rule:line-length
+ run: ./scripts/ci/testing/run_integration_tests_with_retry.sh providers "${{ matrix.integration }}"
+ - name: "Post Tests success"
uses: ./.github/actions/post_tests_success
with:
codecov-token: ${{ secrets.CODECOV_TOKEN }}
python-version: ${{ inputs.default-python-version }}
- - name: "Post Tests failure: Integration Tests ${{ matrix.integration }}"
+ - name: "Post Tests failure"
uses: ./.github/actions/post_tests_failure
if: failure()
diff --git a/.github/workflows/run-unit-tests.yml b/.github/workflows/run-unit-tests.yml
index eb3e1a90707f4..ab2716bd229d9 100644
--- a/.github/workflows/run-unit-tests.yml
+++ b/.github/workflows/run-unit-tests.yml
@@ -24,6 +24,10 @@ on: # yamllint disable-line rule:truthy
description: "The array of labels (in json form) determining default runner used for the build."
required: true
type: string
+ test-groups:
+ description: "The json representing list of test test groups to run"
+ required: true
+ type: string
backend:
description: "The backend to run the tests on"
required: true
@@ -61,8 +65,12 @@ on: # yamllint disable-line rule:truthy
description: "Excluded combos (stringified JSON array of python-version/backend-version dicts)"
required: true
type: string
- parallel-test-types-list-as-string:
- description: "The list of parallel test types to run separated by spaces"
+ core-test-types-list-as-string:
+ description: "The list of core test types to run separated by spaces"
+ required: true
+ type: string
+ providers-test-types-list-as-string:
+ description: "The list of core test types to run separated by spaces"
required: true
type: string
run-migration-tests:
@@ -119,13 +127,14 @@ jobs:
name: "\
${{ inputs.test-scope }}:\
${{ inputs.test-name }}${{ inputs.test-name-separator }}${{ matrix.backend-version }}:\
- ${{matrix.python-version}}: ${{ inputs.parallel-test-types-list-as-string }}"
+ ${{matrix.python-version}}: ${{ inputs.test-types-list-as-string }}"
runs-on: ${{ fromJSON(inputs.runs-on-as-json-default) }}
strategy:
fail-fast: false
matrix:
python-version: "${{fromJSON(inputs.python-versions)}}"
backend-version: "${{fromJSON(inputs.backend-versions)}}"
+ test-group: "${{fromJSON(inputs.test-groups)}}"
exclude: "${{fromJSON(inputs.excludes)}}"
env:
# yamllint disable rule:line-length
@@ -145,12 +154,14 @@ jobs:
IMAGE_TAG: "${{ inputs.image-tag }}"
INCLUDE_SUCCESS_OUTPUTS: ${{ inputs.include-success-outputs }}
# yamllint disable rule:line-length
- JOB_ID: "${{ inputs.test-scope }}-${{ inputs.test-name }}-${{inputs.backend}}-${{ matrix.backend-version }}-${{ matrix.python-version }}"
+ JOB_ID: "${{ matrix.test-group }}-${{ inputs.test-scope }}-${{ inputs.test-name }}-${{inputs.backend}}-${{ matrix.backend-version }}-${{ matrix.python-version }}"
MOUNT_SOURCES: "skip"
- PARALLEL_TEST_TYPES: "${{ inputs.parallel-test-types-list-as-string }}"
+ # yamllint disable rule:line-length
+ PARALLEL_TEST_TYPES: ${{ matrix.test-group == 'core' && inputs.core-test-types-list-as-string || inputs.providers-test-types-list-as-string }}
PYTHON_MAJOR_MINOR_VERSION: "${{ matrix.python-version }}"
UPGRADE_BOTO: "${{ inputs.upgrade-boto }}"
AIRFLOW_MONITOR_DELAY_TIME_IN_SECONDS: "${{inputs.monitor-delay-time-in-seconds}}"
+
VERBOSE: "true"
steps:
- name: "Cleanup repo"
@@ -165,33 +176,13 @@ jobs:
- name: "Prepare breeze & CI image: ${{matrix.python-version}}:${{ inputs.image-tag }}"
uses: ./.github/actions/prepare_breeze_and_image
- name: >
- Migration Tests:
- ${{ matrix.python-version }}:${{ inputs.parallel-test-types-list-as-string }}
+ Migration Tests: ${{ matrix.python-version }}:${{ inputs.core-test-types-list-as-string }}
uses: ./.github/actions/migration_tests
- if: inputs.run-migration-tests == 'true'
+ if: inputs.run-migration-tests == 'true' && matrix.test-group == 'core'
- name: >
- ${{ inputs.test-scope }} Tests ${{ inputs.test-name }} ${{ matrix.backend-version }}
- Py${{ matrix.python-version }}:${{ inputs.parallel-test-types-list-as-string}}
- run: |
- if [[ "${{ inputs.test-scope }}" == "DB" ]]; then
- breeze testing db-tests \
- --parallel-test-types "${{ inputs.parallel-test-types-list-as-string }}"
- elif [[ "${{ inputs.test-scope }}" == "Non-DB" ]]; then
- breeze testing non-db-tests \
- --parallel-test-types "${{ inputs.parallel-test-types-list-as-string }}"
- elif [[ "${{ inputs.test-scope }}" == "All" ]]; then
- breeze testing tests --run-in-parallel \
- --parallel-test-types "${{ inputs.parallel-test-types-list-as-string }}"
- elif [[ "${{ inputs.test-scope }}" == "Quarantined" ]]; then
- breeze testing tests --test-type "All-Quarantined" || true
- elif [[ "${{ inputs.test-scope }}" == "ARM collection" ]]; then
- breeze testing tests --collect-only --remove-arm-packages
- elif [[ "${{ inputs.test-scope }}" == "System" ]]; then
- breeze testing tests tests/system/example_empty.py --system core
- else
- echo "Unknown test scope: ${{ inputs.test-scope }}"
- exit 1
- fi
+ ${{ matrix.test-group}}:${{ inputs.test-scope }} Tests ${{ inputs.test-name }} ${{ matrix.backend-version }}
+ Py${{ matrix.python-version }}:${{ inputs.test-types-list-as-string}}
+ run: ./scripts/ci/testing/run_unit_tests.sh "${{ matrix.test-group }}" "${{ inputs.test-scope }}"
- name: "Post Tests success"
uses: ./.github/actions/post_tests_success
with:
diff --git a/.github/workflows/special-tests.yml b/.github/workflows/special-tests.yml
index 78b4d928f7a92..012b619cba941 100644
--- a/.github/workflows/special-tests.yml
+++ b/.github/workflows/special-tests.yml
@@ -24,12 +24,20 @@ on: # yamllint disable-line rule:truthy
description: "The array of labels (in json form) determining default runner used for the build."
required: true
type: string
+ test-groups:
+ description: "The json representing list of test test groups to run"
+ required: true
+ type: string
image-tag:
description: "Tag to set for the image"
required: true
type: string
- parallel-test-types-list-as-string:
- description: "The list of parallel test types to run separated by spaces"
+ core-test-types-list-as-string:
+ description: "The list of core test types to run separated by spaces"
+ required: true
+ type: string
+ providers-test-types-list-as-string:
+ description: "The list of providers test types to run separated by spaces"
required: true
type: string
run-coverage:
@@ -77,14 +85,15 @@ jobs:
downgrade-sqlalchemy: "true"
test-name: "MinSQLAlchemy-Postgres"
test-scope: "DB"
+ test-groups: ${{ needs.build-info.outputs.test-groups }}
backend: "postgres"
image-tag: ${{ inputs.image-tag }}
python-versions: "['${{ inputs.default-python-version }}']"
backend-versions: "['${{ inputs.default-postgres-version }}']"
excluded-providers-as-string: ${{ inputs.excluded-providers-as-string }}
excludes: "[]"
- parallel-test-types-list-as-string: ${{ inputs.parallel-test-types-list-as-string }}
- include-success-outputs: ${{ needs.build-info.outputs.include-success-outputs }}
+ core-test-types-list-as-string: ${{ inputs.core-test-types-list-as-string }}
+ providers-test-types-list-as-string: ${{ inputs.providers-test-types-list-as-string }}
run-coverage: ${{ inputs.run-coverage }}
debug-resources: ${{ inputs.debug-resources }}
@@ -100,13 +109,15 @@ jobs:
upgrade-boto: "true"
test-name: "LatestBoto-Postgres"
test-scope: "All"
+ test-groups: ${{ needs.build-info.outputs.test-groups }}
backend: "postgres"
image-tag: ${{ inputs.image-tag }}
python-versions: "['${{ inputs.default-python-version }}']"
backend-versions: "['${{ inputs.default-postgres-version }}']"
excluded-providers-as-string: ${{ inputs.excluded-providers-as-string }}
excludes: "[]"
- parallel-test-types-list-as-string: ${{ inputs.parallel-test-types-list-as-string }}
+ core-test-types-list-as-string: ${{ inputs.core-test-types-list-as-string }}
+ providers-test-types-list-as-string: ${{ inputs.providers-test-types-list-as-string }}
include-success-outputs: ${{ needs.build-info.outputs.include-success-outputs }}
run-coverage: ${{ inputs.run-coverage }}
debug-resources: ${{ inputs.debug-resources }}
@@ -123,13 +134,15 @@ jobs:
downgrade-pendulum: "true"
test-name: "Pendulum2-Postgres"
test-scope: "All"
+ test-groups: ${{ needs.build-info.outputs.test-groups }}
backend: "postgres"
image-tag: ${{ inputs.image-tag }}
python-versions: "['${{ inputs.default-python-version }}']"
backend-versions: "['${{ inputs.default-postgres-version }}']"
excluded-providers-as-string: ${{ inputs.excluded-providers-as-string }}
excludes: "[]"
- parallel-test-types-list-as-string: ${{ inputs.parallel-test-types-list-as-string }}
+ core-test-types-list-as-string: ${{ inputs.core-test-types-list-as-string }}
+ providers-test-types-list-as-string: ${{ inputs.providers-test-types-list-as-string }}
include-success-outputs: ${{ needs.build-info.outputs.include-success-outputs }}
run-coverage: ${{ inputs.run-coverage }}
debug-resources: ${{ inputs.debug-resources }}
@@ -146,13 +159,15 @@ jobs:
enable-aip-44: "false"
test-name: "InProgressDisabled-Postgres"
test-scope: "All"
+ test-groups: ${{ needs.build-info.outputs.test-groups }}
backend: "postgres"
image-tag: ${{ inputs.image-tag }}
python-versions: "['${{ inputs.default-python-version }}']"
backend-versions: "['${{ inputs.default-postgres-version }}']"
excluded-providers-as-string: ${{ inputs.excluded-providers-as-string }}
excludes: "[]"
- parallel-test-types-list-as-string: ${{ inputs.parallel-test-types-list-as-string }}
+ core-test-types-list-as-string: ${{ inputs.core-test-types-list-as-string }}
+ providers-test-types-list-as-string: ${{ inputs.providers-test-types-list-as-string }}
include-success-outputs: ${{ needs.build-info.outputs.include-success-outputs }}
run-coverage: ${{ inputs.run-coverage }}
debug-resources: ${{ inputs.debug-resources }}
@@ -168,13 +183,15 @@ jobs:
runs-on-as-json-default: ${{ inputs.runs-on-as-json-default }}
test-name: "Postgres"
test-scope: "Quarantined"
+ test-groups: ${{ needs.build-info.outputs.test-groups }}
backend: "postgres"
image-tag: ${{ inputs.image-tag }}
python-versions: "['${{ inputs.default-python-version }}']"
backend-versions: "['${{ inputs.default-postgres-version }}']"
excluded-providers-as-string: ${{ inputs.excluded-providers-as-string }}
excludes: "[]"
- parallel-test-types-list-as-string: ${{ inputs.parallel-test-types-list-as-string }}
+ core-test-types-list-as-string: ${{ inputs.core-test-types-list-as-string }}
+ providers-test-types-list-as-string: ${{ inputs.providers-test-types-list-as-string }}
include-success-outputs: ${{ needs.build-info.outputs.include-success-outputs }}
run-coverage: ${{ inputs.run-coverage }}
debug-resources: ${{ inputs.debug-resources }}
@@ -190,19 +207,21 @@ jobs:
runs-on-as-json-default: ${{ inputs.runs-on-as-json-default }}
test-name: "Postgres"
test-scope: "ARM collection"
+ test-groups: ${{ needs.build-info.outputs.test-groups }}
backend: "postgres"
image-tag: ${{ inputs.image-tag }}
python-versions: "['${{ inputs.default-python-version }}']"
backend-versions: "['${{ inputs.default-postgres-version }}']"
excluded-providers-as-string: ${{ inputs.excluded-providers-as-string }}
excludes: "[]"
- parallel-test-types-list-as-string: ${{ inputs.parallel-test-types-list-as-string }}
+ core-test-types-list-as-string: ${{ inputs.core-test-types-list-as-string }}
+ providers-test-types-list-as-string: ${{ inputs.providers-test-types-list-as-string }}
include-success-outputs: ${{ needs.build-info.outputs.include-success-outputs }}
run-coverage: ${{ inputs.run-coverage }}
debug-resources: ${{ inputs.debug-resources }}
tests-system:
- name: "System test"
+ name: "System test: ${{ matrix.test-group }}"
uses: ./.github/workflows/run-unit-tests.yml
permissions:
contents: read
@@ -212,13 +231,15 @@ jobs:
runs-on-as-json-default: ${{ inputs.runs-on-as-json-default }}
test-name: "SystemTest"
test-scope: "System"
+ test-groups: ${{ needs.build-info.outputs.test-groups }}
backend: "postgres"
image-tag: ${{ inputs.image-tag }}
python-versions: "['${{ inputs.default-python-version }}']"
backend-versions: "['${{ inputs.default-postgres-version }}']"
excluded-providers-as-string: ${{ inputs.excluded-providers-as-string }}
excludes: "[]"
- parallel-test-types-list-as-string: ${{ inputs.parallel-test-types-list-as-string }}
+ core-test-types-list-as-string: ${{ inputs.core-test-types-list-as-string }}
+ providers-test-types-list-as-string: ${{ inputs.providers-test-types-list-as-string }}
include-success-outputs: ${{ needs.build-info.outputs.include-success-outputs }}
run-coverage: ${{ inputs.run-coverage }}
debug-resources: ${{ inputs.debug-resources }}
diff --git a/Dockerfile.ci b/Dockerfile.ci
index 943270aec693a..8c6c1792fce4a 100644
--- a/Dockerfile.ci
+++ b/Dockerfile.ci
@@ -1068,12 +1068,6 @@ function check_run_tests() {
python "${IN_CONTAINER_DIR}/remove_arm_packages.py"
fi
- if [[ ${TEST_TYPE} == "PlainAsserts" ]]; then
- # Plain asserts should be converted to env variable to make sure they are taken into account
- # otherwise they will not be effective during test collection when plain assert is breaking collection
- export PYTEST_PLAIN_ASSERTS="true"
- fi
-
if [[ ${DATABASE_ISOLATION=} == "true" ]]; then
echo "${COLOR_BLUE}Starting internal API server:${COLOR_RESET}"
# We need to start the internal API server before running tests
diff --git a/contributing-docs/testing/helm_unit_tests.rst b/contributing-docs/testing/helm_unit_tests.rst
index 9a733104b609f..06c35addf05d6 100644
--- a/contributing-docs/testing/helm_unit_tests.rst
+++ b/contributing-docs/testing/helm_unit_tests.rst
@@ -70,7 +70,7 @@ so rather than running all tests, you can run only tests from a selected package
.. code-block:: bash
- breeze testing helm-tests --helm-test-package basic
+ breeze testing helm-tests --test-type basic
Will run all tests from ``tests-charts/basic`` package.
diff --git a/contributing-docs/testing/unit_tests.rst b/contributing-docs/testing/unit_tests.rst
index 88ca07c6e0e68..6b7b7a611aaf3 100644
--- a/contributing-docs/testing/unit_tests.rst
+++ b/contributing-docs/testing/unit_tests.rst
@@ -104,18 +104,8 @@ Those test types are defined:
``virtualenv_operator`` and ``external_python_operator`` test markers that the tests are marked with.
* ``WWW`` - Tests for the Airflow webserver (www folder)
* ``Providers`` - Tests for all Providers of Airflow (providers folder)
-* ``PlainAsserts`` - tests that require disabling ``assert-rewrite`` feature of Pytest (usually because
- a buggy/complex implementation of an imported library) (``plain_asserts`` marker)
* ``Other`` - all other tests remaining after the above tests are selected
-There are also Virtualenv/ExternalPython operator test types that are excluded from ``Operators`` test type
-and run as separate test types. Those are :
-
-* ``PythonVenv`` - tests for PythonVirtualenvOperator - selected directly as TestPythonVirtualenvOperator
-* ``BranchPythonVenv`` - tests for BranchPythonVirtualenvOperator - selected directly as TestBranchPythonVirtualenvOperator
-* ``ExternalPython`` - tests for ExternalPythonOperator - selected directly as TestExternalPythonOperator
-* ``BranchExternalPython`` - tests for BranchExternalPythonOperator - selected directly as TestBranchExternalPythonOperator
-
We have also tests that run "all" tests (so they do not look at the folder, but at the ``pytest`` markers
the tests are marked with to run with some filters applied.
diff --git a/dev/breeze/doc/05_test_commands.rst b/dev/breeze/doc/05_test_commands.rst
index e210017088ac3..42e29d91186d7 100644
--- a/dev/breeze/doc/05_test_commands.rst
+++ b/dev/breeze/doc/05_test_commands.rst
@@ -75,34 +75,28 @@ This applies to all kind of tests - all our tests can be run using pytest.
Running unit tests with ``breeze testing`` commands
...................................................
-An option you have is that you can also run tests via built-in ``breeze testing tests`` command - which
-is a "swiss-army-knife" of unit testing with Breeze. This command has a lot of parameters and is very
-flexible thus might be a bit overwhelming.
+An option you have is that you can also run tests via built-in ``breeze testing *tests*`` commands - which
+is a "swiss-army-knife" of unit testing with Breeze. You can run all groups of tests with that Airflow
+supports with one of the commands below.
-In most cases if you want to run tess you want to use dedicated ``breeze testing db-tests``
-or ``breeze testing non-db-tests`` commands that automatically run groups of tests that allow you to choose
-subset of tests to run (with ``--parallel-test-types`` flag)
+Using ``breeze testing core-tests`` command
+...........................................
-Using ``breeze testing tests`` command
-......................................
+The ``breeze testing core-tests`` command is that you can run for all or specify sub-set of the tests
+for Core.
-The ``breeze testing tests`` command is that you can easily specify sub-set of the tests -- including
-selecting specific Providers tests to run.
-
-For example this will only run provider tests for airbyte and http providers:
+For example this will run all core tests :
.. code-block:: bash
- breeze testing tests --test-type "Providers[airbyte,http]"
-
-You can also exclude tests for some providers from being run when whole "Providers" test type is run.
+ breeze testing core-tests
-For example this will run tests for all providers except amazon and google provider tests:
+For example this will only run "Other" tests :
.. code-block:: bash
- breeze testing tests --test-type "Providers[-amazon,google]"
+ breeze testing core-tests --test-type "Other"
You can also run parallel tests with ``--run-in-parallel`` flag - by default it will run all tests types
in parallel, but you can specify the test type that you want to run with space separated list of test
@@ -114,25 +108,17 @@ For example this will run API and WWW tests in parallel:
breeze testing tests --parallel-test-types "API WWW" --run-in-parallel
-There are few special types of tests that you can run:
-
-* ``All`` - all tests are run in single pytest run.
-* ``All-Postgres`` - runs all tests that require Postgres database
-* ``All-MySQL`` - runs all tests that require MySQL database
-* ``All-Quarantine`` - runs all tests that are in quarantine (marked with ``@pytest.mark.quarantined``
- decorator)
-
Here is the detailed set of options for the ``breeze testing tests`` command.
-.. image:: ./images/output_testing_tests.svg
- :target: https://raw.githubusercontent.com/apache/airflow/main/dev/breeze/images/output_testing_tests.svg
+.. image:: ./images/output_testing_core-tests.svg
+ :target: https://raw.githubusercontent.com/apache/airflow/main/dev/breeze/images/output_testing_core-tests.svg
:width: 100%
- :alt: Breeze testing tests
+ :alt: Breeze testing core-tests
-Using ``breeze testing db-tests`` command
-.........................................
+Using ``breeze testing core-db-tests`` command
+..............................................
-The ``breeze testing db-tests`` command is simplified version of the ``breeze testing tests`` command
+The ``breeze testing core-db-tests`` command is simplified version of the ``breeze testing core-tests`` command
that only allows you to run tests that are not bound to a database - in parallel utilising all your CPUS.
The DB-bound tests are the ones that require a database to be started and configured separately for
each test type run and they are run in parallel containers/parallel docker compose projects to
@@ -147,33 +133,33 @@ Run all DB tests:
.. code-block:: bash
- breeze testing db-tests
+ breeze testing core-db-tests
Only run DB tests from "API CLI WWW" test types:
.. code-block:: bash
- breeze testing db-tests --parallel-test-types "API CLI WWW"
+ breeze testing core-db-tests --parallel-test-types "API CLI WWW"
Run all DB tests excluding those in CLI and WWW test types:
.. code-block:: bash
- breeze testing db-tests --excluded-parallel-test-types "CLI WWW"
+ breeze testing core-db-tests --excluded-parallel-test-types "CLI WWW"
-Here is the detailed set of options for the ``breeze testing db-tests`` command.
+Here is the detailed set of options for the ``breeze testing core-db-tests`` command.
-.. image:: ./images/output_testing_db-tests.svg
- :target: https://raw.githubusercontent.com/apache/airflow/main/dev/breeze/images/output_testing_db-tests.svg
+.. image:: ./images/output_testing_core-db-tests.svg
+ :target: https://raw.githubusercontent.com/apache/airflow/main/dev/breeze/images/output_testing_core-db-tests.svg
:width: 100%
- :alt: Breeze testing db-tests
+ :alt: Breeze testing core-db-tests
-Using ``breeze testing non-db-tests`` command
-.........................................
+Using ``breeze testing core-non-db-tests`` command
+..................................................
-The ``breeze testing non-db-tests`` command is simplified version of the ``breeze testing tests`` command
-that only allows you to run tests that are not bound to a database - in parallel utilising all your CPUS.
+The ``breeze testing core-non-db-tests`` command is simplified version of the ``breeze testing core-tests``
+command that only allows you to run tests that are not bound to a database - in parallel utilising all your CPUS.
The non-DB-bound tests are the ones that do not expect a database to be started and configured and we can
utilise multiple CPUs your machine has via ``pytest-xdist`` plugin - thus allowing you to quickly
run few groups of tests in parallel using single container rather than many of them as it is the case for
@@ -187,34 +173,136 @@ Run all non-DB tests:
.. code-block:: bash
- breeze testing non-db-tests
+ breeze testing core-non-db-tests
Only run non-DB tests from "API CLI WWW" test types:
.. code-block:: bash
- breeze testing non-db-tests --parallel-test-types "API CLI WWW"
+ breeze testing core-non-db-tests --parallel-test-types "API CLI WWW"
Run all non-DB tests excluding those in CLI and WWW test types:
.. code-block:: bash
- breeze testing non-db-tests --excluded-parallel-test-types "CLI WWW"
+ breeze testing core-non-db-tests --excluded-parallel-test-types "CLI WWW"
+
+Here is the detailed set of options for the ``breeze testing core-non-db-tests`` command.
+
+.. image:: ./images/output_testing_core-non-db-tests.svg
+ :target: https://raw.githubusercontent.com/apache/airflow/main/dev/breeze/images/output_testing_core-non-db-tests.svg
+ :width: 100%
+ :alt: Breeze testing core-non-db-tests
+
+Using ``breeze testing providers-tests`` command
+................................................
+
+The ``breeze testing providers-tests`` command is that you can run for all or specify sub-set of the tests
+for Providers.
+
+For example this will run all provider tests tests :
+
+.. code-block:: bash
+
+ breeze testing providers-tests
+
+This will only run "amazon" and "google" provider tests :
+
+.. code-block:: bash
+
+ breeze testing providers-tests --test-type "Providers[amazon,google]"
+
+You can also run "all but" provider tests - this will run all providers tests except amazon and google :
+
+.. code-block:: bash
+
+ breeze testing providers-tests --test-type "Providers[-amazon,google]"
+
+You can also run parallel tests with ``--run-in-parallel`` flag - by default it will run all tests types
+in parallel, but you can specify the test type that you want to run with space separated list of test
+types passed to ``--parallel-test-types`` flag.
+
+For example this will run API and WWW tests in parallel:
+
+.. code-block:: bash
+
+ breeze testing tests --parallel-test-types "Providers[amazon] Providers[google]" --run-in-parallel
+
+Here is the detailed set of options for the ``breeze testing providers-test`` command.
+
+.. image:: ./images/output_testing_providers-tests.svg
+ :target: https://raw.githubusercontent.com/apache/airflow/main/dev/breeze/images/output_testing_providers-tests.svg
+ :width: 100%
+ :alt: Breeze testing providers-tests
+
+Using ``breeze testing providers-db-tests`` command
+...................................................
+
+The ``breeze testing providers-db-tests`` command is simplified version of the ``breeze testing providers-tests`` command
+that only allows you to run tests that are not bound to a database - in parallel utilising all your CPUS.
+The DB-bound tests are the ones that require a database to be started and configured separately for
+each test type run and they are run in parallel containers/parallel docker compose projects to
+utilise multiple CPUs your machine has - thus allowing you to quickly run few groups of tests in parallel.
+This command is used in CI to run DB tests.
+
+By default this command will run complete set of test types we have, thus allowing you to see result
+of all DB tests we have but you can choose a subset of test types to run by ``--parallel-test-types``
+flag or exclude some test types by specifying ``--excluded-parallel-test-types`` flag.
+
+Run all DB tests:
+
+.. code-block:: bash
+
+ breeze testing providers-db-tests
+
+You can also specify subset of tests similar to the ``breeze testing providers-tests`` command.
+
+Here is the detailed set of options for the ``breeze testing providers-db-tests`` command.
+
+.. image:: ./images/output_testing_providers-db-tests.svg
+ :target: https://raw.githubusercontent.com/apache/airflow/main/dev/breeze/images/output_testing_providers-db-tests.svg
+ :width: 100%
+ :alt: Breeze testing providers-db-tests
+
+
+Using ``breeze testing providers-non-db-tests`` command
+.......................................................
+
+The ``breeze testing providers-non-db-tests`` command is simplified version of the ``breeze testing providers-tests``
+command that only allows you to run tests that are not bound to a database - in parallel utilising all your CPUS.
+The non-DB-bound tests are the ones that do not expect a database to be started and configured and we can
+utilise multiple CPUs your machine has via ``pytest-xdist`` plugin - thus allowing you to quickly
+run few groups of tests in parallel using single container rather than many of them as it is the case for
+DB-bound tests. This command is used in CI to run Non-DB tests.
+
+By default this command will run complete set of test types we have, thus allowing you to see result
+of all DB tests we have but you can choose a subset of test types to run by ``--parallel-test-types``
+flag or exclude some test types by specifying ``--excluded-parallel-test-types`` flag.
+
+Run all non-DB tests:
+
+.. code-block:: bash
+
+ breeze testing providers-non-db-tests
+
+Only run non-DB tests from "API CLI WWW" test types:
+
+You can also specify subset of tests similar to the ``breeze testing providers-tests`` command.
-Here is the detailed set of options for the ``breeze testing non-db-tests`` command.
+Here is the detailed set of options for the ``breeze testing providers-non-db-tests`` command.
-.. image:: ./images/output_testing_non-db-tests.svg
- :target: https://raw.githubusercontent.com/apache/airflow/main/dev/breeze/images/output_testing_non-db-tests.svg
+.. image:: ./images/output_testing_providers-non-db-tests.svg
+ :target: https://raw.githubusercontent.com/apache/airflow/main/dev/breeze/images/output_testing_providers-non-db-tests.svg
:width: 100%
- :alt: Breeze testing non-db-tests
+ :alt: Breeze testing providers-non-db-tests
Using ``breeze testing task-sdk-tests`` command
-............................................
+...............................................
-The ``breeze testing task-sdk-tests`` command is simplified version of the ``breeze testing tests`` command
-that allows you to run tests for Task SDK without initializing database. The Task SDK should not need
-database to be started so this acts as a good check to see if the Task SDK tests are working properly.
+The ``breeze testing task-sdk-tests`` command is allows you to run tests for Task SDK without
+initializing database. The Task SDK should not need database to be started so this acts as a
+good check to see if the Task SDK tests are working properly.
Run all Task SDK tests:
@@ -230,26 +318,90 @@ Here is the detailed set of options for the ``breeze testing task-sdk-tests`` co
:alt: Breeze testing task-sdk-tests
-Running integration tests
-.........................
+Running integration core tests
+...............................
-You can also run integration tests via built-in ``breeze testing integration-tests`` command. Some of our
-tests require additional integrations to be started in docker-compose. The integration tests command will
-run the expected integration and tests that need that integration.
+You can also run integration core tests via built-in ``breeze testing integration-core-tests`` command.
+Some of our core tests require additional integrations to be started in docker-compose.
+The integration tests command will run the expected integration and tests that need that integration.
For example this will only run kerberos tests:
.. code-block:: bash
- breeze testing integration-tests --integration kerberos
+ breeze testing integration-core-tests --integration kerberos
+
+Here is the detailed set of options for the ``breeze testing integration-core-tests`` command.
+
+.. image:: ./images/output_testing_integration-core-tests.svg
+ :target: https://raw.githubusercontent.com/apache/airflow/main/dev/breeze/images/output_testing_integration-core-tests.svg
+ :width: 100%
+ :alt: Breeze testing integration-core-tests
+
+Running integration providers tests
+...................................
+You can also run integration core tests via built-in ``breeze testing integration-providers-tests`` command.
+Some of our core tests require additional integrations to be started in docker-compose.
+The integration tests command will run the expected integration and tests that need that integration.
-Here is the detailed set of options for the ``breeze testing integration-tests`` command.
+For example this will only run kerberos tests:
-.. image:: ./images/output_testing_integration-tests.svg
- :target: https://raw.githubusercontent.com/apache/airflow/main/dev/breeze/images/output_testing_integration_tests.svg
+.. code-block:: bash
+
+ breeze testing integration-providers-tests --integration kerberos
+
+Here is the detailed set of options for the ``breeze testing integration-providers-tests`` command.
+
+.. image:: ./images/output_testing_integration-providers-tests.svg
+ :target: https://raw.githubusercontent.com/apache/airflow/main/dev/breeze/images/output_testing_integration-providers-tests.svg
+ :width: 100%
+ :alt: Breeze testing integration-providers-tests
+
+
+Running system core tests
+.........................
+
+You can also run system core tests via built-in ``breeze testing system-core-tests`` command.
+Some of our core system tests runs against external systems and we can run them providing that
+credentials are configured to connect to those systems. Usually you should run only one or
+set of related tests this way.
+
+For example this will only run example_external_task_child_deferrable tests:
+
+.. code-block:: bash
+
+ breeze testing system-core-tests tests/system/core/example_external_task_child_deferrable.py
+
+Here is the detailed set of options for the ``breeze testing system-core-tests`` command.
+
+.. image:: ./images/output_testing_system-core-tests.svg
+ :target: https://raw.githubusercontent.com/apache/airflow/main/dev/breeze/images/output_testing_system-core-tests.svg
:width: 100%
- :alt: Breeze testing integration-tests
+ :alt: Breeze testing system-core-tests
+
+
+Running system providers tests
+..............................
+
+You can also run system providers tests via built-in ``breeze testing system-providers-tests`` command.
+Some of our providers system tests runs against external systems and we can run them providing that
+credentials are configured to connect to those systems. Usually you should run only one or
+set of related tests this way.
+
+For example this will only run providers/tests/system/amazon/aws/example_appflow.py tests:
+
+.. code-block:: bash
+
+ breeze testing system-providers-tests providers/tests/system/amazon/aws/example_appflow.py
+
+Here is the detailed set of options for the ``breeze testing system-providers-tests`` command.
+
+.. image:: ./images/output_testing_system-providers-tests.svg
+ :target: https://raw.githubusercontent.com/apache/airflow/main/dev/breeze/images/output_testing_system-providers-tests.svg
+ :width: 100%
+ :alt: Breeze testing system-providers-tests
+
Running Helm unit tests
diff --git a/dev/breeze/doc/ci/04_selective_checks.md b/dev/breeze/doc/ci/04_selective_checks.md
index b077bd1a70a1f..e5b86e895cfcd 100644
--- a/dev/breeze/doc/ci/04_selective_checks.md
+++ b/dev/breeze/doc/ci/04_selective_checks.md
@@ -166,74 +166,76 @@ separated by spaces. This is to accommodate for the wau how outputs of this kind
Github Actions to pass the list of parameters to a command to execute
-| Output | Meaning of the output | Example value | List as string |
-|----------------------------------------|------------------------------------------------------------------------------------------------------|-------------------------------------------|----------------|
-| affected-providers-list-as-string | List of providers affected when they are selectively affected. | airbyte http | * |
-| all-python-versions | List of all python versions there are available in the form of JSON array | ['3.9', '3.10'] | |
-| all-python-versions-list-as-string | List of all python versions there are available in the form of space separated string | 3.9 3.10 | * |
-| all-versions | If set to true, then all python, k8s, DB versions are used for tests. | false | |
-| basic-checks-only | Whether to run all static checks ("false") or only basic set of static checks ("true") | false | |
-| build_system_changed_in_pyproject_toml | When builds system dependencies changed in pyproject.toml changed in the PR. | false | |
-| chicken-egg-providers | List of providers that should be considered as "chicken-egg" - expecting development Airflow version | | |
-| ci-image-build | Whether CI image build is needed | true | |
-| debug-resources | Whether resources usage should be printed during parallel job execution ("true"/ "false") | false | |
-| default-branch | Which branch is default for the build ("main" for main branch, "v2-4-test" for 2.4 line etc.) | main | |
-| default-constraints-branch | Which branch is default for the build ("constraints-main" for main branch, "constraints-2-4" etc.) | constraints-main | |
-| default-helm-version | Which Helm version to use as default | v3.9.4 | |
-| default-kind-version | Which Kind version to use as default | v0.16.0 | |
-| default-kubernetes-version | Which Kubernetes version to use as default | v1.25.2 | |
-| default-mysql-version | Which MySQL version to use as default | 5.7 | |
-| default-postgres-version | Which Postgres version to use as default | 10 | |
-| default-python-version | Which Python version to use as default | 3.9 | |
-| docker-cache | Which cache should be used for images ("registry", "local" , "disabled") | registry | |
-| docs-build | Whether to build documentation ("true"/"false") | true | |
-| docs-list-as-string | What filter to apply to docs building - based on which documentation packages should be built | apache-airflow helm-chart google | |
-| full-tests-needed | Whether this build runs complete set of tests or only subset (for faster PR builds) [1] | false | |
-| generated-dependencies-changed | Whether generated dependencies have changed ("true"/"false") | false | |
-| hatch-build-changed | When hatch build.py changed in the PR. | false | |
-| helm-version | Which Helm version to use for tests | v3.9.4 | |
-| is-airflow-runner | Whether runner used is an airflow or infrastructure runner (true if airflow/false if infrastructure) | false | |
-| is-amd-runner | Whether runner used is an AMD one | true | |
-| is-arm-runner | Whether runner used is an ARM one | false | |
-| is-committer-build | Whether the build is triggered by a committer | false | |
-| is-k8s-runner | Whether the build runs on our k8s infrastructure | false | |
-| is-self-hosted-runner | Whether the runner is self-hosted | false | |
-| is-vm-runner | Whether the runner uses VM to run | true | |
-| kind-version | Which Kind version to use for tests | v0.16.0 | |
-| kubernetes-combos-list-as-string | All combinations of Python version and Kubernetes version to use for tests as space-separated string | 3.9-v1.25.2 3.9-v1.26.4 | * |
-| kubernetes-versions | All Kubernetes versions to use for tests as JSON array | ['v1.25.2'] | |
-| kubernetes-versions-list-as-string | All Kubernetes versions to use for tests as space-separated string | v1.25.2 | * |
-| mypy-checks | List of folders to be considered for mypy | [] | |
-| mysql-exclude | Which versions of MySQL to exclude for tests as JSON array | [] | |
-| mysql-versions | Which versions of MySQL to use for tests as JSON array | ['5.7'] | |
-| needs-api-codegen | Whether "api-codegen" are needed to run ("true"/"false") | true | |
-| needs-api-tests | Whether "api-tests" are needed to run ("true"/"false") | true | |
-| needs-helm-tests | Whether Helm tests are needed to run ("true"/"false") | true | |
-| needs-javascript-scans | Whether javascript CodeQL scans should be run ("true"/"false") | true | |
-| needs-mypy | Whether mypy check is supposed to run in this build | true | |
-| needs-python-scans | Whether Python CodeQL scans should be run ("true"/"false") | true | |
-| parallel-test-types-list-as-string | Which test types should be run for unit tests | API Always Providers Providers\[-google\] | * |
-| postgres-exclude | Which versions of Postgres to exclude for tests as JSON array | [] | |
-| postgres-versions | Which versions of Postgres to use for tests as JSON array | ['10'] | |
-| prod-image-build | Whether PROD image build is needed | true | |
-| prod-image-build | Whether PROD image build is needed | true | |
-| providers-compatibility-checks | List of dicts: (python_version, airflow_version, removed_providers) for compatibility checks | [] | |
-| pyproject-toml-changed | When pyproject.toml changed in the PR. | false | |
-| python-versions | List of python versions to use for that build | ['3.9'] | * |
-| python-versions-list-as-string | Which versions of MySQL to use for tests as space-separated string | 3.9 | * |
-| run-amazon-tests | Whether Amazon tests should be run ("true"/"false") | true | |
-| run-kubernetes-tests | Whether Kubernetes tests should be run ("true"/"false") | true | |
-| run-tests | Whether unit tests should be run ("true"/"false") | true | |
-| run-ui-tests | Whether WWW tests should be run ("true"/"false") | true | |
-| run-www-tests | Whether WWW tests should be run ("true"/"false") | true | |
-| runs-on-as-json-default | List of labels assigned for runners for that build for default runs for that build (as string) | ["ubuntu-22.04"] | |
-| runs-on-as-json-self-hosted | List of labels assigned for runners for that build for self hosted runners | ["self-hosted", "Linux", "X64"] | |
-| runs-on-as-json-public | List of labels assigned for runners for that build for public runners | ["ubuntu-22.04"] | |
-| skip-pre-commits | Which pre-commits should be skipped during the static-checks run | check-provider-yaml-valid,flynt,identity | |
-| skip-provider-tests | When provider tests should be skipped (on non-main branch or when no provider changes detected) | true | |
-| sqlite-exclude | Which versions of Sqlite to exclude for tests as JSON array | [] | |
-| testable-integrations | List of integrations that are testable in the build as JSON array | ['mongo', 'kafka', 'mssql'] | |
-| upgrade-to-newer-dependencies | Whether the image build should attempt to upgrade all dependencies (true/false or commit hash) | false | |
+| Output | Meaning of the output | Example value | List as string |
+|------------------------------------------------|------------------------------------------------------------------------------------------------------|-----------------------------------------|----------------|
+| selected-providers-list-as-string | List of providers affected when they are selectively affected. | airbyte http | * |
+| all-python-versions | List of all python versions there are available in the form of JSON array | \['3.9', '3.10'\] | |
+| all-python-versions-list-as-string | List of all python versions there are available in the form of space separated string | 3.9 3.10 | * |
+| all-versions | If set to true, then all python, k8s, DB versions are used for tests. | false | |
+| basic-checks-only | Whether to run all static checks ("false") or only basic set of static checks ("true") | false | |
+| build_system_changed_in_pyproject_toml | When builds system dependencies changed in pyproject.toml changed in the PR. | false | |
+| chicken-egg-providers | List of providers that should be considered as "chicken-egg" - expecting development Airflow version | | |
+| ci-image-build | Whether CI image build is needed | true | |
+| core-test-types-list-as-string | Which test types should be run for unit tests for core | API Always Providers | * |
+| debug-resources | Whether resources usage should be printed during parallel job execution ("true"/ "false") | false | |
+| default-branch | Which branch is default for the build ("main" for main branch, "v2-4-test" for 2.4 line etc.) | main | |
+| default-constraints-branch | Which branch is default for the build ("constraints-main" for main branch, "constraints-2-4" etc.) | constraints-main | |
+| default-helm-version | Which Helm version to use as default | v3.9.4 | |
+| default-kind-version | Which Kind version to use as default | v0.16.0 | |
+| default-kubernetes-version | Which Kubernetes version to use as default | v1.25.2 | |
+| default-mysql-version | Which MySQL version to use as default | 5.7 | |
+| default-postgres-version | Which Postgres version to use as default | 10 | |
+| default-python-version | Which Python version to use as default | 3.9 | |
+| docker-cache | Which cache should be used for images ("registry", "local" , "disabled") | registry | |
+| docs-build | Whether to build documentation ("true"/"false") | true | |
+| docs-list-as-string | What filter to apply to docs building - based on which documentation packages should be built | apache-airflow helm-chart google | |
+| full-tests-needed | Whether this build runs complete set of tests or only subset (for faster PR builds) \[1\] | false | |
+| generated-dependencies-changed | Whether generated dependencies have changed ("true"/"false") | false | |
+| hatch-build-changed | When hatch build.py changed in the PR. | false | |
+| helm-version | Which Helm version to use for tests | v3.9.4 | |
+| individual-providers-test-types-list-as-string | Which test types should be run for unit tests for providers (individually listed) | Providers[\amazon\] Providers\[google\] | * |
+| is-airflow-runner | Whether runner used is an airflow or infrastructure runner (true if airflow/false if infrastructure) | false | |
+| is-amd-runner | Whether runner used is an AMD one | true | |
+| is-arm-runner | Whether runner used is an ARM one | false | |
+| is-committer-build | Whether the build is triggered by a committer | false | |
+| is-k8s-runner | Whether the build runs on our k8s infrastructure | false | |
+| is-self-hosted-runner | Whether the runner is self-hosted | false | |
+| is-vm-runner | Whether the runner uses VM to run | true | |
+| kind-version | Which Kind version to use for tests | v0.16.0 | |
+| kubernetes-combos-list-as-string | All combinations of Python version and Kubernetes version to use for tests as space-separated string | 3.9-v1.25.2 3.9-v1.26.4 | * |
+| kubernetes-versions | All Kubernetes versions to use for tests as JSON array | \['v1.25.2'\] | |
+| kubernetes-versions-list-as-string | All Kubernetes versions to use for tests as space-separated string | v1.25.2 | * |
+| mypy-checks | List of folders to be considered for mypy | [] | |
+| mysql-exclude | Which versions of MySQL to exclude for tests as JSON array | [] | |
+| mysql-versions | Which versions of MySQL to use for tests as JSON array | \['5.7'\] | |
+| needs-api-codegen | Whether "api-codegen" are needed to run ("true"/"false") | true | |
+| needs-api-tests | Whether "api-tests" are needed to run ("true"/"false") | true | |
+| needs-helm-tests | Whether Helm tests are needed to run ("true"/"false") | true | |
+| needs-javascript-scans | Whether javascript CodeQL scans should be run ("true"/"false") | true | |
+| needs-mypy | Whether mypy check is supposed to run in this build | true | |
+| needs-python-scans | Whether Python CodeQL scans should be run ("true"/"false") | true | |
+| postgres-exclude | Which versions of Postgres to exclude for tests as JSON array | [] | |
+| postgres-versions | Which versions of Postgres to use for tests as JSON array | \['10'\] | |
+| prod-image-build | Whether PROD image build is needed | true | |
+| prod-image-build | Whether PROD image build is needed | true | |
+| providers-compatibility-checks | List of dicts: (python_version, airflow_version, removed_providers) for compatibility checks | [] | |
+| providers-test-types-list-as-string | Which test types should be run for unit tests for providers | Providers Providers\[-google\] | * |
+| pyproject-toml-changed | When pyproject.toml changed in the PR. | false | |
+| python-versions | List of python versions to use for that build | \['3.9'\] | * |
+| python-versions-list-as-string | Which versions of MySQL to use for tests as space-separated string | 3.9 | * |
+| run-amazon-tests | Whether Amazon tests should be run ("true"/"false") | true | |
+| run-kubernetes-tests | Whether Kubernetes tests should be run ("true"/"false") | true | |
+| run-tests | Whether unit tests should be run ("true"/"false") | true | |
+| run-ui-tests | Whether WWW tests should be run ("true"/"false") | true | |
+| run-www-tests | Whether WWW tests should be run ("true"/"false") | true | |
+| runs-on-as-json-default | List of labels assigned for runners for that build for default runs for that build (as string) | \["ubuntu-22.04"\] | |
+| runs-on-as-json-self-hosted | List of labels assigned for runners for that build for self hosted runners | \["self-hosted", "Linux", "X64"\] | |
+| runs-on-as-json-public | List of labels assigned for runners for that build for public runners | \["ubuntu-22.04"\] | |
+| skip-pre-commits | Which pre-commits should be skipped during the static-checks run | flynt,identity | |
+| skip-provider-tests | When provider tests should be skipped (on non-main branch or when no provider changes detected) | true | |
+| sqlite-exclude | Which versions of Sqlite to exclude for tests as JSON array | [] | |
+| testable-integrations | List of integrations that are testable in the build as JSON array | \['mongo', 'kafka', 'mssql'\] | |
+| upgrade-to-newer-dependencies | Whether the image build should attempt to upgrade all dependencies (true/false or commit hash) | false | |
[1] Note for deciding if `full tests needed` mode is enabled and provider.yaml files.
diff --git a/dev/breeze/doc/images/output-commands.svg b/dev/breeze/doc/images/output-commands.svg
index f67cd5795e40d..feee4e22b768f 100644
--- a/dev/breeze/doc/images/output-commands.svg
+++ b/dev/breeze/doc/images/output-commands.svg
@@ -304,7 +304,7 @@
│ --python -p Python major/minor version used in Airflow image for images. │
│ (>3.9< | 3.10 | 3.11 | 3.12) │
│ [default: 3.9] │
- │ --integration Integration(s) to enable when running (can be more than one). │
+ │ --integration Core Integrations to enable when running (can be more than one). │
│ (all | all-testable | cassandra | celery | drill | kafka | kerberos | keycloak | │
│ mongo | mssql | openlineage | otel | pinot | qdrant | redis | statsd | trino | ydb) │
│ --standalone-dag-processor Run standalone dag processor for start-airflow. │
diff --git a/dev/breeze/doc/images/output_setup_check-all-params-in-groups.svg b/dev/breeze/doc/images/output_setup_check-all-params-in-groups.svg
index 836aa93edd3c8..187a9a4073510 100644
--- a/dev/breeze/doc/images/output_setup_check-all-params-in-groups.svg
+++ b/dev/breeze/doc/images/output_setup_check-all-params-in-groups.svg
@@ -1,4 +1,4 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Command: testing core-db-tests
+
+
+
+
+
+
+
+
+
+
+ Usage: breeze testing core-db-tests [ OPTIONS ]
+
+ Run all (default) or specified DB-bound core unit tests.
+
+ â•â”€ Select tests to run ─────────────────────────────────────────────────────────────────────────────────────────────── ─╮
+ │ --parallel-test-types Space separated list of core test types used for testing in parallel. │
+ │ (API | Always | CLI | Core | Operators | Other | Serialization | WWW) │
+ │ [default: API Always CLI Core Operators Other Serialization WWW] │
+ │ --excluded-parallel-test-types Space separated list of core test types that will be excluded from parallel tes │
+ │ runs. │
+ │ (API | Always | CLI | Core | Operators | Other | Serialization | WWW) │
+ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
+ â•â”€ Test options ────────────────────────────────────────────────────────────────────────────────────────────────────── ─╮
+ │ --test-timeout Test timeout in seconds. Set the pytest setup, execution and teardown timeouts to this value │
+ │ (INTEGER RANGE) │
+ │ [default: 60; x>=0] │
+ │ --enable-coverage Enable coverage capturing for tests in the form of XML files │
+ │ --collect-only Collect tests only, do not run them. │
+ │ --db-reset -d Reset DB when entering the container. │
+ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
+ â•â”€ Test environment ────────────────────────────────────────────────────────────────────────────────────────────────── ─╮
+ │ --backend -b Database backend to use. If 'none' is chosen, Breeze will start with │
+ │ an invalid database configuration, meaning there will be no database │
+ │ available, and any attempts to connect to the Airflow database will │
+ │ fail. │
+ │ (>sqlite< | mysql | postgres | none) │
+ │ [default: sqlite] │
+ │ --no-db-cleanup Do not clear the database before each test module │
+ │ --python -p Python major/minor version used in Airflow image for images. │
+ │ (>3.9< | 3.10 | 3.11 | 3.12) │
+ │ [default: 3.9] │
+ │ --postgres-version -P Version of Postgres used. (>12< | 13 | 14 | 15 | 16 | 17) │
+ │ [default: 12] │
+ │ --mysql-version -M Version of MySQL used. (>8.0< | 8.4) [default: 8.0] │
+ │ --forward-credentials -f Forward local credentials to container when running. │
+ │ --force-sa-warnings / --no-force-sa-warnings Enable `sqlalchemy.exc.MovedIn20Warning` during the tests runs. │
+ │ [default: force-sa-warnings] │
+ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
+ â•â”€ Options for parallel test commands ──────────────────────────────────────────────────────────────────────────────── ─╮
+ │ --parallelism Maximum number of processes to use while running the operation in parallel. │
+ │ (INTEGER RANGE) │
+ │ [default: 4; 1<=x<=8] │
+ │ --skip-cleanup Skip cleanup of temporary files created during parallel run. │
+ │ --debug-resources Whether to show resource information while running in parallel. │
+ │ --include-success-outputs Whether to include outputs of successful parallel runs (skipped by default). │
+ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
+ â•â”€ Upgrading/downgrading/removing selected packages ────────────────────────────────────────────────────────────────── ─╮
+ │ --upgrade-boto Remove aiobotocore and upgrade botocore and boto to the latest version. │
+ │ --downgrade-sqlalchemy Downgrade SQLAlchemy to minimum supported version. │
+ │ --downgrade-pendulum Downgrade Pendulum to minimum supported version. │
+ │ --remove-arm-packages Removes arm packages from the image to test if ARM collection works │
+ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
+ â•â”€ Advanced flag for tests command ─────────────────────────────────────────────────────────────────────────────────── ─╮
+ │ --github-repository -g GitHub repository used to pull, push run images. (TEXT) [default: apache/airflow] │
+ │ --image-tag Tag of the image which is used to run the image (implies --mount-sources =skip). │
+ │ (TEXT) │
+ │ [default: latest] │
+ │ --mount-sources Choose scope of local sources that should be mounted, skipped, or removed (default = │
+ │ selected). │
+ │ (selected | all | skip | remove | tests | providers-and-tests) │
+ │ [default: selected] │
+ │ --skip-docker-compose-down Skips running docker-compose down after tests │
+ │ --keep-env-variables Do not clear environment variables that might have side effect while running tests │
+ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
+ â•â”€ Advanced flag for installing airflow in container ───────────────────────────────────────────────────────────────── ─╮
+ │ --airflow-constraints-reference Constraint reference to use for airflow installation │
+ │ (used in calculated constraints URL). │
+ │ (TEXT) │
+ │ --clean-airflow-installation Clean the airflow installation before installing version │
+ │ specified by --use-airflow-version . │
+ │ --force-lowest-dependencies Run tests for the lowest direct dependencies of Airflow │
+ │ or selected provider if `Provider[PROVIDER_ID]` is used │
+ │ as test type. │
+ │ --install-airflow-with-constraints / --no-install-airflow… Install airflow in a separate step, with constraints │
+ │ determined from package or airflow version. │
+ │ [default: no-install-airflow-with-constraints] │
+ │ --package-format Format of packages. (wheel | sdist | both) │
+ │ [default: wheel] │
+ │ --use-airflow-version Use (reinstall at entry) Airflow version from PyPI. It │
+ │ can also be version (to install from PyPI), `none`, │
+ │ `wheel`, or `sdist` to install from `dist` folder, or │
+ │ VCS URL to install from │
+ │ (https://pip.pypa.io/en/stable/topics/vcs-support/). │
+ │ Implies --mount-sources `remove`. │
+ │ (none | wheel | sdist | <airflow_version>) │
+ │ --use-packages-from-dist Install all found packages ( --package-format determines │
+ │ type) from 'dist' folder when entering breeze. │
+ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
+ â•â”€ Common options ──────────────────────────────────────────────────────────────────────────────────────────────────── ─╮
+ │ --dry-run -D If dry-run is set, commands are only printed, not executed. │
+ │ --verbose -v Print verbose information about performed steps. │
+ │ --help -h Show this message and exit. │
+ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
+
+
+
+
diff --git a/dev/breeze/doc/images/output_testing_core-db-tests.txt b/dev/breeze/doc/images/output_testing_core-db-tests.txt
new file mode 100644
index 0000000000000..e14e5ce6c4988
--- /dev/null
+++ b/dev/breeze/doc/images/output_testing_core-db-tests.txt
@@ -0,0 +1 @@
+107d81cec8206f566b803e7c38428bb6
diff --git a/dev/breeze/doc/images/output_testing_core-non-db-tests.svg b/dev/breeze/doc/images/output_testing_core-non-db-tests.svg
new file mode 100644
index 0000000000000..f98f532bf4e42
--- /dev/null
+++ b/dev/breeze/doc/images/output_testing_core-non-db-tests.svg
@@ -0,0 +1,392 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Command: testing core-non-db-tests
+
+
+
+
+
+
+
+
+
+
+ Usage: breeze testing core-non-db-tests [ OPTIONS ]
+
+ Run all (default) or specified Non-DB core unit tests.
+
+ â•â”€ Select test types to run ────────────────────────────────────────────────────────────────────────────────────────── ─╮
+ │ --parallel-test-types Space separated list of core test types used for testing in parallel. │
+ │ (API | Always | CLI | Core | Operators | Other | Serialization | WWW) │
+ │ [default: API Always CLI Core Operators Other Serialization WWW] │
+ │ --excluded-parallel-test-types Space separated list of core test types that will be excluded from parallel tes │
+ │ runs. │
+ │ (API | Always | CLI | Core | Operators | Other | Serialization | WWW) │
+ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
+ â•â”€ Test options ────────────────────────────────────────────────────────────────────────────────────────────────────── ─╮
+ │ --test-timeout Test timeout in seconds. Set the pytest setup, execution and teardown timeouts to this value │
+ │ (INTEGER RANGE) │
+ │ [default: 60; x>=0] │
+ │ --enable-coverage Enable coverage capturing for tests in the form of XML files │
+ │ --collect-only Collect tests only, do not run them. │
+ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
+ â•â”€ Test environment ────────────────────────────────────────────────────────────────────────────────────────────────── ─╮
+ │ --python -p Python major/minor version used in Airflow image for images. │
+ │ (>3.9< | 3.10 | 3.11 | 3.12) │
+ │ [default: 3.9] │
+ │ --forward-credentials -f Forward local credentials to container when running. │
+ │ --force-sa-warnings / --no-force-sa-warnings Enable `sqlalchemy.exc.MovedIn20Warning` during the tests runs. │
+ │ [default: force-sa-warnings] │
+ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
+ â•â”€ Options for parallel test commands ──────────────────────────────────────────────────────────────────────────────── ─╮
+ │ --parallelism Maximum number of processes to use while running the operation in parallel. │
+ │ (INTEGER RANGE) │
+ │ [default: 4; 1<=x<=8] │
+ │ --skip-cleanup Skip cleanup of temporary files created during parallel run. │
+ │ --debug-resources Whether to show resource information while running in parallel. │
+ │ --include-success-outputs Whether to include outputs of successful parallel runs (skipped by default). │
+ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
+ â•â”€ Upgrading/downgrading/removing selected packages ────────────────────────────────────────────────────────────────── ─╮
+ │ --upgrade-boto Remove aiobotocore and upgrade botocore and boto to the latest version. │
+ │ --downgrade-sqlalchemy Downgrade SQLAlchemy to minimum supported version. │
+ │ --downgrade-pendulum Downgrade Pendulum to minimum supported version. │
+ │ --remove-arm-packages Removes arm packages from the image to test if ARM collection works │
+ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
+ â•â”€ Advanced flag for tests command ─────────────────────────────────────────────────────────────────────────────────── ─╮
+ │ --github-repository -g GitHub repository used to pull, push run images. (TEXT) [default: apache/airflow] │
+ │ --image-tag Tag of the image which is used to run the image (implies --mount-sources =skip). │
+ │ (TEXT) │
+ │ [default: latest] │
+ │ --mount-sources Choose scope of local sources that should be mounted, skipped, or removed (default = │
+ │ selected). │
+ │ (selected | all | skip | remove | tests | providers-and-tests) │
+ │ [default: selected] │
+ │ --skip-docker-compose-down Skips running docker-compose down after tests │
+ │ --keep-env-variables Do not clear environment variables that might have side effect while running tests │
+ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
+ â•â”€ Advanced flag for installing airflow in container ───────────────────────────────────────────────────────────────── ─╮
+ │ --airflow-constraints-reference Constraint reference to use for airflow installation │
+ │ (used in calculated constraints URL). │
+ │ (TEXT) │
+ │ --clean-airflow-installation Clean the airflow installation before installing version │
+ │ specified by --use-airflow-version . │
+ │ --force-lowest-dependencies Run tests for the lowest direct dependencies of Airflow │
+ │ or selected provider if `Provider[PROVIDER_ID]` is used │
+ │ as test type. │
+ │ --install-airflow-with-constraints / --no-install-airflow… Install airflow in a separate step, with constraints │
+ │ determined from package or airflow version. │
+ │ [default: no-install-airflow-with-constraints] │
+ │ --package-format Format of packages. (wheel | sdist | both) │
+ │ [default: wheel] │
+ │ --use-airflow-version Use (reinstall at entry) Airflow version from PyPI. It │
+ │ can also be version (to install from PyPI), `none`, │
+ │ `wheel`, or `sdist` to install from `dist` folder, or │
+ │ VCS URL to install from │
+ │ (https://pip.pypa.io/en/stable/topics/vcs-support/). │
+ │ Implies --mount-sources `remove`. │
+ │ (none | wheel | sdist | <airflow_version>) │
+ │ --use-packages-from-dist Install all found packages ( --package-format determines │
+ │ type) from 'dist' folder when entering breeze. │
+ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
+ â•â”€ Common options ──────────────────────────────────────────────────────────────────────────────────────────────────── ─╮
+ │ --dry-run -D If dry-run is set, commands are only printed, not executed. │
+ │ --verbose -v Print verbose information about performed steps. │
+ │ --help -h Show this message and exit. │
+ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
+
+
+
+
diff --git a/dev/breeze/doc/images/output_testing_core-non-db-tests.txt b/dev/breeze/doc/images/output_testing_core-non-db-tests.txt
new file mode 100644
index 0000000000000..780eecc79e6f7
--- /dev/null
+++ b/dev/breeze/doc/images/output_testing_core-non-db-tests.txt
@@ -0,0 +1 @@
+141e85d62d88461096d9f5c1f0909fdc
diff --git a/dev/breeze/doc/images/output_testing_core-tests.svg b/dev/breeze/doc/images/output_testing_core-tests.svg
new file mode 100644
index 0000000000000..01a95c334c69b
--- /dev/null
+++ b/dev/breeze/doc/images/output_testing_core-tests.svg
@@ -0,0 +1,476 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Command: testing core-tests
+
+
+
+
+
+
+
+
+
+
+ Usage: breeze testing core-tests [ OPTIONS ] [ EXTRA_PYTEST_ARGS ]...
+
+ Run all (default) or specified core unit tests.
+
+ â•â”€ Select test types to run (tests can also be selected by command args individually) ──────────────────────────────── ─╮
+ │ --test-type Type of tests to run for core test group │
+ │ (All | All-Long | All-Quarantined | All-Postgres | All-MySQL | API | Always | CLI │
+ │ | Core | Operators | Other | Serialization | WWW) │
+ │ [default: All] │
+ │ --parallel-test-types Space separated list of core test types used for testing in parallel. │
+ │ (API | Always | CLI | Core | Operators | Other | Serialization | WWW) │
+ │ [default: API Always CLI Core Operators Other Serialization WWW] │
+ │ --excluded-parallel-test-types Space separated list of core test types that will be excluded from parallel tes │
+ │ runs. │
+ │ (API | Always | CLI | Core | Operators | Other | Serialization | WWW) │
+ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
+ â•â”€ Test options ────────────────────────────────────────────────────────────────────────────────────────────────────── ─╮
+ │ --test-timeout Test timeout in seconds. Set the pytest setup, execution and teardown timeouts to this value │
+ │ (INTEGER RANGE) │
+ │ [default: 60; x>=0] │
+ │ --enable-coverage Enable coverage capturing for tests in the form of XML files │
+ │ --collect-only Collect tests only, do not run them. │
+ │ --db-reset -d Reset DB when entering the container. │
+ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
+ â•â”€ Selectively run DB or non-DB tests ──────────────────────────────────────────────────────────────────────────────── ─╮
+ │ --run-db-tests-only Only runs tests that require a database │
+ │ --skip-db-tests Skip tests that require a database │
+ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
+ â•â”€ Test environment ────────────────────────────────────────────────────────────────────────────────────────────────── ─╮
+ │ --backend -b Database backend to use. If 'none' is chosen, Breeze will start with │
+ │ an invalid database configuration, meaning there will be no database │
+ │ available, and any attempts to connect to the Airflow database will │
+ │ fail. │
+ │ (>sqlite< | mysql | postgres | none) │
+ │ [default: sqlite] │
+ │ --no-db-cleanup Do not clear the database before each test module │
+ │ --python -p Python major/minor version used in Airflow image for images. │
+ │ (>3.9< | 3.10 | 3.11 | 3.12) │
+ │ [default: 3.9] │
+ │ --postgres-version -P Version of Postgres used. (>12< | 13 | 14 | 15 | 16 | 17) │
+ │ [default: 12] │
+ │ --mysql-version -M Version of MySQL used. (>8.0< | 8.4) [default: 8.0] │
+ │ --forward-credentials -f Forward local credentials to container when running. │
+ │ --force-sa-warnings / --no-force-sa-warnings Enable `sqlalchemy.exc.MovedIn20Warning` during the tests runs. │
+ │ [default: force-sa-warnings] │
+ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
+ â•â”€ Options for parallel test commands ──────────────────────────────────────────────────────────────────────────────── ─╮
+ │ --run-in-parallel Run the operation in parallel on all or selected subset of parameters. │
+ │ --use-xdist Use xdist plugin for pytest │
+ │ --parallelism Maximum number of processes to use while running the operation in parallel. │
+ │ (INTEGER RANGE) │
+ │ [default: 4; 1<=x<=8] │
+ │ --skip-cleanup Skip cleanup of temporary files created during parallel run. │
+ │ --debug-resources Whether to show resource information while running in parallel. │
+ │ --include-success-outputs Whether to include outputs of successful parallel runs (skipped by default). │
+ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
+ â•â”€ Upgrading/downgrading/removing selected packages ────────────────────────────────────────────────────────────────── ─╮
+ │ --upgrade-boto Remove aiobotocore and upgrade botocore and boto to the latest version. │
+ │ --downgrade-sqlalchemy Downgrade SQLAlchemy to minimum supported version. │
+ │ --downgrade-pendulum Downgrade Pendulum to minimum supported version. │
+ │ --remove-arm-packages Removes arm packages from the image to test if ARM collection works │
+ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
+ â•â”€ Advanced flag for tests command ─────────────────────────────────────────────────────────────────────────────────── ─╮
+ │ --github-repository -g GitHub repository used to pull, push run images. (TEXT) [default: apache/airflow] │
+ │ --image-tag Tag of the image which is used to run the image (implies --mount-sources =skip). │
+ │ (TEXT) │
+ │ [default: latest] │
+ │ --mount-sources Choose scope of local sources that should be mounted, skipped, or removed (default = │
+ │ selected). │
+ │ (selected | all | skip | remove | tests | providers-and-tests) │
+ │ [default: selected] │
+ │ --skip-docker-compose-down Skips running docker-compose down after tests │
+ │ --keep-env-variables Do not clear environment variables that might have side effect while running tests │
+ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
+ â•â”€ Advanced flag for installing airflow in container ───────────────────────────────────────────────────────────────── ─╮
+ │ --airflow-constraints-reference Constraint reference to use for airflow installation │
+ │ (used in calculated constraints URL). │
+ │ (TEXT) │
+ │ --clean-airflow-installation Clean the airflow installation before installing version │
+ │ specified by --use-airflow-version . │
+ │ --force-lowest-dependencies Run tests for the lowest direct dependencies of Airflow │
+ │ or selected provider if `Provider[PROVIDER_ID]` is used │
+ │ as test type. │
+ │ --install-airflow-with-constraints / --no-install-airflow… Install airflow in a separate step, with constraints │
+ │ determined from package or airflow version. │
+ │ [default: no-install-airflow-with-constraints] │
+ │ --package-format Format of packages. (wheel | sdist | both) │
+ │ [default: wheel] │
+ │ --use-airflow-version Use (reinstall at entry) Airflow version from PyPI. It │
+ │ can also be version (to install from PyPI), `none`, │
+ │ `wheel`, or `sdist` to install from `dist` folder, or │
+ │ VCS URL to install from │
+ │ (https://pip.pypa.io/en/stable/topics/vcs-support/). │
+ │ Implies --mount-sources `remove`. │
+ │ (none | wheel | sdist | <airflow_version>) │
+ │ --use-packages-from-dist Install all found packages ( --package-format determines │
+ │ type) from 'dist' folder when entering breeze. │
+ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
+ â•â”€ Common options ──────────────────────────────────────────────────────────────────────────────────────────────────── ─╮
+ │ --dry-run -D If dry-run is set, commands are only printed, not executed. │
+ │ --verbose -v Print verbose information about performed steps. │
+ │ --help -h Show this message and exit. │
+ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
+
+
+
+
diff --git a/dev/breeze/doc/images/output_testing_core-tests.txt b/dev/breeze/doc/images/output_testing_core-tests.txt
new file mode 100644
index 0000000000000..06b070c6ede0c
--- /dev/null
+++ b/dev/breeze/doc/images/output_testing_core-tests.txt
@@ -0,0 +1 @@
+08246b54e85155d59d8a2626cea6e093
diff --git a/dev/breeze/doc/images/output_testing_db-tests.svg b/dev/breeze/doc/images/output_testing_db-tests.svg
deleted file mode 100644
index 708665af52de3..0000000000000
--- a/dev/breeze/doc/images/output_testing_db-tests.svg
+++ /dev/null
@@ -1,520 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Command: testing db-tests
-
-
-
-
-
-
-
-
-
-
- Usage: breeze testing db-tests [ OPTIONS ]
-
- Run all (default) or specified DB-bound unit tests. This is a dedicated command that only runs DB tests and it runs
- them in parallel via splitting tests by test types into separate containers with separate database started for each
- container.
-
- â•â”€ Select tests to run ─────────────────────────────────────────────────────────────────────────────────────────────── ─╮
- │ --parallel-test-types Space separated list of test types used for testing in parallel │
- │ (API | Always | BranchExternalPython | BranchPythonVenv | CLI | Core | │
- │ ExternalPython | Operators | Other | PlainAsserts | Providers | PythonVenv | │
- │ Serialization | WWW) │
- │ [default: API Always BranchExternalPython BranchPythonVenv CLI Core ExternalPython │
- │ Operators Other PlainAsserts Providers[-amazon,google] Providers[amazon] │
- │ Providers[google] PythonVenv Serialization WWW] │
- │ --database-isolation Run airflow in database isolation mode. │
- │ --excluded-parallel-test-types Space separated list of test types that will be excluded from parallel tes runs. │
- │ (API | Always | BranchExternalPython | BranchPythonVenv | CLI | Core | │
- │ ExternalPython | Operators | Other | PlainAsserts | Providers | PythonVenv | │
- │ Serialization | WWW) │
- ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
- â•â”€ Test options ────────────────────────────────────────────────────────────────────────────────────────────────────── ─╮
- │ --test-timeout Test timeout in seconds. Set the pytest setup, execution and teardown timeouts to this │
- │ value │
- │ (INTEGER RANGE) │
- │ [default: 60; x>=0] │
- │ --enable-coverage Enable coverage capturing for tests in the form of XML files │
- │ --collect-only Collect tests only, do not run them. │
- │ --skip-provider-tests Skip provider tests │
- ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
- â•â”€ Test environment ────────────────────────────────────────────────────────────────────────────────────────────────── ─╮
- │ --backend -b Database backend to use. If 'none' is chosen, Breeze will start with │
- │ an invalid database configuration, meaning there will be no database │
- │ available, and any attempts to connect to the Airflow database will │
- │ fail. │
- │ (>sqlite< | mysql | postgres | none) │
- │ [default: sqlite] │
- │ --python -p Python major/minor version used in Airflow image for images. │
- │ (>3.9< | 3.10 | 3.11 | 3.12) │
- │ [default: 3.9] │
- │ --postgres-version -P Version of Postgres used. (>12< | 13 | 14 | 15 | 16 | 17) │
- │ [default: 12] │
- │ --mysql-version -M Version of MySQL used. (>8.0< | 8.4) [default: 8.0] │
- │ --forward-credentials -f Forward local credentials to container when running. │
- │ --force-sa-warnings / --no-force-sa-warnings Enable `sqlalchemy.exc.MovedIn20Warning` during the tests runs. │
- │ [default: force-sa-warnings] │
- ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
- â•â”€ Options for parallel test commands ──────────────────────────────────────────────────────────────────────────────── ─╮
- │ --parallelism Maximum number of processes to use while running the operation in parallel. │
- │ (INTEGER RANGE) │
- │ [default: 4; 1<=x<=8] │
- │ --skip-cleanup Skip cleanup of temporary files created during parallel run. │
- │ --debug-resources Whether to show resource information while running in parallel. │
- │ --include-success-outputs Whether to include outputs of successful parallel runs (skipped by default). │
- ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
- â•â”€ Upgrading/downgrading/removing selected packages ────────────────────────────────────────────────────────────────── ─╮
- │ --upgrade-boto Remove aiobotocore and upgrade botocore and boto to the latest version. │
- │ --downgrade-sqlalchemy Downgrade SQLAlchemy to minimum supported version. │
- │ --downgrade-pendulum Downgrade Pendulum to minimum supported version. │
- │ --remove-arm-packages Removes arm packages from the image to test if ARM collection works │
- ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
- â•â”€ Advanced flag for tests command ─────────────────────────────────────────────────────────────────────────────────── ─╮
- │ --airflow-constraints-reference Constraint reference to use for airflow installation │
- │ (used in calculated constraints URL). │
- │ (TEXT) │
- │ --clean-airflow-installation Clean the airflow installation before installing │
- │ version specified by --use-airflow-version . │
- │ --excluded-providers JSON-string of dictionary containing excluded providers │
- │ per python version ({'3.12': ['provider']}) │
- │ (TEXT) │
- │ --force-lowest-dependencies Run tests for the lowest direct dependencies of Airflow │
- │ or selected provider if `Provider[PROVIDER_ID]` is used │
- │ as test type. │
- │ --github-repository -g GitHub repository used to pull, push run images. (TEXT) │
- │ [default: apache/airflow] │
- │ --image-tag Tag of the image which is used to run the image │
- │ (implies --mount-sources =skip). │
- │ (TEXT) │
- │ [default: latest] │
- │ --install-airflow-with-constraints / --no-install-airflo… Install airflow in a separate step, with constraints │
- │ determined from package or airflow version. │
- │ [default: no-install-airflow-with-constraints] │
- │ --package-format Format of packages. (wheel | sdist | both) │
- │ [default: wheel] │
- │ --providers-constraints-location Location of providers constraints to use (remote URL or │
- │ local context file). │
- │ (TEXT) │
- │ --providers-skip-constraints Do not use constraints when installing providers. │
- │ --use-airflow-version Use (reinstall at entry) Airflow version from PyPI. It │
- │ can also be version (to install from PyPI), `none`, │
- │ `wheel`, or `sdist` to install from `dist` folder, or │
- │ VCS URL to install from │
- │ (https://pip.pypa.io/en/stable/topics/vcs-support/). │
- │ Implies --mount-sources `remove`. │
- │ (none | wheel | sdist | <airflow_version>) │
- │ --use-packages-from-dist Install all found packages ( --package-format determines │
- │ type) from 'dist' folder when entering breeze. │
- │ --mount-sources Choose scope of local sources that should be mounted, │
- │ skipped, or removed (default = selected). │
- │ (selected | all | skip | remove | tests | │
- │ providers-and-tests) │
- │ [default: selected] │
- │ --skip-docker-compose-down Skips running docker-compose down after tests │
- │ --skip-providers Space-separated list of provider ids to skip when │
- │ running tests │
- │ (TEXT) │
- │ --keep-env-variables Do not clear environment variables that might have side │
- │ effect while running tests │
- │ --no-db-cleanup Do not clear the database before each test module │
- ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
- â•â”€ Common options ──────────────────────────────────────────────────────────────────────────────────────────────────── ─╮
- │ --dry-run -D If dry-run is set, commands are only printed, not executed. │
- │ --verbose -v Print verbose information about performed steps. │
- │ --help -h Show this message and exit. │
- ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
-
-
-
-
diff --git a/dev/breeze/doc/images/output_testing_db-tests.txt b/dev/breeze/doc/images/output_testing_db-tests.txt
deleted file mode 100644
index 6027a2d1e666a..0000000000000
--- a/dev/breeze/doc/images/output_testing_db-tests.txt
+++ /dev/null
@@ -1 +0,0 @@
-7b406b63cd4a75aba6ac38b8c0b7431c
diff --git a/dev/breeze/doc/images/output_testing_helm-tests.svg b/dev/breeze/doc/images/output_testing_helm-tests.svg
index 4dc88c1889f83..4fd8f49b122d5 100644
--- a/dev/breeze/doc/images/output_testing_helm-tests.svg
+++ b/dev/breeze/doc/images/output_testing_helm-tests.svg
@@ -1,4 +1,4 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Command: testing integration-core-tests
+
+
+
+
+
+
+
+
+
+
+ Usage: breeze testing integration-core-tests [ OPTIONS ] [ EXTRA_PYTEST_ARGS ]...
+
+ Run the specified integration tests.
+
+ â•â”€ Test options ────────────────────────────────────────────────────────────────────────────────────────────────────── ─╮
+ │ --test-timeout Test timeout in seconds. Set the pytest setup, execution and teardown timeouts to this value │
+ │ (INTEGER RANGE) │
+ │ [default: 60; x>=0] │
+ │ --enable-coverage Enable coverage capturing for tests in the form of XML files │
+ │ --collect-only Collect tests only, do not run them. │
+ │ --db-reset -d Reset DB when entering the container. │
+ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
+ â•â”€ Test environment ────────────────────────────────────────────────────────────────────────────────────────────────── ─╮
+ │ --backend -b Database backend to use. If 'none' is chosen, Breeze will start with │
+ │ an invalid database configuration, meaning there will be no database │
+ │ available, and any attempts to connect to the Airflow database will │
+ │ fail. │
+ │ (>sqlite< | mysql | postgres | none) │
+ │ [default: sqlite] │
+ │ --no-db-cleanup Do not clear the database before each test module │
+ │ --python -p Python major/minor version used in Airflow image for images. │
+ │ (>3.9< | 3.10 | 3.11 | 3.12) │
+ │ [default: 3.9] │
+ │ --postgres-version -P Version of Postgres used. (>12< | 13 | 14 | 15 | 16 | 17) │
+ │ [default: 12] │
+ │ --mysql-version -M Version of MySQL used. (>8.0< | 8.4) [default: 8.0] │
+ │ --forward-credentials -f Forward local credentials to container when running. │
+ │ --force-sa-warnings / --no-force-sa-warnings Enable `sqlalchemy.exc.MovedIn20Warning` during the tests runs. │
+ │ [default: force-sa-warnings] │
+ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
+ â•â”€ Integration tests ───────────────────────────────────────────────────────────────────────────────────────────────── ─╮
+ │ --integration Core Integrations to enable when running (can be more than one). │
+ │ (all | all-testable | celery | kerberos | keycloak | otel | statsd) │
+ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
+ â•â”€ Advanced flag for tests command ─────────────────────────────────────────────────────────────────────────────────── ─╮
+ │ --github-repository -g GitHub repository used to pull, push run images. (TEXT) [default: apache/airflow] │
+ │ --image-tag Tag of the image which is used to run the image (implies --mount-sources =skip). │
+ │ (TEXT) │
+ │ [default: latest] │
+ │ --mount-sources Choose scope of local sources that should be mounted, skipped, or removed (default = │
+ │ selected). │
+ │ (selected | all | skip | remove | tests | providers-and-tests) │
+ │ [default: selected] │
+ │ --skip-docker-compose-down Skips running docker-compose down after tests │
+ │ --keep-env-variables Do not clear environment variables that might have side effect while running tests │
+ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
+ â•â”€ Common options ──────────────────────────────────────────────────────────────────────────────────────────────────── ─╮
+ │ --dry-run -D If dry-run is set, commands are only printed, not executed. │
+ │ --verbose -v Print verbose information about performed steps. │
+ │ --help -h Show this message and exit. │
+ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
+
+
+
+
diff --git a/dev/breeze/doc/images/output_testing_integration-core-tests.txt b/dev/breeze/doc/images/output_testing_integration-core-tests.txt
new file mode 100644
index 0000000000000..a7c48d1f3d6f3
--- /dev/null
+++ b/dev/breeze/doc/images/output_testing_integration-core-tests.txt
@@ -0,0 +1 @@
+62088979e62a456ebbae8a71450cbe96
diff --git a/dev/breeze/doc/images/output_testing_integration-providers-tests.svg b/dev/breeze/doc/images/output_testing_integration-providers-tests.svg
new file mode 100644
index 0000000000000..7becc00ab0326
--- /dev/null
+++ b/dev/breeze/doc/images/output_testing_integration-providers-tests.svg
@@ -0,0 +1,272 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Command: testing integration-providers-tests
+
+
+
+
+
+
+
+
+
+
+ Usage: breeze testing integration-providers-tests [ OPTIONS ] [ EXTRA_PYTEST_ARGS ]...
+
+ Run the specified integration tests.
+
+ â•â”€ Test options ────────────────────────────────────────────────────────────────────────────────────────────────────── ─╮
+ │ --test-timeout Test timeout in seconds. Set the pytest setup, execution and teardown timeouts to this value │
+ │ (INTEGER RANGE) │
+ │ [default: 60; x>=0] │
+ │ --enable-coverage Enable coverage capturing for tests in the form of XML files │
+ │ --collect-only Collect tests only, do not run them. │
+ │ --db-reset -d Reset DB when entering the container. │
+ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
+ â•â”€ Test environment ────────────────────────────────────────────────────────────────────────────────────────────────── ─╮
+ │ --backend -b Database backend to use. If 'none' is chosen, Breeze will start with │
+ │ an invalid database configuration, meaning there will be no database │
+ │ available, and any attempts to connect to the Airflow database will │
+ │ fail. │
+ │ (>sqlite< | mysql | postgres | none) │
+ │ [default: sqlite] │
+ │ --no-db-cleanup Do not clear the database before each test module │
+ │ --python -p Python major/minor version used in Airflow image for images. │
+ │ (>3.9< | 3.10 | 3.11 | 3.12) │
+ │ [default: 3.9] │
+ │ --postgres-version -P Version of Postgres used. (>12< | 13 | 14 | 15 | 16 | 17) │
+ │ [default: 12] │
+ │ --mysql-version -M Version of MySQL used. (>8.0< | 8.4) [default: 8.0] │
+ │ --forward-credentials -f Forward local credentials to container when running. │
+ │ --force-sa-warnings / --no-force-sa-warnings Enable `sqlalchemy.exc.MovedIn20Warning` during the tests runs. │
+ │ [default: force-sa-warnings] │
+ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
+ â•â”€ Integration tests ───────────────────────────────────────────────────────────────────────────────────────────────── ─╮
+ │ --integration Providers Integration(s) to enable when running (can be more than one). │
+ │ (all | all-testable | cassandra | drill | kafka | mongo | mssql | openlineage | pinot | qdrant | │
+ │ redis | trino | ydb) │
+ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
+ â•â”€ Advanced flag for tests command ─────────────────────────────────────────────────────────────────────────────────── ─╮
+ │ --github-repository -g GitHub repository used to pull, push run images. (TEXT) [default: apache/airflow] │
+ │ --image-tag Tag of the image which is used to run the image (implies --mount-sources =skip). │
+ │ (TEXT) │
+ │ [default: latest] │
+ │ --mount-sources Choose scope of local sources that should be mounted, skipped, or removed (default = │
+ │ selected). │
+ │ (selected | all | skip | remove | tests | providers-and-tests) │
+ │ [default: selected] │
+ │ --skip-docker-compose-down Skips running docker-compose down after tests │
+ │ --keep-env-variables Do not clear environment variables that might have side effect while running tests │
+ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
+ â•â”€ Common options ──────────────────────────────────────────────────────────────────────────────────────────────────── ─╮
+ │ --dry-run -D If dry-run is set, commands are only printed, not executed. │
+ │ --verbose -v Print verbose information about performed steps. │
+ │ --help -h Show this message and exit. │
+ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
+
+
+
+
diff --git a/dev/breeze/doc/images/output_testing_integration-providers-tests.txt b/dev/breeze/doc/images/output_testing_integration-providers-tests.txt
new file mode 100644
index 0000000000000..ac32f4c50becd
--- /dev/null
+++ b/dev/breeze/doc/images/output_testing_integration-providers-tests.txt
@@ -0,0 +1 @@
+3450f75363aa39cd5342d7c6747183e1
diff --git a/dev/breeze/doc/images/output_testing_integration-tests.svg b/dev/breeze/doc/images/output_testing_integration-tests.svg
deleted file mode 100644
index 7bac13970e420..0000000000000
--- a/dev/breeze/doc/images/output_testing_integration-tests.svg
+++ /dev/null
@@ -1,256 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Command: testing integration-tests
-
-
-
-
-
-
-
-
-
-
- Usage: breeze testing integration-tests [ OPTIONS ] [ EXTRA_PYTEST_ARGS ]...
-
- Run the specified integration tests.
-
- â•â”€ Test options ────────────────────────────────────────────────────────────────────────────────────────────────────── ─╮
- │ --test-timeout Test timeout in seconds. Set the pytest setup, execution and teardown timeouts to this │
- │ value │
- │ (INTEGER RANGE) │
- │ [default: 60; x>=0] │
- │ --enable-coverage Enable coverage capturing for tests in the form of XML files │
- │ --db-reset -d Reset DB when entering the container. │
- │ --skip-provider-tests Skip provider tests │
- ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
- â•â”€ Test environment ────────────────────────────────────────────────────────────────────────────────────────────────── ─╮
- │ --integration Integration(s) to enable when running (can be more than one). │
- │ (all | all-testable | cassandra | celery | drill | kafka | kerberos │
- │ | keycloak | mongo | mssql | openlineage | otel | pinot | qdrant | │
- │ redis | statsd | trino | ydb) │
- │ --backend -b Database backend to use. If 'none' is chosen, Breeze will start with │
- │ an invalid database configuration, meaning there will be no database │
- │ available, and any attempts to connect to the Airflow database will │
- │ fail. │
- │ (>sqlite< | mysql | postgres | none) │
- │ [default: sqlite] │
- │ --python -p Python major/minor version used in Airflow image for images. │
- │ (>3.9< | 3.10 | 3.11 | 3.12) │
- │ [default: 3.9] │
- │ --postgres-version -P Version of Postgres used. (>12< | 13 | 14 | 15 | 16 | 17) │
- │ [default: 12] │
- │ --mysql-version -M Version of MySQL used. (>8.0< | 8.4) [default: 8.0] │
- │ --forward-credentials -f Forward local credentials to container when running. │
- │ --force-sa-warnings / --no-force-sa-warnings Enable `sqlalchemy.exc.MovedIn20Warning` during the tests runs. │
- │ [default: force-sa-warnings] │
- ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
- â•â”€ Advanced flag for integration tests command ─────────────────────────────────────────────────────────────────────── ─╮
- │ --image-tag Tag of the image which is used to run the image (implies --mount-sources =skip). (TEXT) │
- │ [default: latest] │
- │ --mount-sources Choose scope of local sources that should be mounted, skipped, or removed (default = │
- │ selected). │
- │ (selected | all | skip | remove | tests | providers-and-tests) │
- │ [default: selected] │
- │ --github-repository -g GitHub repository used to pull, push run images. (TEXT) [default: apache/airflow] │
- ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
- â•â”€ Common options ──────────────────────────────────────────────────────────────────────────────────────────────────── ─╮
- │ --dry-run -D If dry-run is set, commands are only printed, not executed. │
- │ --verbose -v Print verbose information about performed steps. │
- │ --help -h Show this message and exit. │
- ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
-
-
-
-
diff --git a/dev/breeze/doc/images/output_testing_integration-tests.txt b/dev/breeze/doc/images/output_testing_integration-tests.txt
deleted file mode 100644
index 3304c7f760204..0000000000000
--- a/dev/breeze/doc/images/output_testing_integration-tests.txt
+++ /dev/null
@@ -1 +0,0 @@
-633eca64e9397259c7400814ce4c2877
diff --git a/dev/breeze/doc/images/output_testing_non-db-tests.svg b/dev/breeze/doc/images/output_testing_non-db-tests.svg
deleted file mode 100644
index da43621dd6931..0000000000000
--- a/dev/breeze/doc/images/output_testing_non-db-tests.svg
+++ /dev/null
@@ -1,476 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Command: testing non-db-tests
-
-
-
-
-
-
-
-
-
-
- Usage: breeze testing non-db-tests [ OPTIONS ]
-
- Run all (default) or specified Non-DB unit tests. This is a dedicated command that only runs Non-DB tests and it runs
- them in parallel via pytest-xdist in single container, with `none` backend set.
-
- â•â”€ Select test types to run ────────────────────────────────────────────────────────────────────────────────────────── ─╮
- │ --parallel-test-types Space separated list of test types used for testing in parallel │
- │ (API | Always | BranchExternalPython | BranchPythonVenv | CLI | Core | │
- │ ExternalPython | Operators | Other | PlainAsserts | Providers | PythonVenv | │
- │ Serialization | WWW) │
- │ [default: API Always BranchExternalPython BranchPythonVenv CLI Core ExternalPython │
- │ Operators Other PlainAsserts Providers[-amazon,google] Providers[amazon] │
- │ Providers[google] PythonVenv Serialization WWW] │
- │ --excluded-parallel-test-types Space separated list of test types that will be excluded from parallel tes runs. │
- │ (API | Always | BranchExternalPython | BranchPythonVenv | CLI | Core | │
- │ ExternalPython | Operators | Other | PlainAsserts | Providers | PythonVenv | │
- │ Serialization | WWW) │
- ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
- â•â”€ Test options ────────────────────────────────────────────────────────────────────────────────────────────────────── ─╮
- │ --test-timeout Test timeout in seconds. Set the pytest setup, execution and teardown timeouts to this │
- │ value │
- │ (INTEGER RANGE) │
- │ [default: 60; x>=0] │
- │ --enable-coverage Enable coverage capturing for tests in the form of XML files │
- │ --collect-only Collect tests only, do not run them. │
- │ --skip-provider-tests Skip provider tests │
- ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
- â•â”€ Test environment ────────────────────────────────────────────────────────────────────────────────────────────────── ─╮
- │ --python -p Python major/minor version used in Airflow image for images. │
- │ (>3.9< | 3.10 | 3.11 | 3.12) │
- │ [default: 3.9] │
- │ --forward-credentials -f Forward local credentials to container when running. │
- │ --force-sa-warnings / --no-force-sa-warnings Enable `sqlalchemy.exc.MovedIn20Warning` during the tests runs. │
- │ [default: force-sa-warnings] │
- ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
- â•â”€ Options for parallel test commands ──────────────────────────────────────────────────────────────────────────────── ─╮
- │ --parallelism Maximum number of processes to use while running the operation in parallel. │
- │ (INTEGER RANGE) │
- │ [default: 4; 1<=x<=8] │
- │ --skip-cleanup Skip cleanup of temporary files created during parallel run. │
- │ --debug-resources Whether to show resource information while running in parallel. │
- │ --include-success-outputs Whether to include outputs of successful parallel runs (skipped by default). │
- ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
- â•â”€ Upgrading/downgrading/removing selected packages ────────────────────────────────────────────────────────────────── ─╮
- │ --upgrade-boto Remove aiobotocore and upgrade botocore and boto to the latest version. │
- │ --downgrade-sqlalchemy Downgrade SQLAlchemy to minimum supported version. │
- │ --downgrade-pendulum Downgrade Pendulum to minimum supported version. │
- │ --remove-arm-packages Removes arm packages from the image to test if ARM collection works │
- ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
- â•â”€ Advanced flag for tests command ─────────────────────────────────────────────────────────────────────────────────── ─╮
- │ --airflow-constraints-reference Constraint reference to use for airflow installation │
- │ (used in calculated constraints URL). │
- │ (TEXT) │
- │ --clean-airflow-installation Clean the airflow installation before installing │
- │ version specified by --use-airflow-version . │
- │ --excluded-providers JSON-string of dictionary containing excluded providers │
- │ per python version ({'3.12': ['provider']}) │
- │ (TEXT) │
- │ --force-lowest-dependencies Run tests for the lowest direct dependencies of Airflow │
- │ or selected provider if `Provider[PROVIDER_ID]` is used │
- │ as test type. │
- │ --github-repository -g GitHub repository used to pull, push run images. (TEXT) │
- │ [default: apache/airflow] │
- │ --image-tag Tag of the image which is used to run the image │
- │ (implies --mount-sources =skip). │
- │ (TEXT) │
- │ [default: latest] │
- │ --install-airflow-with-constraints / --no-install-airflo… Install airflow in a separate step, with constraints │
- │ determined from package or airflow version. │
- │ [default: no-install-airflow-with-constraints] │
- │ --package-format Format of packages. (wheel | sdist | both) │
- │ [default: wheel] │
- │ --providers-constraints-location Location of providers constraints to use (remote URL or │
- │ local context file). │
- │ (TEXT) │
- │ --providers-skip-constraints Do not use constraints when installing providers. │
- │ --use-airflow-version Use (reinstall at entry) Airflow version from PyPI. It │
- │ can also be version (to install from PyPI), `none`, │
- │ `wheel`, or `sdist` to install from `dist` folder, or │
- │ VCS URL to install from │
- │ (https://pip.pypa.io/en/stable/topics/vcs-support/). │
- │ Implies --mount-sources `remove`. │
- │ (none | wheel | sdist | <airflow_version>) │
- │ --use-packages-from-dist Install all found packages ( --package-format determines │
- │ type) from 'dist' folder when entering breeze. │
- │ --mount-sources Choose scope of local sources that should be mounted, │
- │ skipped, or removed (default = selected). │
- │ (selected | all | skip | remove | tests | │
- │ providers-and-tests) │
- │ [default: selected] │
- │ --skip-docker-compose-down Skips running docker-compose down after tests │
- │ --skip-providers Space-separated list of provider ids to skip when │
- │ running tests │
- │ (TEXT) │
- │ --keep-env-variables Do not clear environment variables that might have side │
- │ effect while running tests │
- │ --no-db-cleanup Do not clear the database before each test module │
- ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
- â•â”€ Common options ──────────────────────────────────────────────────────────────────────────────────────────────────── ─╮
- │ --dry-run -D If dry-run is set, commands are only printed, not executed. │
- │ --verbose -v Print verbose information about performed steps. │
- │ --help -h Show this message and exit. │
- ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
-
-
-
-
diff --git a/dev/breeze/doc/images/output_testing_non-db-tests.txt b/dev/breeze/doc/images/output_testing_non-db-tests.txt
deleted file mode 100644
index 1080b5a377717..0000000000000
--- a/dev/breeze/doc/images/output_testing_non-db-tests.txt
+++ /dev/null
@@ -1 +0,0 @@
-2cc222da8b9f31b93b527220b76b48a2
diff --git a/dev/breeze/doc/images/output_testing_providers-db-tests.svg b/dev/breeze/doc/images/output_testing_providers-db-tests.svg
new file mode 100644
index 0000000000000..9a8fbb54a51f2
--- /dev/null
+++ b/dev/breeze/doc/images/output_testing_providers-db-tests.svg
@@ -0,0 +1,488 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Command: testing providers-db-tests
+
+
+
+
+
+
+
+
+
+
+ Usage: breeze testing providers-db-tests [ OPTIONS ]
+
+ Run all (default) or specified Providers DB-bound unit tests.
+
+ â•â”€ Select tests to run ─────────────────────────────────────────────────────────────────────────────────────────────── ─╮
+ │ --parallel-test-types Space separated list of provider test types used for testing in parallel. You can │
+ │ also optionally specify tests of which providers should be run: │
+ │ `Providers[airbyte,http]`. │
+ │ (TEXT) │
+ │ --excluded-parallel-test-types Space separated list of provider test types that will be excluded from parallel │
+ │ tes runs. You can for example `Providers[airbyte,http]`. │
+ │ (TEXT) │
+ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
+ â•â”€ Test options ────────────────────────────────────────────────────────────────────────────────────────────────────── ─╮
+ │ --test-timeout Test timeout in seconds. Set the pytest setup, execution and teardown timeouts to this value │
+ │ (INTEGER RANGE) │
+ │ [default: 60; x>=0] │
+ │ --enable-coverage Enable coverage capturing for tests in the form of XML files │
+ │ --collect-only Collect tests only, do not run them. │
+ │ --db-reset -d Reset DB when entering the container. │
+ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
+ â•â”€ Test environment ────────────────────────────────────────────────────────────────────────────────────────────────── ─╮
+ │ --backend -b Database backend to use. If 'none' is chosen, Breeze will start with │
+ │ an invalid database configuration, meaning there will be no database │
+ │ available, and any attempts to connect to the Airflow database will │
+ │ fail. │
+ │ (>sqlite< | mysql | postgres | none) │
+ │ [default: sqlite] │
+ │ --no-db-cleanup Do not clear the database before each test module │
+ │ --python -p Python major/minor version used in Airflow image for images. │
+ │ (>3.9< | 3.10 | 3.11 | 3.12) │
+ │ [default: 3.9] │
+ │ --postgres-version -P Version of Postgres used. (>12< | 13 | 14 | 15 | 16 | 17) │
+ │ [default: 12] │
+ │ --mysql-version -M Version of MySQL used. (>8.0< | 8.4) [default: 8.0] │
+ │ --forward-credentials -f Forward local credentials to container when running. │
+ │ --force-sa-warnings / --no-force-sa-warnings Enable `sqlalchemy.exc.MovedIn20Warning` during the tests runs. │
+ │ [default: force-sa-warnings] │
+ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
+ â•â”€ Options for parallel test commands ──────────────────────────────────────────────────────────────────────────────── ─╮
+ │ --parallelism Maximum number of processes to use while running the operation in parallel. │
+ │ (INTEGER RANGE) │
+ │ [default: 4; 1<=x<=8] │
+ │ --skip-cleanup Skip cleanup of temporary files created during parallel run. │
+ │ --debug-resources Whether to show resource information while running in parallel. │
+ │ --include-success-outputs Whether to include outputs of successful parallel runs (skipped by default). │
+ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
+ â•â”€ Upgrading/downgrading/removing selected packages ────────────────────────────────────────────────────────────────── ─╮
+ │ --upgrade-boto Remove aiobotocore and upgrade botocore and boto to the latest version. │
+ │ --downgrade-sqlalchemy Downgrade SQLAlchemy to minimum supported version. │
+ │ --downgrade-pendulum Downgrade Pendulum to minimum supported version. │
+ │ --remove-arm-packages Removes arm packages from the image to test if ARM collection works │
+ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
+ â•â”€ DB isolation tests ──────────────────────────────────────────────────────────────────────────────────────────────── ─╮
+ │ --database-isolation Run airflow in database isolation mode. │
+ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
+ â•â”€ Advanced flag for tests command ─────────────────────────────────────────────────────────────────────────────────── ─╮
+ │ --github-repository -g GitHub repository used to pull, push run images. (TEXT) [default: apache/airflow] │
+ │ --image-tag Tag of the image which is used to run the image (implies --mount-sources =skip). │
+ │ (TEXT) │
+ │ [default: latest] │
+ │ --mount-sources Choose scope of local sources that should be mounted, skipped, or removed (default = │
+ │ selected). │
+ │ (selected | all | skip | remove | tests | providers-and-tests) │
+ │ [default: selected] │
+ │ --skip-docker-compose-down Skips running docker-compose down after tests │
+ │ --keep-env-variables Do not clear environment variables that might have side effect while running tests │
+ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
+ â•â”€ Advanced flag for installing airflow in container ───────────────────────────────────────────────────────────────── ─╮
+ │ --airflow-constraints-reference Constraint reference to use for airflow installation │
+ │ (used in calculated constraints URL). │
+ │ (TEXT) │
+ │ --clean-airflow-installation Clean the airflow installation before installing version │
+ │ specified by --use-airflow-version . │
+ │ --force-lowest-dependencies Run tests for the lowest direct dependencies of Airflow │
+ │ or selected provider if `Provider[PROVIDER_ID]` is used │
+ │ as test type. │
+ │ --install-airflow-with-constraints / --no-install-airflow… Install airflow in a separate step, with constraints │
+ │ determined from package or airflow version. │
+ │ [default: no-install-airflow-with-constraints] │
+ │ --package-format Format of packages. (wheel | sdist | both) │
+ │ [default: wheel] │
+ │ --use-airflow-version Use (reinstall at entry) Airflow version from PyPI. It │
+ │ can also be version (to install from PyPI), `none`, │
+ │ `wheel`, or `sdist` to install from `dist` folder, or │
+ │ VCS URL to install from │
+ │ (https://pip.pypa.io/en/stable/topics/vcs-support/). │
+ │ Implies --mount-sources `remove`. │
+ │ (none | wheel | sdist | <airflow_version>) │
+ │ --use-packages-from-dist Install all found packages ( --package-format determines │
+ │ type) from 'dist' folder when entering breeze. │
+ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
+ â•â”€ Advanced flag for provider tests command ────────────────────────────────────────────────────────────────────────── ─╮
+ │ --excluded-providers JSON-string of dictionary containing excluded providers per python version │
+ │ ({'3.12': ['provider']}) │
+ │ (TEXT) │
+ │ --providers-constraints-location Location of providers constraints to use (remote URL or local context file). │
+ │ (TEXT) │
+ │ --providers-skip-constraints Do not use constraints when installing providers. │
+ │ --skip-providers Space-separated list of provider ids to skip when running tests (TEXT) │
+ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
+ â•â”€ Common options ──────────────────────────────────────────────────────────────────────────────────────────────────── ─╮
+ │ --dry-run -D If dry-run is set, commands are only printed, not executed. │
+ │ --verbose -v Print verbose information about performed steps. │
+ │ --help -h Show this message and exit. │
+ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
+
+
+
+
diff --git a/dev/breeze/doc/images/output_testing_providers-db-tests.txt b/dev/breeze/doc/images/output_testing_providers-db-tests.txt
new file mode 100644
index 0000000000000..4bec1a12b897a
--- /dev/null
+++ b/dev/breeze/doc/images/output_testing_providers-db-tests.txt
@@ -0,0 +1 @@
+c1ad05eec0e258c1a2c6d97b6d490779
diff --git a/dev/breeze/doc/images/output_testing_providers-non-db-tests.svg b/dev/breeze/doc/images/output_testing_providers-non-db-tests.svg
new file mode 100644
index 0000000000000..2aa1c0210434e
--- /dev/null
+++ b/dev/breeze/doc/images/output_testing_providers-non-db-tests.svg
@@ -0,0 +1,432 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Command: testing providers-non-db-tests
+
+
+
+
+
+
+
+
+
+
+ Usage: breeze testing providers-non-db-tests [ OPTIONS ]
+
+ Run all (default) or specified Providers non-db bound unit tests.
+
+ â•â”€ Select test types to run ────────────────────────────────────────────────────────────────────────────────────────── ─╮
+ │ --parallel-test-types Space separated list of provider test types used for testing in parallel. You can │
+ │ also optionally specify tests of which providers should be run: │
+ │ `Providers[airbyte,http]`. │
+ │ (TEXT) │
+ │ --excluded-parallel-test-types Space separated list of provider test types that will be excluded from parallel │
+ │ tes runs. You can for example `Providers[airbyte,http]`. │
+ │ (TEXT) │
+ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
+ â•â”€ Test options ────────────────────────────────────────────────────────────────────────────────────────────────────── ─╮
+ │ --test-timeout Test timeout in seconds. Set the pytest setup, execution and teardown timeouts to this value │
+ │ (INTEGER RANGE) │
+ │ [default: 60; x>=0] │
+ │ --enable-coverage Enable coverage capturing for tests in the form of XML files │
+ │ --collect-only Collect tests only, do not run them. │
+ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
+ â•â”€ Test environment ────────────────────────────────────────────────────────────────────────────────────────────────── ─╮
+ │ --python -p Python major/minor version used in Airflow image for images. │
+ │ (>3.9< | 3.10 | 3.11 | 3.12) │
+ │ [default: 3.9] │
+ │ --forward-credentials -f Forward local credentials to container when running. │
+ │ --force-sa-warnings / --no-force-sa-warnings Enable `sqlalchemy.exc.MovedIn20Warning` during the tests runs. │
+ │ [default: force-sa-warnings] │
+ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
+ â•â”€ Options for parallel test commands ──────────────────────────────────────────────────────────────────────────────── ─╮
+ │ --parallelism Maximum number of processes to use while running the operation in parallel. │
+ │ (INTEGER RANGE) │
+ │ [default: 4; 1<=x<=8] │
+ │ --skip-cleanup Skip cleanup of temporary files created during parallel run. │
+ │ --debug-resources Whether to show resource information while running in parallel. │
+ │ --include-success-outputs Whether to include outputs of successful parallel runs (skipped by default). │
+ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
+ â•â”€ Upgrading/downgrading/removing selected packages ────────────────────────────────────────────────────────────────── ─╮
+ │ --upgrade-boto Remove aiobotocore and upgrade botocore and boto to the latest version. │
+ │ --downgrade-sqlalchemy Downgrade SQLAlchemy to minimum supported version. │
+ │ --downgrade-pendulum Downgrade Pendulum to minimum supported version. │
+ │ --remove-arm-packages Removes arm packages from the image to test if ARM collection works │
+ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
+ â•â”€ Advanced flag for tests command ─────────────────────────────────────────────────────────────────────────────────── ─╮
+ │ --github-repository -g GitHub repository used to pull, push run images. (TEXT) [default: apache/airflow] │
+ │ --image-tag Tag of the image which is used to run the image (implies --mount-sources =skip). │
+ │ (TEXT) │
+ │ [default: latest] │
+ │ --mount-sources Choose scope of local sources that should be mounted, skipped, or removed (default = │
+ │ selected). │
+ │ (selected | all | skip | remove | tests | providers-and-tests) │
+ │ [default: selected] │
+ │ --skip-docker-compose-down Skips running docker-compose down after tests │
+ │ --keep-env-variables Do not clear environment variables that might have side effect while running tests │
+ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
+ â•â”€ Advanced flag for installing airflow in container ───────────────────────────────────────────────────────────────── ─╮
+ │ --airflow-constraints-reference Constraint reference to use for airflow installation │
+ │ (used in calculated constraints URL). │
+ │ (TEXT) │
+ │ --clean-airflow-installation Clean the airflow installation before installing version │
+ │ specified by --use-airflow-version . │
+ │ --force-lowest-dependencies Run tests for the lowest direct dependencies of Airflow │
+ │ or selected provider if `Provider[PROVIDER_ID]` is used │
+ │ as test type. │
+ │ --install-airflow-with-constraints / --no-install-airflow… Install airflow in a separate step, with constraints │
+ │ determined from package or airflow version. │
+ │ [default: no-install-airflow-with-constraints] │
+ │ --package-format Format of packages. (wheel | sdist | both) │
+ │ [default: wheel] │
+ │ --use-airflow-version Use (reinstall at entry) Airflow version from PyPI. It │
+ │ can also be version (to install from PyPI), `none`, │
+ │ `wheel`, or `sdist` to install from `dist` folder, or │
+ │ VCS URL to install from │
+ │ (https://pip.pypa.io/en/stable/topics/vcs-support/). │
+ │ Implies --mount-sources `remove`. │
+ │ (none | wheel | sdist | <airflow_version>) │
+ │ --use-packages-from-dist Install all found packages ( --package-format determines │
+ │ type) from 'dist' folder when entering breeze. │
+ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
+ â•â”€ Advanced flag for provider tests command ────────────────────────────────────────────────────────────────────────── ─╮
+ │ --excluded-providers JSON-string of dictionary containing excluded providers per python version │
+ │ ({'3.12': ['provider']}) │
+ │ (TEXT) │
+ │ --providers-constraints-location Location of providers constraints to use (remote URL or local context file). │
+ │ (TEXT) │
+ │ --providers-skip-constraints Do not use constraints when installing providers. │
+ │ --skip-providers Space-separated list of provider ids to skip when running tests (TEXT) │
+ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
+ â•â”€ Common options ──────────────────────────────────────────────────────────────────────────────────────────────────── ─╮
+ │ --dry-run -D If dry-run is set, commands are only printed, not executed. │
+ │ --verbose -v Print verbose information about performed steps. │
+ │ --help -h Show this message and exit. │
+ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
+
+
+
+
diff --git a/dev/breeze/doc/images/output_testing_providers-non-db-tests.txt b/dev/breeze/doc/images/output_testing_providers-non-db-tests.txt
new file mode 100644
index 0000000000000..88c0f42cb587e
--- /dev/null
+++ b/dev/breeze/doc/images/output_testing_providers-non-db-tests.txt
@@ -0,0 +1 @@
+c0e052c7334ae69298f323db51f46b50
diff --git a/dev/breeze/doc/images/output_testing_providers-tests.svg b/dev/breeze/doc/images/output_testing_providers-tests.svg
new file mode 100644
index 0000000000000..e9818a223e75c
--- /dev/null
+++ b/dev/breeze/doc/images/output_testing_providers-tests.svg
@@ -0,0 +1,532 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Command: testing providers-tests
+
+
+
+
+
+
+
+
+
+
+ Usage: breeze testing providers-tests [ OPTIONS ] [ EXTRA_PYTEST_ARGS ]...
+
+ Run all (default) or specified Providers unit tests.
+
+ â•â”€ Select test types to run (tests can also be selected by command args individually) ──────────────────────────────── ─╮
+ │ --test-type Type of test to run. You can also optionally specify tests of which providers │
+ │ should be run: `Providers[airbyte,http]` or excluded from the full test suite: │
+ │ `Providers[ -amazon ,google]` │
+ │ (All | All-Long | All-Quarantined | All-Postgres | All-MySQL) │
+ │ [default: All] │
+ │ --parallel-test-types Space separated list of provider test types used for testing in parallel. You can │
+ │ also optionally specify tests of which providers should be run: │
+ │ `Providers[airbyte,http]`. │
+ │ (TEXT) │
+ │ --excluded-parallel-test-types Space separated list of provider test types that will be excluded from parallel │
+ │ tes runs. You can for example `Providers[airbyte,http]`. │
+ │ (TEXT) │
+ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
+ â•â”€ Test options ────────────────────────────────────────────────────────────────────────────────────────────────────── ─╮
+ │ --test-timeout Test timeout in seconds. Set the pytest setup, execution and teardown timeouts to this value │
+ │ (INTEGER RANGE) │
+ │ [default: 60; x>=0] │
+ │ --enable-coverage Enable coverage capturing for tests in the form of XML files │
+ │ --collect-only Collect tests only, do not run them. │
+ │ --db-reset -d Reset DB when entering the container. │
+ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
+ â•â”€ Selectively run DB or non-DB tests ──────────────────────────────────────────────────────────────────────────────── ─╮
+ │ --run-db-tests-only Only runs tests that require a database │
+ │ --skip-db-tests Skip tests that require a database │
+ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
+ â•â”€ Test environment ────────────────────────────────────────────────────────────────────────────────────────────────── ─╮
+ │ --backend -b Database backend to use. If 'none' is chosen, Breeze will start with │
+ │ an invalid database configuration, meaning there will be no database │
+ │ available, and any attempts to connect to the Airflow database will │
+ │ fail. │
+ │ (>sqlite< | mysql | postgres | none) │
+ │ [default: sqlite] │
+ │ --no-db-cleanup Do not clear the database before each test module │
+ │ --python -p Python major/minor version used in Airflow image for images. │
+ │ (>3.9< | 3.10 | 3.11 | 3.12) │
+ │ [default: 3.9] │
+ │ --postgres-version -P Version of Postgres used. (>12< | 13 | 14 | 15 | 16 | 17) │
+ │ [default: 12] │
+ │ --mysql-version -M Version of MySQL used. (>8.0< | 8.4) [default: 8.0] │
+ │ --forward-credentials -f Forward local credentials to container when running. │
+ │ --force-sa-warnings / --no-force-sa-warnings Enable `sqlalchemy.exc.MovedIn20Warning` during the tests runs. │
+ │ [default: force-sa-warnings] │
+ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
+ â•â”€ Options for parallel test commands ──────────────────────────────────────────────────────────────────────────────── ─╮
+ │ --run-in-parallel Run the operation in parallel on all or selected subset of parameters. │
+ │ --use-xdist Use xdist plugin for pytest │
+ │ --parallelism Maximum number of processes to use while running the operation in parallel. │
+ │ (INTEGER RANGE) │
+ │ [default: 4; 1<=x<=8] │
+ │ --skip-cleanup Skip cleanup of temporary files created during parallel run. │
+ │ --debug-resources Whether to show resource information while running in parallel. │
+ │ --include-success-outputs Whether to include outputs of successful parallel runs (skipped by default). │
+ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
+ â•â”€ Upgrading/downgrading/removing selected packages ────────────────────────────────────────────────────────────────── ─╮
+ │ --upgrade-boto Remove aiobotocore and upgrade botocore and boto to the latest version. │
+ │ --downgrade-sqlalchemy Downgrade SQLAlchemy to minimum supported version. │
+ │ --downgrade-pendulum Downgrade Pendulum to minimum supported version. │
+ │ --remove-arm-packages Removes arm packages from the image to test if ARM collection works │
+ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
+ â•â”€ DB isolation tests ──────────────────────────────────────────────────────────────────────────────────────────────── ─╮
+ │ --database-isolation Run airflow in database isolation mode. │
+ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
+ â•â”€ Advanced flag for tests command ─────────────────────────────────────────────────────────────────────────────────── ─╮
+ │ --github-repository -g GitHub repository used to pull, push run images. (TEXT) [default: apache/airflow] │
+ │ --image-tag Tag of the image which is used to run the image (implies --mount-sources =skip). │
+ │ (TEXT) │
+ │ [default: latest] │
+ │ --mount-sources Choose scope of local sources that should be mounted, skipped, or removed (default = │
+ │ selected). │
+ │ (selected | all | skip | remove | tests | providers-and-tests) │
+ │ [default: selected] │
+ │ --skip-docker-compose-down Skips running docker-compose down after tests │
+ │ --keep-env-variables Do not clear environment variables that might have side effect while running tests │
+ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
+ â•â”€ Advanced flag for installing airflow in container ───────────────────────────────────────────────────────────────── ─╮
+ │ --airflow-constraints-reference Constraint reference to use for airflow installation │
+ │ (used in calculated constraints URL). │
+ │ (TEXT) │
+ │ --clean-airflow-installation Clean the airflow installation before installing version │
+ │ specified by --use-airflow-version . │
+ │ --force-lowest-dependencies Run tests for the lowest direct dependencies of Airflow │
+ │ or selected provider if `Provider[PROVIDER_ID]` is used │
+ │ as test type. │
+ │ --install-airflow-with-constraints / --no-install-airflow… Install airflow in a separate step, with constraints │
+ │ determined from package or airflow version. │
+ │ [default: no-install-airflow-with-constraints] │
+ │ --package-format Format of packages. (wheel | sdist | both) │
+ │ [default: wheel] │
+ │ --use-airflow-version Use (reinstall at entry) Airflow version from PyPI. It │
+ │ can also be version (to install from PyPI), `none`, │
+ │ `wheel`, or `sdist` to install from `dist` folder, or │
+ │ VCS URL to install from │
+ │ (https://pip.pypa.io/en/stable/topics/vcs-support/). │
+ │ Implies --mount-sources `remove`. │
+ │ (none | wheel | sdist | <airflow_version>) │
+ │ --use-packages-from-dist Install all found packages ( --package-format determines │
+ │ type) from 'dist' folder when entering breeze. │
+ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
+ â•â”€ Advanced flag for provider tests command ────────────────────────────────────────────────────────────────────────── ─╮
+ │ --excluded-providers JSON-string of dictionary containing excluded providers per python version │
+ │ ({'3.12': ['provider']}) │
+ │ (TEXT) │
+ │ --providers-constraints-location Location of providers constraints to use (remote URL or local context file). │
+ │ (TEXT) │
+ │ --providers-skip-constraints Do not use constraints when installing providers. │
+ │ --skip-providers Space-separated list of provider ids to skip when running tests (TEXT) │
+ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
+ â•â”€ Common options ──────────────────────────────────────────────────────────────────────────────────────────────────── ─╮
+ │ --dry-run -D If dry-run is set, commands are only printed, not executed. │
+ │ --verbose -v Print verbose information about performed steps. │
+ │ --help -h Show this message and exit. │
+ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
+
+
+
+
diff --git a/dev/breeze/doc/images/output_testing_providers-tests.txt b/dev/breeze/doc/images/output_testing_providers-tests.txt
new file mode 100644
index 0000000000000..d55132aa37124
--- /dev/null
+++ b/dev/breeze/doc/images/output_testing_providers-tests.txt
@@ -0,0 +1 @@
+52adde67bdd7a3a4c9c62eaa941bd317
diff --git a/dev/breeze/doc/images/output_testing_system-core-tests.svg b/dev/breeze/doc/images/output_testing_system-core-tests.svg
new file mode 100644
index 0000000000000..0798e35a15b2f
--- /dev/null
+++ b/dev/breeze/doc/images/output_testing_system-core-tests.svg
@@ -0,0 +1,252 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Command: testing system-core-tests
+
+
+
+
+
+
+
+
+
+
+ Usage: breeze testing system-core-tests [ OPTIONS ] [ EXTRA_PYTEST_ARGS ]...
+
+ Run the specified system core tests.
+
+ â•â”€ Test options ────────────────────────────────────────────────────────────────────────────────────────────────────── ─╮
+ │ --test-timeout Test timeout in seconds. Set the pytest setup, execution and teardown timeouts to this value │
+ │ (INTEGER RANGE) │
+ │ [default: 60; x>=0] │
+ │ --enable-coverage Enable coverage capturing for tests in the form of XML files │
+ │ --collect-only Collect tests only, do not run them. │
+ │ --db-reset -d Reset DB when entering the container. │
+ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
+ â•â”€ Test environment ────────────────────────────────────────────────────────────────────────────────────────────────── ─╮
+ │ --backend -b Database backend to use. If 'none' is chosen, Breeze will start with │
+ │ an invalid database configuration, meaning there will be no database │
+ │ available, and any attempts to connect to the Airflow database will │
+ │ fail. │
+ │ (>sqlite< | mysql | postgres | none) │
+ │ [default: sqlite] │
+ │ --no-db-cleanup Do not clear the database before each test module │
+ │ --python -p Python major/minor version used in Airflow image for images. │
+ │ (>3.9< | 3.10 | 3.11 | 3.12) │
+ │ [default: 3.9] │
+ │ --postgres-version -P Version of Postgres used. (>12< | 13 | 14 | 15 | 16 | 17) │
+ │ [default: 12] │
+ │ --mysql-version -M Version of MySQL used. (>8.0< | 8.4) [default: 8.0] │
+ │ --forward-credentials -f Forward local credentials to container when running. │
+ │ --force-sa-warnings / --no-force-sa-warnings Enable `sqlalchemy.exc.MovedIn20Warning` during the tests runs. │
+ │ [default: force-sa-warnings] │
+ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
+ â•â”€ Advanced flag for tests command ─────────────────────────────────────────────────────────────────────────────────── ─╮
+ │ --github-repository -g GitHub repository used to pull, push run images. (TEXT) [default: apache/airflow] │
+ │ --image-tag Tag of the image which is used to run the image (implies --mount-sources =skip). │
+ │ (TEXT) │
+ │ [default: latest] │
+ │ --mount-sources Choose scope of local sources that should be mounted, skipped, or removed (default = │
+ │ selected). │
+ │ (selected | all | skip | remove | tests | providers-and-tests) │
+ │ [default: selected] │
+ │ --skip-docker-compose-down Skips running docker-compose down after tests │
+ │ --keep-env-variables Do not clear environment variables that might have side effect while running tests │
+ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
+ â•â”€ Common options ──────────────────────────────────────────────────────────────────────────────────────────────────── ─╮
+ │ --dry-run -D If dry-run is set, commands are only printed, not executed. │
+ │ --verbose -v Print verbose information about performed steps. │
+ │ --help -h Show this message and exit. │
+ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
+
+
+
+
diff --git a/dev/breeze/doc/images/output_testing_system-core-tests.txt b/dev/breeze/doc/images/output_testing_system-core-tests.txt
new file mode 100644
index 0000000000000..8b476e43246ae
--- /dev/null
+++ b/dev/breeze/doc/images/output_testing_system-core-tests.txt
@@ -0,0 +1 @@
+1692ce33df0d64f42f903c7ef04fb5db
diff --git a/dev/breeze/doc/images/output_testing_system-providers-tests.svg b/dev/breeze/doc/images/output_testing_system-providers-tests.svg
new file mode 100644
index 0000000000000..7f2a7c21d443d
--- /dev/null
+++ b/dev/breeze/doc/images/output_testing_system-providers-tests.svg
@@ -0,0 +1,252 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Command: testing system-providers-tests
+
+
+
+
+
+
+
+
+
+
+ Usage: breeze testing system-providers-tests [ OPTIONS ] [ EXTRA_PYTEST_ARGS ]...
+
+ Run the specified system providers tests.
+
+ â•â”€ Test options ────────────────────────────────────────────────────────────────────────────────────────────────────── ─╮
+ │ --test-timeout Test timeout in seconds. Set the pytest setup, execution and teardown timeouts to this value │
+ │ (INTEGER RANGE) │
+ │ [default: 60; x>=0] │
+ │ --enable-coverage Enable coverage capturing for tests in the form of XML files │
+ │ --collect-only Collect tests only, do not run them. │
+ │ --db-reset -d Reset DB when entering the container. │
+ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
+ â•â”€ Test environment ────────────────────────────────────────────────────────────────────────────────────────────────── ─╮
+ │ --backend -b Database backend to use. If 'none' is chosen, Breeze will start with │
+ │ an invalid database configuration, meaning there will be no database │
+ │ available, and any attempts to connect to the Airflow database will │
+ │ fail. │
+ │ (>sqlite< | mysql | postgres | none) │
+ │ [default: sqlite] │
+ │ --no-db-cleanup Do not clear the database before each test module │
+ │ --python -p Python major/minor version used in Airflow image for images. │
+ │ (>3.9< | 3.10 | 3.11 | 3.12) │
+ │ [default: 3.9] │
+ │ --postgres-version -P Version of Postgres used. (>12< | 13 | 14 | 15 | 16 | 17) │
+ │ [default: 12] │
+ │ --mysql-version -M Version of MySQL used. (>8.0< | 8.4) [default: 8.0] │
+ │ --forward-credentials -f Forward local credentials to container when running. │
+ │ --force-sa-warnings / --no-force-sa-warnings Enable `sqlalchemy.exc.MovedIn20Warning` during the tests runs. │
+ │ [default: force-sa-warnings] │
+ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
+ â•â”€ Advanced flag for tests command ─────────────────────────────────────────────────────────────────────────────────── ─╮
+ │ --github-repository -g GitHub repository used to pull, push run images. (TEXT) [default: apache/airflow] │
+ │ --image-tag Tag of the image which is used to run the image (implies --mount-sources =skip). │
+ │ (TEXT) │
+ │ [default: latest] │
+ │ --mount-sources Choose scope of local sources that should be mounted, skipped, or removed (default = │
+ │ selected). │
+ │ (selected | all | skip | remove | tests | providers-and-tests) │
+ │ [default: selected] │
+ │ --skip-docker-compose-down Skips running docker-compose down after tests │
+ │ --keep-env-variables Do not clear environment variables that might have side effect while running tests │
+ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
+ â•â”€ Common options ──────────────────────────────────────────────────────────────────────────────────────────────────── ─╮
+ │ --dry-run -D If dry-run is set, commands are only printed, not executed. │
+ │ --verbose -v Print verbose information about performed steps. │
+ │ --help -h Show this message and exit. │
+ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
+
+
+
+
diff --git a/dev/breeze/doc/images/output_testing_system-providers-tests.txt b/dev/breeze/doc/images/output_testing_system-providers-tests.txt
new file mode 100644
index 0000000000000..37bf33c0f1efd
--- /dev/null
+++ b/dev/breeze/doc/images/output_testing_system-providers-tests.txt
@@ -0,0 +1 @@
+5820486de619556abc347edee2cf7faa
diff --git a/dev/breeze/doc/images/output_testing_task-sdk-tests.svg b/dev/breeze/doc/images/output_testing_task-sdk-tests.svg
index ac5c8e76a62f7..0e4f0b3e78d9a 100644
--- a/dev/breeze/doc/images/output_testing_task-sdk-tests.svg
+++ b/dev/breeze/doc/images/output_testing_task-sdk-tests.svg
@@ -1,4 +1,4 @@
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Command: testing tests
-
-
-
-
-
-
-
-
-
-
- Usage: breeze testing tests [ OPTIONS ] [ EXTRA_PYTEST_ARGS ]...
-
- Run the specified unit tests. This is a low level testing command that allows you to run various kind of tests subset
- with a number of options. You can also use dedicated commands such as db_tests, non_db_tests, integration_tests for
- more opinionated test suite execution.
-
- â•â”€ Select test types to run (tests can also be selected by command args individually) ──────────────────────────────── ─╮
- │ --test-type Type of test to run. With Providers, you can specify tests of which providers │
- │ should be run: `Providers[airbyte,http]` or excluded from the full test suite: │
- │ `Providers[ -amazon ,google]` │
- │ (All | Default | API | Always | BranchExternalPython | BranchPythonVenv | CLI | │
- │ Core | ExternalPython | Operators | Other | PlainAsserts | Providers | PythonVenv │
- │ | Serialization | WWW | All-Postgres | All-MySQL | All-Quarantined) │
- │ [default: Default] │
- │ --parallel-test-types Space separated list of test types used for testing in parallel │
- │ (API | Always | BranchExternalPython | BranchPythonVenv | CLI | Core | │
- │ ExternalPython | Operators | Other | PlainAsserts | Providers | PythonVenv | │
- │ Serialization | WWW) │
- │ [default: API Always BranchExternalPython BranchPythonVenv CLI Core ExternalPython │
- │ Operators Other PlainAsserts Providers[-amazon,google] Providers[amazon] │
- │ Providers[google] PythonVenv Serialization WWW] │
- │ --excluded-parallel-test-types Space separated list of test types that will be excluded from parallel tes runs. │
- │ (API | Always | BranchExternalPython | BranchPythonVenv | CLI | Core | │
- │ ExternalPython | Operators | Other | PlainAsserts | Providers | PythonVenv | │
- │ Serialization | WWW) │
- ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
- â•â”€ Test options ────────────────────────────────────────────────────────────────────────────────────────────────────── ─╮
- │ --test-timeout Test timeout in seconds. Set the pytest setup, execution and teardown timeouts to this │
- │ value │
- │ (INTEGER RANGE) │
- │ [default: 60; x>=0] │
- │ --enable-coverage Enable coverage capturing for tests in the form of XML files │
- │ --collect-only Collect tests only, do not run them. │
- │ --db-reset -d Reset DB when entering the container. │
- │ --skip-provider-tests Skip provider tests │
- ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
- â•â”€ Selectively run DB or non-DB tests ──────────────────────────────────────────────────────────────────────────────── ─╮
- │ --run-db-tests-only Only runs tests that require a database │
- │ --skip-db-tests Skip tests that require a database │
- ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
- â•â”€ Test environment ────────────────────────────────────────────────────────────────────────────────────────────────── ─╮
- │ --integration Integration(s) to enable when running (can be more than one). │
- │ (all | all-testable | cassandra | celery | drill | kafka | kerberos │
- │ | keycloak | mongo | mssql | openlineage | otel | pinot | qdrant | │
- │ redis | statsd | trino | ydb) │
- │ --backend -b Database backend to use. If 'none' is chosen, Breeze will start with │
- │ an invalid database configuration, meaning there will be no database │
- │ available, and any attempts to connect to the Airflow database will │
- │ fail. │
- │ (>sqlite< | mysql | postgres | none) │
- │ [default: sqlite] │
- │ --database-isolation Run airflow in database isolation mode. │
- │ --python -p Python major/minor version used in Airflow image for images. │
- │ (>3.9< | 3.10 | 3.11 | 3.12) │
- │ [default: 3.9] │
- │ --postgres-version -P Version of Postgres used. (>12< | 13 | 14 | 15 | 16 | 17) │
- │ [default: 12] │
- │ --mysql-version -M Version of MySQL used. (>8.0< | 8.4) [default: 8.0] │
- │ --forward-credentials -f Forward local credentials to container when running. │
- │ --force-sa-warnings / --no-force-sa-warnings Enable `sqlalchemy.exc.MovedIn20Warning` during the tests runs. │
- │ [default: force-sa-warnings] │
- ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
- â•â”€ Options for parallel test commands ──────────────────────────────────────────────────────────────────────────────── ─╮
- │ --run-in-parallel Run the operation in parallel on all or selected subset of parameters. │
- │ --use-xdist Use xdist plugin for pytest │
- │ --parallelism Maximum number of processes to use while running the operation in parallel. │
- │ (INTEGER RANGE) │
- │ [default: 4; 1<=x<=8] │
- │ --skip-cleanup Skip cleanup of temporary files created during parallel run. │
- │ --debug-resources Whether to show resource information while running in parallel. │
- │ --include-success-outputs Whether to include outputs of successful parallel runs (skipped by default). │
- ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
- â•â”€ Upgrading/downgrading/removing selected packages ────────────────────────────────────────────────────────────────── ─╮
- │ --upgrade-boto Remove aiobotocore and upgrade botocore and boto to the latest version. │
- │ --downgrade-sqlalchemy Downgrade SQLAlchemy to minimum supported version. │
- │ --downgrade-pendulum Downgrade Pendulum to minimum supported version. │
- │ --remove-arm-packages Removes arm packages from the image to test if ARM collection works │
- ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
- â•â”€ Advanced flag for tests command ─────────────────────────────────────────────────────────────────────────────────── ─╮
- │ --airflow-constraints-reference Constraint reference to use for airflow installation │
- │ (used in calculated constraints URL). │
- │ (TEXT) │
- │ --clean-airflow-installation Clean the airflow installation before installing │
- │ version specified by --use-airflow-version . │
- │ --excluded-providers JSON-string of dictionary containing excluded providers │
- │ per python version ({'3.12': ['provider']}) │
- │ (TEXT) │
- │ --force-lowest-dependencies Run tests for the lowest direct dependencies of Airflow │
- │ or selected provider if `Provider[PROVIDER_ID]` is used │
- │ as test type. │
- │ --github-repository -g GitHub repository used to pull, push run images. (TEXT) │
- │ [default: apache/airflow] │
- │ --image-tag Tag of the image which is used to run the image │
- │ (implies --mount-sources =skip). │
- │ (TEXT) │
- │ [default: latest] │
- │ --install-airflow-with-constraints / --no-install-airflo… Install airflow in a separate step, with constraints │
- │ determined from package or airflow version. │
- │ [default: no-install-airflow-with-constraints] │
- │ --package-format Format of packages. (wheel | sdist | both) │
- │ [default: wheel] │
- │ --providers-constraints-location Location of providers constraints to use (remote URL or │
- │ local context file). │
- │ (TEXT) │
- │ --providers-skip-constraints Do not use constraints when installing providers. │
- │ --use-airflow-version Use (reinstall at entry) Airflow version from PyPI. It │
- │ can also be version (to install from PyPI), `none`, │
- │ `wheel`, or `sdist` to install from `dist` folder, or │
- │ VCS URL to install from │
- │ (https://pip.pypa.io/en/stable/topics/vcs-support/). │
- │ Implies --mount-sources `remove`. │
- │ (none | wheel | sdist | <airflow_version>) │
- │ --use-packages-from-dist Install all found packages ( --package-format determines │
- │ type) from 'dist' folder when entering breeze. │
- │ --mount-sources Choose scope of local sources that should be mounted, │
- │ skipped, or removed (default = selected). │
- │ (selected | all | skip | remove | tests | │
- │ providers-and-tests) │
- │ [default: selected] │
- │ --skip-docker-compose-down Skips running docker-compose down after tests │
- │ --skip-providers Space-separated list of provider ids to skip when │
- │ running tests │
- │ (TEXT) │
- │ --keep-env-variables Do not clear environment variables that might have side │
- │ effect while running tests │
- │ --no-db-cleanup Do not clear the database before each test module │
- ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
- â•â”€ Common options ──────────────────────────────────────────────────────────────────────────────────────────────────── ─╮
- │ --dry-run -D If dry-run is set, commands are only printed, not executed. │
- │ --verbose -v Print verbose information about performed steps. │
- │ --help -h Show this message and exit. │
- ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
-
-
-
-
diff --git a/dev/breeze/doc/images/output_testing_tests.txt b/dev/breeze/doc/images/output_testing_tests.txt
deleted file mode 100644
index 67808ed7f40ad..0000000000000
--- a/dev/breeze/doc/images/output_testing_tests.txt
+++ /dev/null
@@ -1 +0,0 @@
-69c5e660ec3f263dad58cc7a7710d4ed
diff --git a/dev/breeze/src/airflow_breeze/commands/common_options.py b/dev/breeze/src/airflow_breeze/commands/common_options.py
index 42edb4229a806..b4d27d60d9e18 100644
--- a/dev/breeze/src/airflow_breeze/commands/common_options.py
+++ b/dev/breeze/src/airflow_breeze/commands/common_options.py
@@ -32,7 +32,9 @@
ALLOWED_PYTHON_MAJOR_MINOR_VERSIONS,
ALLOWED_USE_AIRFLOW_VERSIONS,
APACHE_AIRFLOW_GITHUB_REPOSITORY,
- AUTOCOMPLETE_INTEGRATIONS,
+ AUTOCOMPLETE_ALL_INTEGRATIONS,
+ AUTOCOMPLETE_CORE_INTEGRATIONS,
+ AUTOCOMPLETE_PROVIDERS_INTEGRATIONS,
DEFAULT_UV_HTTP_TIMEOUT,
)
from airflow_breeze.utils.custom_param_types import (
@@ -230,10 +232,23 @@ def _set_default_from_parent(ctx: click.core.Context, option: click.core.Option,
is_flag=True,
envvar="INCLUDE_SUCCESS_OUTPUTS",
)
-option_integration = click.option(
+option_all_integration = click.option(
"--integration",
- help="Integration(s) to enable when running (can be more than one).",
- type=BetterChoice(AUTOCOMPLETE_INTEGRATIONS),
+ help="Core Integrations to enable when running (can be more than one).",
+ type=BetterChoice(AUTOCOMPLETE_ALL_INTEGRATIONS),
+ multiple=True,
+)
+
+option_core_integration = click.option(
+ "--integration",
+ help="Core Integrations to enable when running (can be more than one).",
+ type=BetterChoice(AUTOCOMPLETE_CORE_INTEGRATIONS),
+ multiple=True,
+)
+option_providers_integration = click.option(
+ "--integration",
+ help="Providers Integration(s) to enable when running (can be more than one).",
+ type=BetterChoice(AUTOCOMPLETE_PROVIDERS_INTEGRATIONS),
multiple=True,
)
option_image_name = click.option(
diff --git a/dev/breeze/src/airflow_breeze/commands/developer_commands.py b/dev/breeze/src/airflow_breeze/commands/developer_commands.py
index b26230c2e1632..3823375d5cb6a 100644
--- a/dev/breeze/src/airflow_breeze/commands/developer_commands.py
+++ b/dev/breeze/src/airflow_breeze/commands/developer_commands.py
@@ -33,6 +33,7 @@
from airflow_breeze.commands.common_options import (
argument_doc_packages,
option_airflow_extras,
+ option_all_integration,
option_answer,
option_backend,
option_builder,
@@ -50,7 +51,6 @@
option_include_not_ready_providers,
option_include_removed_providers,
option_installation_package_format,
- option_integration,
option_keep_env_variables,
option_max_time,
option_mount_sources,
@@ -83,7 +83,6 @@
from airflow_breeze.commands.main_command import main
from airflow_breeze.commands.testing_commands import (
option_force_lowest_dependencies,
- option_test_type,
)
from airflow_breeze.global_constants import (
ALLOWED_CELERY_BROKERS,
@@ -284,7 +283,7 @@ def run(self):
@option_install_airflow_with_constraints_default_true
@option_install_selected_providers
@option_installation_package_format
-@option_integration
+@option_all_integration
@option_keep_env_variables
@option_max_time
@option_mount_sources
@@ -300,7 +299,6 @@ def run(self):
@option_python
@option_restart
@option_run_db_tests_only
-@option_test_type
@option_skip_db_tests
@option_skip_environment_initialization
@option_skip_image_upgrade_check
@@ -361,7 +359,6 @@ def shell(
skip_db_tests: bool,
skip_image_upgrade_check: bool,
standalone_dag_processor: bool,
- test_type: str,
tty: str,
upgrade_boto: bool,
use_airflow_version: str | None,
@@ -429,7 +426,6 @@ def shell(
skip_image_upgrade_check=skip_image_upgrade_check,
skip_environment_initialization=skip_environment_initialization,
standalone_dag_processor=standalone_dag_processor,
- test_type=test_type,
tty=tty,
upgrade_boto=upgrade_boto,
use_airflow_version=use_airflow_version,
@@ -505,7 +501,7 @@ def shell(
@option_image_tag_for_running
@option_installation_package_format
@option_install_selected_providers
-@option_integration
+@option_all_integration
@option_load_default_connection
@option_load_example_dags
@option_mount_sources
diff --git a/dev/breeze/src/airflow_breeze/commands/developer_commands_config.py b/dev/breeze/src/airflow_breeze/commands/developer_commands_config.py
index 8b9f0f1cc90ed..62a40f5a3ef12 100644
--- a/dev/breeze/src/airflow_breeze/commands/developer_commands_config.py
+++ b/dev/breeze/src/airflow_breeze/commands/developer_commands_config.py
@@ -158,7 +158,6 @@
"--providers-constraints-mode",
"--providers-constraints-reference",
"--providers-skip-constraints",
- "--test-type",
"--use-airflow-version",
"--use-packages-from-dist",
],
diff --git a/dev/breeze/src/airflow_breeze/commands/main_command.py b/dev/breeze/src/airflow_breeze/commands/main_command.py
index 7a23b4d6ca65d..5e9ca7fbce747 100644
--- a/dev/breeze/src/airflow_breeze/commands/main_command.py
+++ b/dev/breeze/src/airflow_breeze/commands/main_command.py
@@ -24,6 +24,7 @@
from airflow_breeze.commands.ci_image_commands import ci_image
from airflow_breeze.commands.common_options import (
+ option_all_integration,
option_answer,
option_backend,
option_builder,
@@ -33,7 +34,6 @@
option_dry_run,
option_forward_credentials,
option_github_repository,
- option_integration,
option_max_time,
option_mysql_version,
option_postgres_version,
@@ -114,7 +114,7 @@ def get_command(self, ctx: Context, cmd_name: str):
@option_dry_run
@option_forward_credentials
@option_github_repository
-@option_integration
+@option_all_integration
@option_max_time
@option_mysql_version
@option_postgres_version
diff --git a/dev/breeze/src/airflow_breeze/commands/testing_commands.py b/dev/breeze/src/airflow_breeze/commands/testing_commands.py
index 2d76b66f37421..b7f07a13339c7 100644
--- a/dev/breeze/src/airflow_breeze/commands/testing_commands.py
+++ b/dev/breeze/src/airflow_breeze/commands/testing_commands.py
@@ -28,6 +28,7 @@
from airflow_breeze.commands.common_options import (
option_backend,
option_clean_airflow_installation,
+ option_core_integration,
option_database_isolation,
option_db_reset,
option_debug_resources,
@@ -41,13 +42,13 @@
option_image_name,
option_image_tag_for_running,
option_include_success_outputs,
- option_integration,
option_keep_env_variables,
option_mount_sources,
option_mysql_version,
option_no_db_cleanup,
option_parallelism,
option_postgres_version,
+ option_providers_integration,
option_python,
option_run_db_tests_only,
option_run_in_parallel,
@@ -66,9 +67,11 @@
)
from airflow_breeze.commands.release_management_commands import option_package_format
from airflow_breeze.global_constants import (
- ALLOWED_HELM_TEST_PACKAGES,
- ALLOWED_PARALLEL_TEST_TYPE_CHOICES,
+ ALL_TEST_TYPE,
ALLOWED_TEST_TYPE_CHOICES,
+ GroupOfTests,
+ all_selective_core_test_types,
+ providers_test_type,
)
from airflow_breeze.params.build_prod_params import BuildProdParams
from airflow_breeze.params.shell_params import ShellParams
@@ -191,9 +194,9 @@ def _run_test(
"airflow",
]
pytest_args = generate_args_for_pytest(
+ test_group=shell_params.test_group,
test_type=shell_params.test_type,
test_timeout=test_timeout,
- skip_provider_tests=shell_params.skip_provider_tests,
skip_db_tests=shell_params.skip_db_tests,
run_db_tests_only=shell_params.run_db_tests_only,
backend=shell_params.backend,
@@ -203,7 +206,6 @@ def _run_test(
parallelism=shell_params.parallelism,
python_version=python_version,
parallel_test_types_list=shell_params.parallel_test_types_list,
- helm_test_package=None,
keep_env_variables=shell_params.keep_env_variables,
no_db_cleanup=shell_params.no_db_cleanup,
)
@@ -273,16 +275,15 @@ def _run_test(
def _run_tests_in_pool(
- tests_to_run: list[str],
- parallelism: int,
- shell_params: ShellParams,
+ debug_resources: bool,
extra_pytest_args: tuple,
- test_timeout: int,
- db_reset: bool,
include_success_outputs: bool,
- debug_resources: bool,
+ parallelism: int,
+ shell_params: ShellParams,
skip_cleanup: bool,
skip_docker_compose_down: bool,
+ test_timeout: int,
+ tests_to_run: list[str],
):
if not tests_to_run:
return
@@ -292,11 +293,8 @@ def _run_tests_in_pool(
# tests are still running. We are only adding here test types that take more than 2 minutes to run
# on a fast machine in parallel
sorting_order = [
- "Providers",
- "Providers[-amazon,google]",
"Other",
"Core",
- "PythonVenv",
"WWW",
"CLI",
"Serialization",
@@ -358,7 +356,6 @@ def pull_images_for_docker_compose(shell_params: ShellParams):
def run_tests_in_parallel(
shell_params: ShellParams,
extra_pytest_args: tuple,
- db_reset: bool,
test_timeout: int,
include_success_outputs: bool,
debug_resources: bool,
@@ -369,7 +366,6 @@ def run_tests_in_parallel(
get_console().print("\n[info]Summary of the tests to run\n")
get_console().print(f"[info]Running tests in parallel with parallelism={parallelism}")
get_console().print(f"[info]Extra pytest args: {extra_pytest_args}")
- get_console().print(f"[info]DB reset: {db_reset}")
get_console().print(f"[info]Test timeout: {test_timeout}")
get_console().print(f"[info]Include success outputs: {include_success_outputs}")
get_console().print(f"[info]Debug resources: {debug_resources}")
@@ -384,7 +380,6 @@ def run_tests_in_parallel(
shell_params=shell_params,
extra_pytest_args=extra_pytest_args,
test_timeout=test_timeout,
- db_reset=db_reset,
include_success_outputs=include_success_outputs,
debug_resources=debug_resources,
skip_cleanup=skip_cleanup,
@@ -421,21 +416,37 @@ def _verify_parallelism_parameters(
is_flag=True,
envvar="ENABLE_COVERAGE",
)
-option_excluded_parallel_test_types = click.option(
+option_excluded_parallel_core_test_types = click.option(
"--excluded-parallel-test-types",
- help="Space separated list of test types that will be excluded from parallel tes runs.",
+ help="Space separated list of core test types that will be excluded from parallel tes runs.",
default="",
show_default=True,
envvar="EXCLUDED_PARALLEL_TEST_TYPES",
- type=NotVerifiedBetterChoice(ALLOWED_PARALLEL_TEST_TYPE_CHOICES),
+ type=NotVerifiedBetterChoice(all_selective_core_test_types()),
)
-option_parallel_test_types = click.option(
+option_parallel_core_test_types = click.option(
"--parallel-test-types",
- help="Space separated list of test types used for testing in parallel",
+ help="Space separated list of core test types used for testing in parallel.",
default=ALL_CI_SELECTIVE_TEST_TYPES,
show_default=True,
envvar="PARALLEL_TEST_TYPES",
- type=NotVerifiedBetterChoice(ALLOWED_PARALLEL_TEST_TYPE_CHOICES),
+ type=NotVerifiedBetterChoice(all_selective_core_test_types()),
+)
+option_excluded_parallel_providers_test_types = click.option(
+ "--excluded-parallel-test-types",
+ help="Space separated list of provider test types that will be excluded from parallel tes runs. You can "
+ "for example `Providers[airbyte,http]`.",
+ default="",
+ envvar="EXCLUDED_PARALLEL_TEST_TYPES",
+ type=str,
+)
+option_parallel_providers_test_types = click.option(
+ "--parallel-test-types",
+ help="Space separated list of provider test types used for testing in parallel. You can also optionally "
+ "specify tests of which providers should be run: `Providers[airbyte,http]`.",
+ default=providers_test_type()[0],
+ envvar="PARALLEL_TEST_TYPES",
+ type=str,
)
option_skip_docker_compose_down = click.option(
"--skip-docker-compose-down",
@@ -443,12 +454,6 @@ def _verify_parallelism_parameters(
is_flag=True,
envvar="SKIP_DOCKER_COMPOSE_DOWN",
)
-option_skip_provider_tests = click.option(
- "--skip-provider-tests",
- help="Skip provider tests",
- is_flag=True,
- envvar="SKIP_PROVIDER_TESTS",
-)
option_skip_providers = click.option(
"--skip-providers",
help="Space-separated list of provider ids to skip when running tests",
@@ -464,15 +469,41 @@ def _verify_parallelism_parameters(
type=IntRange(min=0),
show_default=True,
)
-option_test_type = click.option(
+option_test_type_core_group = click.option(
+ "--test-type",
+ help="Type of tests to run for core test group",
+ default=ALL_TEST_TYPE,
+ envvar="TEST_TYPE",
+ show_default=True,
+ type=BetterChoice(ALLOWED_TEST_TYPE_CHOICES[GroupOfTests.CORE]),
+)
+option_test_type_providers_group = click.option(
+ "--test-type",
+ help="Type of test to run. You can also optionally specify tests of which providers "
+ "should be run: `Providers[airbyte,http]` or "
+ "excluded from the full test suite: `Providers[-amazon,google]`",
+ default=ALL_TEST_TYPE,
+ envvar="TEST_TYPE",
+ show_default=True,
+ type=NotVerifiedBetterChoice(ALLOWED_TEST_TYPE_CHOICES[GroupOfTests.PROVIDERS]),
+)
+option_test_type_helm = click.option(
+ "--test-type",
+ help="Type of helm tests to run",
+ default=ALL_TEST_TYPE,
+ envvar="TEST_TYPE",
+ show_default=True,
+ type=BetterChoice(ALLOWED_TEST_TYPE_CHOICES[GroupOfTests.HELM]),
+)
+option_test_type_task_sdk_group = click.option(
"--test-type",
help="Type of test to run. With Providers, you can specify tests of which providers "
"should be run: `Providers[airbyte,http]` or "
"excluded from the full test suite: `Providers[-amazon,google]`",
- default="Default",
+ default=ALL_TEST_TYPE,
envvar="TEST_TYPE",
show_default=True,
- type=NotVerifiedBetterChoice(ALLOWED_TEST_TYPE_CHOICES),
+ type=BetterChoice(ALLOWED_TEST_TYPE_CHOICES[GroupOfTests.TASK_SDK]),
)
option_use_xdist = click.option(
"--use-xdist",
@@ -497,10 +528,192 @@ def _verify_parallelism_parameters(
@group_for_testing.command(
- name="tests",
- help="Run the specified unit tests. This is a low level testing command that allows you to run "
- "various kind of tests subset with a number of options. You can also use dedicated commands such "
- "as db_tests, non_db_tests, integration_tests for more opinionated test suite execution.",
+ name="core-tests",
+ help="Run all (default) or specified core unit tests.",
+ context_settings=dict(
+ ignore_unknown_options=True,
+ allow_extra_args=True,
+ ),
+)
+@option_airflow_constraints_reference
+@option_backend
+@option_collect_only
+@option_clean_airflow_installation
+@option_db_reset
+@option_debug_resources
+@option_downgrade_pendulum
+@option_downgrade_sqlalchemy
+@option_dry_run
+@option_enable_coverage
+@option_excluded_parallel_core_test_types
+@option_force_sa_warnings
+@option_force_lowest_dependencies
+@option_forward_credentials
+@option_github_repository
+@option_image_tag_for_running
+@option_include_success_outputs
+@option_install_airflow_with_constraints
+@option_keep_env_variables
+@option_mount_sources
+@option_mysql_version
+@option_no_db_cleanup
+@option_package_format
+@option_parallel_core_test_types
+@option_parallelism
+@option_postgres_version
+@option_python
+@option_remove_arm_packages
+@option_run_db_tests_only
+@option_run_in_parallel
+@option_skip_cleanup
+@option_skip_db_tests
+@option_skip_docker_compose_down
+@option_test_timeout
+@option_test_type_core_group
+@option_upgrade_boto
+@option_use_airflow_version
+@option_use_packages_from_dist
+@option_use_xdist
+@option_verbose
+@click.argument("extra_pytest_args", nargs=-1, type=click.Path(path_type=str))
+def core_tests(**kwargs):
+ _run_test_command(
+ test_group=GroupOfTests.CORE,
+ database_isolation=False,
+ integration=(),
+ excluded_providers="",
+ providers_skip_constraints=False,
+ providers_constraints_location="",
+ skip_providers="",
+ **kwargs,
+ )
+
+
+@group_for_testing.command(
+ name="core-db-tests",
+ help="Run all (default) or specified DB-bound core unit tests.",
+ context_settings=dict(
+ ignore_unknown_options=False,
+ allow_extra_args=False,
+ ),
+)
+@option_airflow_constraints_reference
+@option_backend
+@option_collect_only
+@option_clean_airflow_installation
+@option_db_reset
+@option_debug_resources
+@option_downgrade_pendulum
+@option_downgrade_sqlalchemy
+@option_dry_run
+@option_enable_coverage
+@option_excluded_parallel_core_test_types
+@option_forward_credentials
+@option_force_lowest_dependencies
+@option_github_repository
+@option_image_tag_for_running
+@option_include_success_outputs
+@option_install_airflow_with_constraints
+@option_keep_env_variables
+@option_mount_sources
+@option_mysql_version
+@option_no_db_cleanup
+@option_package_format
+@option_parallel_core_test_types
+@option_parallelism
+@option_postgres_version
+@option_python
+@option_remove_arm_packages
+@option_skip_cleanup
+@option_skip_docker_compose_down
+@option_test_timeout
+@option_upgrade_boto
+@option_use_airflow_version
+@option_use_packages_from_dist
+@option_force_sa_warnings
+@option_verbose
+def core_db_tests(**kwargs):
+ _run_test_command(
+ test_group=GroupOfTests.CORE,
+ integration=(),
+ run_in_parallel=True,
+ use_xdist=False,
+ skip_db_tests=False,
+ run_db_tests_only=True,
+ test_type=ALL_TEST_TYPE,
+ database_isolation=False,
+ excluded_providers="",
+ providers_skip_constraints=False,
+ providers_constraints_location="",
+ skip_providers="",
+ extra_pytest_args=(),
+ **kwargs,
+ )
+
+
+@group_for_testing.command(
+ name="core-non-db-tests",
+ help="Run all (default) or specified Non-DB core unit tests.",
+ context_settings=dict(
+ ignore_unknown_options=False,
+ allow_extra_args=False,
+ ),
+)
+@option_airflow_constraints_reference
+@option_collect_only
+@option_clean_airflow_installation
+@option_debug_resources
+@option_downgrade_sqlalchemy
+@option_downgrade_pendulum
+@option_dry_run
+@option_enable_coverage
+@option_excluded_parallel_core_test_types
+@option_forward_credentials
+@option_force_lowest_dependencies
+@option_github_repository
+@option_image_tag_for_running
+@option_include_success_outputs
+@option_install_airflow_with_constraints
+@option_keep_env_variables
+@option_mount_sources
+@option_package_format
+@option_parallel_core_test_types
+@option_parallelism
+@option_python
+@option_remove_arm_packages
+@option_skip_cleanup
+@option_skip_docker_compose_down
+@option_test_timeout
+@option_upgrade_boto
+@option_use_airflow_version
+@option_use_packages_from_dist
+@option_force_sa_warnings
+@option_verbose
+def core_non_db_tests(**kwargs):
+ _run_test_command(
+ test_group=GroupOfTests.CORE,
+ backend="none",
+ db_reset=False,
+ no_db_cleanup=True,
+ integration=(),
+ run_db_tests_only=False,
+ run_in_parallel=False,
+ skip_db_tests=True,
+ test_type=ALL_TEST_TYPE,
+ use_xdist=True,
+ database_isolation=False,
+ excluded_providers="",
+ providers_skip_constraints=False,
+ providers_constraints_location="",
+ skip_providers="",
+ extra_pytest_args=(),
+ **kwargs,
+ )
+
+
+@group_for_testing.command(
+ name="providers-tests",
+ help="Run all (default) or specified Providers unit tests.",
context_settings=dict(
ignore_unknown_options=True,
allow_extra_args=True,
@@ -518,21 +731,20 @@ def _verify_parallelism_parameters(
@option_dry_run
@option_enable_coverage
@option_excluded_providers
-@option_excluded_parallel_test_types
+@option_excluded_parallel_providers_test_types
@option_force_sa_warnings
@option_force_lowest_dependencies
@option_forward_credentials
@option_github_repository
@option_image_tag_for_running
@option_include_success_outputs
-@option_integration
@option_install_airflow_with_constraints
@option_keep_env_variables
@option_mount_sources
@option_mysql_version
@option_no_db_cleanup
@option_package_format
-@option_parallel_test_types
+@option_parallel_providers_test_types
@option_parallelism
@option_postgres_version
@option_providers_constraints_location
@@ -544,25 +756,22 @@ def _verify_parallelism_parameters(
@option_skip_cleanup
@option_skip_db_tests
@option_skip_docker_compose_down
-@option_skip_provider_tests
@option_skip_providers
@option_test_timeout
-@option_test_type
+@option_test_type_providers_group
@option_upgrade_boto
@option_use_airflow_version
@option_use_packages_from_dist
@option_use_xdist
@option_verbose
@click.argument("extra_pytest_args", nargs=-1, type=click.Path(path_type=str))
-def command_for_tests(**kwargs):
- _run_test_command(**kwargs)
+def providers_tests(**kwargs):
+ _run_test_command(test_group=GroupOfTests.PROVIDERS, integration=(), **kwargs)
@group_for_testing.command(
- name="db-tests",
- help="Run all (default) or specified DB-bound unit tests. This is a dedicated command that only runs "
- "DB tests and it runs them in parallel via splitting tests by test types into separate "
- "containers with separate database started for each container.",
+ name="providers-db-tests",
+ help="Run all (default) or specified Providers DB-bound unit tests.",
context_settings=dict(
ignore_unknown_options=False,
allow_extra_args=False,
@@ -573,12 +782,13 @@ def command_for_tests(**kwargs):
@option_collect_only
@option_clean_airflow_installation
@option_database_isolation
+@option_db_reset
@option_debug_resources
@option_downgrade_pendulum
@option_downgrade_sqlalchemy
@option_dry_run
@option_enable_coverage
-@option_excluded_parallel_test_types
+@option_excluded_parallel_providers_test_types
@option_excluded_providers
@option_forward_credentials
@option_force_lowest_dependencies
@@ -591,7 +801,7 @@ def command_for_tests(**kwargs):
@option_mysql_version
@option_no_db_cleanup
@option_package_format
-@option_parallel_test_types
+@option_parallel_providers_test_types
@option_parallelism
@option_postgres_version
@option_providers_constraints_location
@@ -600,7 +810,6 @@ def command_for_tests(**kwargs):
@option_remove_arm_packages
@option_skip_cleanup
@option_skip_docker_compose_down
-@option_skip_provider_tests
@option_skip_providers
@option_test_timeout
@option_upgrade_boto
@@ -608,25 +817,23 @@ def command_for_tests(**kwargs):
@option_use_packages_from_dist
@option_force_sa_warnings
@option_verbose
-def command_for_db_tests(**kwargs):
+def providers_db_tests(**kwargs):
_run_test_command(
+ test_group=GroupOfTests.PROVIDERS,
integration=(),
run_in_parallel=True,
use_xdist=False,
skip_db_tests=False,
run_db_tests_only=True,
- test_type="Default",
- db_reset=True,
+ test_type=ALL_TEST_TYPE,
extra_pytest_args=(),
**kwargs,
)
@group_for_testing.command(
- name="non-db-tests",
- help="Run all (default) or specified Non-DB unit tests. This is a dedicated command that only "
- "runs Non-DB tests and it runs them in parallel via pytest-xdist in single container, "
- "with `none` backend set.",
+ name="providers-non-db-tests",
+ help="Run all (default) or specified Providers non-db bound unit tests.",
context_settings=dict(
ignore_unknown_options=False,
allow_extra_args=False,
@@ -640,7 +847,7 @@ def command_for_db_tests(**kwargs):
@option_downgrade_pendulum
@option_dry_run
@option_enable_coverage
-@option_excluded_parallel_test_types
+@option_excluded_parallel_providers_test_types
@option_excluded_providers
@option_forward_credentials
@option_force_lowest_dependencies
@@ -650,9 +857,8 @@ def command_for_db_tests(**kwargs):
@option_install_airflow_with_constraints
@option_keep_env_variables
@option_mount_sources
-@option_no_db_cleanup
@option_package_format
-@option_parallel_test_types
+@option_parallel_providers_test_types
@option_parallelism
@option_providers_constraints_location
@option_providers_skip_constraints
@@ -660,7 +866,6 @@ def command_for_db_tests(**kwargs):
@option_remove_arm_packages
@option_skip_cleanup
@option_skip_docker_compose_down
-@option_skip_provider_tests
@option_skip_providers
@option_test_timeout
@option_upgrade_boto
@@ -668,17 +873,19 @@ def command_for_db_tests(**kwargs):
@option_use_packages_from_dist
@option_force_sa_warnings
@option_verbose
-def command_for_non_db_tests(**kwargs):
+def providers_non_db_tests(**kwargs):
_run_test_command(
+ test_group=GroupOfTests.PROVIDERS,
backend="none",
database_isolation=False,
db_reset=False,
+ no_db_cleanup=True,
extra_pytest_args=(),
integration=(),
run_db_tests_only=False,
run_in_parallel=False,
skip_db_tests=True,
- test_type="Default",
+ test_type=ALL_TEST_TYPE,
use_xdist=True,
**kwargs,
)
@@ -686,59 +893,57 @@ def command_for_non_db_tests(**kwargs):
@group_for_testing.command(
name="task-sdk-tests",
- help="Run task-sdk tests. This is a dedicated command that only "
- "runs Task SDk tests & don't need DB and it runs them in parallel via pytest-xdist in single container, "
- "with `none` backend set.",
+ help="Run task-sdk tests - all task SDK tests are non-DB bound tests.",
context_settings=dict(
ignore_unknown_options=False,
allow_extra_args=False,
),
)
-@option_airflow_constraints_reference
-@option_clean_airflow_installation
@option_collect_only
@option_debug_resources
-@option_downgrade_pendulum
-@option_downgrade_sqlalchemy
@option_dry_run
@option_enable_coverage
@option_force_sa_warnings
@option_forward_credentials
@option_github_repository
@option_image_tag_for_running
-@option_include_success_outputs
@option_keep_env_variables
+@option_include_success_outputs
@option_mount_sources
-@option_package_format
@option_parallelism
@option_python
-@option_remove_arm_packages
@option_skip_cleanup
@option_skip_docker_compose_down
@option_test_timeout
@option_verbose
@click.argument("extra_pytest_args", nargs=-1, type=click.UNPROCESSED)
-def command_for_task_sdk_tests(**kwargs):
+def task_sdk_tests(**kwargs):
_run_test_command(
+ test_group=GroupOfTests.TASK_SDK,
+ airflow_constraints_reference="constraints-main",
backend="none",
+ clean_airflow_installation=False,
database_isolation=False,
+ downgrade_pendulum=False,
+ downgrade_sqlalchemy=False,
db_reset=False,
integration=(),
+ install_airflow_with_constraints=False,
run_db_tests_only=False,
run_in_parallel=False,
skip_db_tests=True,
- test_type="TaskSDK",
use_xdist=True,
excluded_parallel_test_types="",
excluded_providers="",
force_lowest_dependencies=False,
- install_airflow_with_constraints=False,
no_db_cleanup=True,
parallel_test_types="",
+ package_format="wheel",
providers_constraints_location="",
providers_skip_constraints=False,
- skip_provider_tests=True,
+ remove_arm_packages=False,
skip_providers="",
+ test_type=ALL_TEST_TYPE,
upgrade_boto=False,
use_airflow_version=None,
use_packages_from_dist=False,
@@ -746,165 +951,94 @@ def command_for_task_sdk_tests(**kwargs):
)
-def _run_test_command(
- *,
- airflow_constraints_reference: str,
+@group_for_testing.command(
+ name="integration-core-tests",
+ help="Run the specified integration tests.",
+ context_settings=dict(
+ ignore_unknown_options=True,
+ allow_extra_args=True,
+ ),
+)
+@option_backend
+@option_collect_only
+@option_db_reset
+@option_dry_run
+@option_enable_coverage
+@option_force_sa_warnings
+@option_forward_credentials
+@option_github_repository
+@option_image_tag_for_running
+@option_core_integration
+@option_keep_env_variables
+@option_mount_sources
+@option_mysql_version
+@option_no_db_cleanup
+@option_postgres_version
+@option_python
+@option_skip_docker_compose_down
+@option_test_timeout
+@option_verbose
+@click.argument("extra_pytest_args", nargs=-1, type=click.UNPROCESSED)
+def integration_core_tests(
backend: str,
collect_only: bool,
- clean_airflow_installation: bool,
db_reset: bool,
- database_isolation: bool,
- debug_resources: bool,
- downgrade_sqlalchemy: bool,
- downgrade_pendulum: bool,
enable_coverage: bool,
- excluded_parallel_test_types: str,
- excluded_providers: str,
extra_pytest_args: tuple,
force_sa_warnings: bool,
forward_credentials: bool,
- force_lowest_dependencies: bool,
github_repository: str,
image_tag: str | None,
- include_success_outputs: bool,
- install_airflow_with_constraints: bool,
- integration: tuple[str, ...],
keep_env_variables: bool,
+ integration: tuple,
mount_sources: str,
+ mysql_version: str,
no_db_cleanup: bool,
- parallel_test_types: str,
- parallelism: int,
- package_format: str,
- providers_constraints_location: str,
- providers_skip_constraints: bool,
+ postgres_version: str,
python: str,
- remove_arm_packages: bool,
- run_db_tests_only: bool,
- run_in_parallel: bool,
- skip_cleanup: bool,
- skip_db_tests: bool,
skip_docker_compose_down: bool,
- skip_provider_tests: bool,
- skip_providers: str,
test_timeout: int,
- test_type: str,
- upgrade_boto: bool,
- use_airflow_version: str | None,
- use_packages_from_dist: bool,
- use_xdist: bool,
- mysql_version: str = "",
- postgres_version: str = "",
):
docker_filesystem = get_filesystem_type("/var/lib/docker")
get_console().print(f"Docker filesystem: {docker_filesystem}")
- _verify_parallelism_parameters(
- excluded_parallel_test_types, run_db_tests_only, run_in_parallel, use_xdist
- )
- test_list = parallel_test_types.split(" ")
- excluded_test_list = excluded_parallel_test_types.split(" ")
- if excluded_test_list:
- test_list = [test for test in test_list if test not in excluded_test_list]
- if skip_provider_tests or "Providers" in excluded_test_list:
- test_list = [test for test in test_list if not test.startswith("Providers")]
shell_params = ShellParams(
- airflow_constraints_reference=airflow_constraints_reference,
+ test_group=GroupOfTests.INTEGRATION_CORE,
backend=backend,
collect_only=collect_only,
- clean_airflow_installation=clean_airflow_installation,
- database_isolation=database_isolation,
- downgrade_sqlalchemy=downgrade_sqlalchemy,
- downgrade_pendulum=downgrade_pendulum,
enable_coverage=enable_coverage,
- excluded_providers=excluded_providers,
- force_sa_warnings=force_sa_warnings,
- force_lowest_dependencies=force_lowest_dependencies,
forward_credentials=forward_credentials,
forward_ports=False,
github_repository=github_repository,
image_tag=image_tag,
integration=integration,
- install_airflow_with_constraints=install_airflow_with_constraints,
keep_env_variables=keep_env_variables,
mount_sources=mount_sources,
mysql_version=mysql_version,
no_db_cleanup=no_db_cleanup,
- package_format=package_format,
- parallel_test_types_list=test_list,
- parallelism=parallelism,
postgres_version=postgres_version,
- providers_constraints_location=providers_constraints_location,
- providers_skip_constraints=providers_skip_constraints,
python=python,
- remove_arm_packages=remove_arm_packages,
- run_db_tests_only=run_db_tests_only,
- skip_db_tests=skip_db_tests,
- skip_provider_tests=skip_provider_tests,
- test_type=test_type,
- upgrade_boto=upgrade_boto,
- use_airflow_version=use_airflow_version,
- use_packages_from_dist=use_packages_from_dist,
- use_xdist=use_xdist,
+ test_type="All",
+ force_sa_warnings=force_sa_warnings,
run_tests=True,
db_reset=db_reset,
)
- rebuild_or_pull_ci_image_if_needed(command_params=shell_params)
fix_ownership_using_docker()
cleanup_python_generated_files()
perform_environment_checks()
- if skip_providers:
- ignored_path_list = [
- f"--ignore=providers/tests/{provider_id.replace('.','/')}"
- for provider_id in skip_providers.split(" ")
- ]
- extra_pytest_args = (*extra_pytest_args, *ignored_path_list)
- if run_in_parallel:
- if test_type != "Default":
- get_console().print(
- "[error]You should not specify --test-type when --run-in-parallel is set[/]. "
- f"Your test type = {test_type}\n"
- )
- sys.exit(1)
- run_tests_in_parallel(
- shell_params=shell_params,
- extra_pytest_args=extra_pytest_args,
- db_reset=db_reset,
- test_timeout=test_timeout,
- include_success_outputs=include_success_outputs,
- parallelism=parallelism,
- skip_cleanup=skip_cleanup,
- debug_resources=debug_resources,
- skip_docker_compose_down=skip_docker_compose_down,
- )
- else:
- if shell_params.test_type == "Default":
- if any(
- [
- arg.startswith("tests/")
- or arg.startswith("providers/tests/")
- or arg.startswith("task_sdk/tests/")
- for arg in extra_pytest_args
- ]
- ):
- # in case some tests are specified as parameters, do not pass "tests" as default
- # test_type = "All" as default and it will run all "tests" by default then
- shell_params.test_type = "None"
- shell_params.parallel_test_types_list = []
- else:
- shell_params.test_type = "All"
- returncode, _ = _run_test(
- shell_params=shell_params,
- extra_pytest_args=extra_pytest_args,
- python_version=python,
- output=None,
- test_timeout=test_timeout,
- output_outside_the_group=True,
- skip_docker_compose_down=skip_docker_compose_down,
- )
- sys.exit(returncode)
+ returncode, _ = _run_test(
+ shell_params=shell_params,
+ extra_pytest_args=extra_pytest_args,
+ python_version=python,
+ output=None,
+ test_timeout=test_timeout,
+ output_outside_the_group=True,
+ skip_docker_compose_down=skip_docker_compose_down,
+ )
+ sys.exit(returncode)
@group_for_testing.command(
- name="integration-tests",
+ name="integration-providers-tests",
help="Run the specified integration tests.",
context_settings=dict(
ignore_unknown_options=True,
@@ -912,55 +1046,64 @@ def _run_test_command(
),
)
@option_backend
+@option_collect_only
@option_db_reset
@option_dry_run
@option_enable_coverage
+@option_force_sa_warnings
@option_forward_credentials
@option_github_repository
@option_image_tag_for_running
-@option_integration
+@option_providers_integration
+@option_keep_env_variables
@option_mount_sources
@option_mysql_version
+@option_no_db_cleanup
@option_postgres_version
@option_python
-@option_skip_provider_tests
+@option_skip_docker_compose_down
@option_test_timeout
-@option_force_sa_warnings
@option_verbose
@click.argument("extra_pytest_args", nargs=-1, type=click.UNPROCESSED)
-def integration_tests(
+def integration_providers_tests(
backend: str,
+ collect_only: bool,
db_reset: bool,
enable_coverage: bool,
extra_pytest_args: tuple,
+ force_sa_warnings: bool,
forward_credentials: bool,
github_repository: str,
image_tag: str | None,
integration: tuple,
+ keep_env_variables: bool,
mount_sources: str,
mysql_version: str,
+ no_db_cleanup: bool,
postgres_version: str,
python: str,
- skip_provider_tests: bool,
- force_sa_warnings: bool,
+ skip_docker_compose_down: bool,
test_timeout: int,
):
docker_filesystem = get_filesystem_type("/var/lib/docker")
get_console().print(f"Docker filesystem: {docker_filesystem}")
shell_params = ShellParams(
+ test_group=GroupOfTests.INTEGRATION_PROVIDERS,
backend=backend,
+ collect_only=collect_only,
enable_coverage=enable_coverage,
forward_credentials=forward_credentials,
forward_ports=False,
github_repository=github_repository,
image_tag=image_tag,
integration=integration,
+ keep_env_variables=keep_env_variables,
mount_sources=mount_sources,
mysql_version=mysql_version,
+ no_db_cleanup=no_db_cleanup,
postgres_version=postgres_version,
python=python,
- skip_provider_tests=skip_provider_tests,
- test_type="Integration",
+ test_type="All",
force_sa_warnings=force_sa_warnings,
run_tests=True,
db_reset=db_reset,
@@ -975,6 +1118,175 @@ def integration_tests(
output=None,
test_timeout=test_timeout,
output_outside_the_group=True,
+ skip_docker_compose_down=skip_docker_compose_down,
+ )
+ sys.exit(returncode)
+
+
+@group_for_testing.command(
+ name="system-core-tests",
+ help="Run the specified system core tests.",
+ context_settings=dict(
+ ignore_unknown_options=True,
+ allow_extra_args=True,
+ ),
+)
+@option_backend
+@option_collect_only
+@option_db_reset
+@option_dry_run
+@option_enable_coverage
+@option_force_sa_warnings
+@option_forward_credentials
+@option_github_repository
+@option_image_tag_for_running
+@option_keep_env_variables
+@option_mount_sources
+@option_mysql_version
+@option_no_db_cleanup
+@option_postgres_version
+@option_python
+@option_skip_docker_compose_down
+@option_test_timeout
+@option_verbose
+@click.argument("extra_pytest_args", nargs=-1, type=click.UNPROCESSED)
+def system_core_tests(
+ backend: str,
+ collect_only: bool,
+ db_reset: bool,
+ enable_coverage: bool,
+ extra_pytest_args: tuple,
+ force_sa_warnings: bool,
+ forward_credentials: bool,
+ github_repository: str,
+ image_tag: str | None,
+ keep_env_variables: bool,
+ mount_sources: str,
+ mysql_version: str,
+ no_db_cleanup: bool,
+ postgres_version: str,
+ python: str,
+ skip_docker_compose_down: bool,
+ test_timeout: int,
+):
+ docker_filesystem = get_filesystem_type("/var/lib/docker")
+ get_console().print(f"Docker filesystem: {docker_filesystem}")
+ shell_params = ShellParams(
+ test_group=GroupOfTests.INTEGRATION_CORE,
+ backend=backend,
+ collect_only=collect_only,
+ enable_coverage=enable_coverage,
+ forward_credentials=forward_credentials,
+ forward_ports=False,
+ github_repository=github_repository,
+ image_tag=image_tag,
+ integration=(),
+ keep_env_variables=keep_env_variables,
+ mount_sources=mount_sources,
+ mysql_version=mysql_version,
+ no_db_cleanup=no_db_cleanup,
+ postgres_version=postgres_version,
+ python=python,
+ test_type="All",
+ force_sa_warnings=force_sa_warnings,
+ run_tests=True,
+ db_reset=db_reset,
+ )
+ fix_ownership_using_docker()
+ cleanup_python_generated_files()
+ perform_environment_checks()
+ returncode, _ = _run_test(
+ shell_params=shell_params,
+ extra_pytest_args=extra_pytest_args,
+ python_version=python,
+ output=None,
+ test_timeout=test_timeout,
+ output_outside_the_group=True,
+ skip_docker_compose_down=skip_docker_compose_down,
+ )
+ sys.exit(returncode)
+
+
+@group_for_testing.command(
+ name="system-providers-tests",
+ help="Run the specified system providers tests.",
+ context_settings=dict(
+ ignore_unknown_options=True,
+ allow_extra_args=True,
+ ),
+)
+@option_backend
+@option_collect_only
+@option_db_reset
+@option_dry_run
+@option_enable_coverage
+@option_force_sa_warnings
+@option_forward_credentials
+@option_github_repository
+@option_image_tag_for_running
+@option_keep_env_variables
+@option_mount_sources
+@option_mysql_version
+@option_no_db_cleanup
+@option_postgres_version
+@option_python
+@option_skip_docker_compose_down
+@option_test_timeout
+@option_verbose
+@click.argument("extra_pytest_args", nargs=-1, type=click.UNPROCESSED)
+def system_providers_tests(
+ backend: str,
+ collect_only: bool,
+ db_reset: bool,
+ enable_coverage: bool,
+ extra_pytest_args: tuple,
+ force_sa_warnings: bool,
+ forward_credentials: bool,
+ github_repository: str,
+ image_tag: str | None,
+ keep_env_variables: bool,
+ mount_sources: str,
+ mysql_version: str,
+ no_db_cleanup: bool,
+ postgres_version: str,
+ python: str,
+ skip_docker_compose_down: bool,
+ test_timeout: int,
+):
+ docker_filesystem = get_filesystem_type("/var/lib/docker")
+ get_console().print(f"Docker filesystem: {docker_filesystem}")
+ shell_params = ShellParams(
+ test_group=GroupOfTests.INTEGRATION_PROVIDERS,
+ backend=backend,
+ collect_only=collect_only,
+ enable_coverage=enable_coverage,
+ forward_credentials=forward_credentials,
+ forward_ports=False,
+ github_repository=github_repository,
+ image_tag=image_tag,
+ integration=(),
+ keep_env_variables=keep_env_variables,
+ mount_sources=mount_sources,
+ mysql_version=mysql_version,
+ no_db_cleanup=no_db_cleanup,
+ postgres_version=postgres_version,
+ python=python,
+ test_type="All",
+ force_sa_warnings=force_sa_warnings,
+ run_tests=True,
+ db_reset=db_reset,
+ )
+ fix_ownership_using_docker()
+ cleanup_python_generated_files()
+ perform_environment_checks()
+ returncode, _ = _run_test(
+ shell_params=shell_params,
+ extra_pytest_args=extra_pytest_args,
+ python_version=python,
+ output=None,
+ test_timeout=test_timeout,
+ output_outside_the_group=True,
+ skip_docker_compose_down=skip_docker_compose_down,
)
sys.exit(returncode)
@@ -992,44 +1304,36 @@ def integration_tests(
@option_github_repository
@option_test_timeout
@option_parallelism
+@option_test_type_helm
@option_use_xdist
@option_verbose
@option_dry_run
-@click.option(
- "--helm-test-package",
- help="Package to tests",
- default="all",
- type=BetterChoice(ALLOWED_HELM_TEST_PACKAGES),
-)
@click.argument("extra_pytest_args", nargs=-1, type=click.UNPROCESSED)
def helm_tests(
extra_pytest_args: tuple,
image_tag: str | None,
mount_sources: str,
- helm_test_package: str,
github_repository: str,
test_timeout: int,
+ test_type: str,
parallelism: int,
use_xdist: bool,
):
- if helm_test_package == "all":
- helm_test_package = ""
shell_params = ShellParams(
image_tag=image_tag,
mount_sources=mount_sources,
github_repository=github_repository,
run_tests=True,
- test_type="Helm",
- helm_test_package=helm_test_package,
+ test_type=test_type,
)
env = shell_params.env_variables_for_docker_commands
perform_environment_checks()
fix_ownership_using_docker()
cleanup_python_generated_files()
pytest_args = generate_args_for_pytest(
- test_type="Helm",
+ test_group=GroupOfTests.HELM,
+ test_type=test_type,
test_timeout=test_timeout,
- skip_provider_tests=True,
skip_db_tests=False,
run_db_tests_only=False,
backend="none",
@@ -1039,7 +1343,6 @@ def helm_tests(
parallelism=parallelism,
parallel_test_types_list=[],
python_version=shell_params.python,
- helm_test_package=helm_test_package,
keep_env_variables=False,
no_db_cleanup=False,
)
@@ -1047,3 +1350,146 @@ def helm_tests(
result = run_command(cmd, check=False, env=env, output_outside_the_group=True)
fix_ownership_using_docker()
sys.exit(result.returncode)
+
+
+def _run_test_command(
+ *,
+ test_group: GroupOfTests,
+ airflow_constraints_reference: str,
+ backend: str,
+ collect_only: bool,
+ clean_airflow_installation: bool,
+ db_reset: bool,
+ database_isolation: bool,
+ debug_resources: bool,
+ downgrade_sqlalchemy: bool,
+ downgrade_pendulum: bool,
+ enable_coverage: bool,
+ excluded_parallel_test_types: str,
+ excluded_providers: str,
+ extra_pytest_args: tuple,
+ force_sa_warnings: bool,
+ forward_credentials: bool,
+ force_lowest_dependencies: bool,
+ github_repository: str,
+ image_tag: str | None,
+ include_success_outputs: bool,
+ install_airflow_with_constraints: bool,
+ integration: tuple[str, ...],
+ keep_env_variables: bool,
+ mount_sources: str,
+ no_db_cleanup: bool,
+ parallel_test_types: str,
+ parallelism: int,
+ package_format: str,
+ providers_constraints_location: str,
+ providers_skip_constraints: bool,
+ python: str,
+ remove_arm_packages: bool,
+ run_db_tests_only: bool,
+ run_in_parallel: bool,
+ skip_cleanup: bool,
+ skip_db_tests: bool,
+ skip_docker_compose_down: bool,
+ skip_providers: str,
+ test_timeout: int,
+ test_type: str,
+ upgrade_boto: bool,
+ use_airflow_version: str | None,
+ use_packages_from_dist: bool,
+ use_xdist: bool,
+ mysql_version: str = "",
+ postgres_version: str = "",
+):
+ docker_filesystem = get_filesystem_type("/var/lib/docker")
+ get_console().print(f"Docker filesystem: {docker_filesystem}")
+ _verify_parallelism_parameters(
+ excluded_parallel_test_types, run_db_tests_only, run_in_parallel, use_xdist
+ )
+ test_list = parallel_test_types.split(" ")
+ excluded_test_list = excluded_parallel_test_types.split(" ")
+ if excluded_test_list:
+ test_list = [test for test in test_list if test not in excluded_test_list]
+ shell_params = ShellParams(
+ airflow_constraints_reference=airflow_constraints_reference,
+ backend=backend,
+ collect_only=collect_only,
+ clean_airflow_installation=clean_airflow_installation,
+ database_isolation=database_isolation,
+ downgrade_sqlalchemy=downgrade_sqlalchemy,
+ downgrade_pendulum=downgrade_pendulum,
+ enable_coverage=enable_coverage,
+ excluded_providers=excluded_providers,
+ force_sa_warnings=force_sa_warnings,
+ force_lowest_dependencies=force_lowest_dependencies,
+ forward_credentials=forward_credentials,
+ forward_ports=False,
+ github_repository=github_repository,
+ image_tag=image_tag,
+ integration=integration,
+ install_airflow_with_constraints=install_airflow_with_constraints,
+ keep_env_variables=keep_env_variables,
+ mount_sources=mount_sources,
+ mysql_version=mysql_version,
+ no_db_cleanup=no_db_cleanup,
+ package_format=package_format,
+ parallel_test_types_list=test_list,
+ parallelism=parallelism,
+ postgres_version=postgres_version,
+ providers_constraints_location=providers_constraints_location,
+ providers_skip_constraints=providers_skip_constraints,
+ python=python,
+ remove_arm_packages=remove_arm_packages,
+ run_db_tests_only=run_db_tests_only,
+ skip_db_tests=skip_db_tests,
+ test_type=test_type,
+ test_group=test_group,
+ upgrade_boto=upgrade_boto,
+ use_airflow_version=use_airflow_version,
+ use_packages_from_dist=use_packages_from_dist,
+ use_xdist=use_xdist,
+ run_tests=True,
+ db_reset=db_reset,
+ )
+ rebuild_or_pull_ci_image_if_needed(command_params=shell_params)
+ fix_ownership_using_docker()
+ cleanup_python_generated_files()
+ perform_environment_checks()
+ if skip_providers:
+ ignored_path_list = [
+ f"--ignore=providers/tests/{provider_id.replace('.','/')}"
+ for provider_id in skip_providers.split(" ")
+ ]
+ extra_pytest_args = (*extra_pytest_args, *ignored_path_list)
+ if run_in_parallel:
+ if test_type != ALL_TEST_TYPE:
+ get_console().print(
+ "[error]You should not specify --test-type when --run-in-parallel is set[/]. "
+ f"Your test type = {test_type}\n"
+ )
+ sys.exit(1)
+ run_tests_in_parallel(
+ shell_params=shell_params,
+ extra_pytest_args=extra_pytest_args,
+ test_timeout=test_timeout,
+ include_success_outputs=include_success_outputs,
+ parallelism=parallelism,
+ skip_cleanup=skip_cleanup,
+ debug_resources=debug_resources,
+ skip_docker_compose_down=skip_docker_compose_down,
+ )
+ else:
+ if shell_params.test_type == ALL_TEST_TYPE:
+ if any(["tests/" in arg and not arg.startswith("-") for arg in extra_pytest_args]):
+ shell_params.test_type = "None"
+ shell_params.parallel_test_types_list = []
+ returncode, _ = _run_test(
+ shell_params=shell_params,
+ extra_pytest_args=extra_pytest_args,
+ python_version=python,
+ output=None,
+ test_timeout=test_timeout,
+ output_outside_the_group=True,
+ skip_docker_compose_down=skip_docker_compose_down,
+ )
+ sys.exit(returncode)
diff --git a/dev/breeze/src/airflow_breeze/commands/testing_commands_config.py b/dev/breeze/src/airflow_breeze/commands/testing_commands_config.py
index 2732bcb13b007..a21c60e531070 100644
--- a/dev/breeze/src/airflow_breeze/commands/testing_commands_config.py
+++ b/dev/breeze/src/airflow_breeze/commands/testing_commands_config.py
@@ -16,168 +16,249 @@
# under the License.
from __future__ import annotations
-TESTING_COMMANDS: dict[str, str | list[str]] = {
- "name": "Testing",
- "commands": ["tests", "integration-tests", "helm-tests", "docker-compose-tests"],
+TEST_OPTIONS_NON_DB: dict[str, str | list[str]] = {
+ "name": "Test options",
+ "options": [
+ "--test-timeout",
+ "--enable-coverage",
+ "--collect-only",
+ ],
+}
+
+TEST_OPTIONS_DB: dict[str, str | list[str]] = {
+ "name": "Test options",
+ "options": [
+ "--test-timeout",
+ "--enable-coverage",
+ "--collect-only",
+ "--db-reset",
+ ],
+}
+
+TEST_ENVIRONMENT_DB: dict[str, str | list[str]] = {
+ "name": "Test environment",
+ "options": [
+ "--backend",
+ "--no-db-cleanup",
+ "--python",
+ "--postgres-version",
+ "--mysql-version",
+ "--forward-credentials",
+ "--force-sa-warnings",
+ ],
+}
+
+TEST_PARALLELISM_OPTIONS: dict[str, str | list[str]] = {
+ "name": "Options for parallel test commands",
+ "options": [
+ "--parallelism",
+ "--skip-cleanup",
+ "--debug-resources",
+ "--include-success-outputs",
+ ],
+}
+
+TEST_PARALLELISM_OPTIONS_XDIST: dict[str, str | list[str]] = {
+ "name": "Options for parallel test commands",
+ "options": [
+ "--run-in-parallel",
+ "--use-xdist",
+ "--parallelism",
+ "--skip-cleanup",
+ "--debug-resources",
+ "--include-success-outputs",
+ ],
+}
+
+TEST_UPGRADING_PACKAGES: dict[str, str | list[str]] = {
+ "name": "Upgrading/downgrading/removing selected packages",
+ "options": [
+ "--upgrade-boto",
+ "--downgrade-sqlalchemy",
+ "--downgrade-pendulum",
+ "--remove-arm-packages",
+ ],
+}
+
+TEST_ADVANCED_FLAGS: dict[str, str | list[str]] = {
+ "name": "Advanced flag for tests command",
+ "options": [
+ "--github-repository",
+ "--image-tag",
+ "--mount-sources",
+ "--skip-docker-compose-down",
+ "--keep-env-variables",
+ ],
+}
+
+TEST_ADVANCED_FLAGS_FOR_INSTALLATION: dict[str, str | list[str]] = {
+ "name": "Advanced flag for installing airflow in container",
+ "options": [
+ "--airflow-constraints-reference",
+ "--clean-airflow-installation",
+ "--force-lowest-dependencies",
+ "--install-airflow-with-constraints",
+ "--package-format",
+ "--use-airflow-version",
+ "--use-packages-from-dist",
+ ],
+}
+
+TEST_ADVANCED_FLAGS_FOR_PROVIDERS: dict[str, str | list[str]] = {
+ "name": "Advanced flag for provider tests command",
+ "options": [
+ "--excluded-providers",
+ "--providers-constraints-location",
+ "--providers-skip-constraints",
+ "--skip-providers",
+ ],
}
+
+
+TEST_PARAMS: list[dict[str, str | list[str]]] = [
+ {
+ "name": "Select test types to run (tests can also be selected by command args individually)",
+ "options": [
+ "--test-type",
+ "--parallel-test-types",
+ "--excluded-parallel-test-types",
+ ],
+ },
+ TEST_OPTIONS_DB,
+ {
+ "name": "Selectively run DB or non-DB tests",
+ "options": [
+ "--run-db-tests-only",
+ "--skip-db-tests",
+ ],
+ },
+ TEST_ENVIRONMENT_DB,
+ TEST_PARALLELISM_OPTIONS_XDIST,
+ TEST_UPGRADING_PACKAGES,
+]
+
+TEST_PARAMS_NON_DB: list[dict[str, str | list[str]]] = [
+ {
+ "name": "Select test types to run",
+ "options": [
+ "--parallel-test-types",
+ "--excluded-parallel-test-types",
+ ],
+ },
+ TEST_OPTIONS_NON_DB,
+ {
+ "name": "Test environment",
+ "options": [
+ "--python",
+ "--forward-credentials",
+ "--force-sa-warnings",
+ ],
+ },
+ TEST_PARALLELISM_OPTIONS,
+ TEST_UPGRADING_PACKAGES,
+]
+
+TEST_PARAMS_DB: list[dict[str, str | list[str]]] = [
+ {
+ "name": "Select tests to run",
+ "options": [
+ "--parallel-test-types",
+ "--excluded-parallel-test-types",
+ ],
+ },
+ TEST_OPTIONS_DB,
+ TEST_ENVIRONMENT_DB,
+ TEST_PARALLELISM_OPTIONS,
+ TEST_UPGRADING_PACKAGES,
+]
+
+DATABASE_ISOLATION_TESTS: dict[str, str | list[str]] = {
+ "name": "DB isolation tests",
+ "options": [
+ "--database-isolation",
+ ],
+}
+
+INTEGRATION_TESTS: dict[str, str | list[str]] = {
+ "name": "Integration tests",
+ "options": [
+ "--integration",
+ ],
+}
+
+
+TESTING_COMMANDS: list[dict[str, str | list[str]]] = [
+ {
+ "name": "Core Tests",
+ "commands": [
+ "core-tests",
+ "core-db-tests",
+ "core-non-db-tests",
+ ],
+ },
+ {
+ "name": "Providers Tests",
+ "commands": ["providers-tests", "providers-db-tests", "providers-non-db-tests"],
+ },
+ {
+ "name": "Task SDK Tests",
+ "commands": [
+ "task-sdk-tests",
+ ],
+ },
+ {"name": "Integration Tests", "commands": ["integration-core-tests", "integration-providers-tests"]},
+ {
+ "name": "System Tests",
+ "commands": ["system-core-tests", "system-providers-tests"],
+ },
+ {
+ "name": "Helm Tests",
+ "commands": ["helm-tests"],
+ },
+ {
+ "name": "Docker Compose Tests",
+ "commands": ["docker-compose-tests"],
+ },
+]
+
TESTING_PARAMETERS: dict[str, list[dict[str, str | list[str]]]] = {
- "breeze testing tests": [
- {
- "name": "Select test types to run (tests can also be selected by command args individually)",
- "options": [
- "--test-type",
- "--parallel-test-types",
- "--excluded-parallel-test-types",
- ],
- },
- {
- "name": "Test options",
- "options": [
- "--test-timeout",
- "--enable-coverage",
- "--collect-only",
- "--db-reset",
- "--skip-provider-tests",
- ],
- },
- {
- "name": "Selectively run DB or non-DB tests",
- "options": [
- "--run-db-tests-only",
- "--skip-db-tests",
- ],
- },
- {
- "name": "Test environment",
- "options": [
- "--integration",
- "--backend",
- "--database-isolation",
- "--python",
- "--postgres-version",
- "--mysql-version",
- "--forward-credentials",
- "--force-sa-warnings",
- ],
- },
- {
- "name": "Options for parallel test commands",
- "options": [
- "--run-in-parallel",
- "--use-xdist",
- "--parallelism",
- "--skip-cleanup",
- "--debug-resources",
- "--include-success-outputs",
- ],
- },
- {
- "name": "Upgrading/downgrading/removing selected packages",
- "options": [
- "--upgrade-boto",
- "--downgrade-sqlalchemy",
- "--downgrade-pendulum",
- "--remove-arm-packages",
- ],
- },
- {
- "name": "Advanced flag for tests command",
- "options": [
- "--airflow-constraints-reference",
- "--clean-airflow-installation",
- "--excluded-providers",
- "--force-lowest-dependencies",
- "--github-repository",
- "--image-tag",
- "--install-airflow-with-constraints",
- "--package-format",
- "--providers-constraints-location",
- "--providers-skip-constraints",
- "--use-airflow-version",
- "--use-packages-from-dist",
- "--mount-sources",
- "--skip-docker-compose-down",
- "--skip-providers",
- "--keep-env-variables",
- "--no-db-cleanup",
- ],
- },
+ "breeze testing core-tests": [
+ *TEST_PARAMS,
+ TEST_ADVANCED_FLAGS,
+ TEST_ADVANCED_FLAGS_FOR_INSTALLATION,
],
- "breeze testing non-db-tests": [
- {
- "name": "Select test types to run",
- "options": [
- "--parallel-test-types",
- "--excluded-parallel-test-types",
- ],
- },
- {
- "name": "Test options",
- "options": [
- "--test-timeout",
- "--enable-coverage",
- "--collect-only",
- "--skip-provider-tests",
- ],
- },
- {
- "name": "Test environment",
- "options": [
- "--python",
- "--forward-credentials",
- "--force-sa-warnings",
- ],
- },
- {
- "name": "Options for parallel test commands",
- "options": [
- "--parallelism",
- "--skip-cleanup",
- "--debug-resources",
- "--include-success-outputs",
- ],
- },
- {
- "name": "Upgrading/downgrading/removing selected packages",
- "options": [
- "--upgrade-boto",
- "--downgrade-sqlalchemy",
- "--downgrade-pendulum",
- "--remove-arm-packages",
- ],
- },
- {
- "name": "Advanced flag for tests command",
- "options": [
- "--airflow-constraints-reference",
- "--clean-airflow-installation",
- "--excluded-providers",
- "--force-lowest-dependencies",
- "--github-repository",
- "--image-tag",
- "--install-airflow-with-constraints",
- "--package-format",
- "--providers-constraints-location",
- "--providers-skip-constraints",
- "--use-airflow-version",
- "--use-packages-from-dist",
- "--mount-sources",
- "--skip-docker-compose-down",
- "--skip-providers",
- "--keep-env-variables",
- "--no-db-cleanup",
- ],
- },
+ "breeze testing core-non-db-tests": [
+ *TEST_PARAMS_NON_DB,
+ TEST_ADVANCED_FLAGS,
+ TEST_ADVANCED_FLAGS_FOR_INSTALLATION,
+ ],
+ "breeze testing core-db-tests": [
+ *TEST_PARAMS_DB,
+ TEST_ADVANCED_FLAGS,
+ TEST_ADVANCED_FLAGS_FOR_INSTALLATION,
+ ],
+ "breeze testing providers-tests": [
+ *TEST_PARAMS,
+ DATABASE_ISOLATION_TESTS,
+ TEST_ADVANCED_FLAGS,
+ TEST_ADVANCED_FLAGS_FOR_INSTALLATION,
+ TEST_ADVANCED_FLAGS_FOR_PROVIDERS,
+ ],
+ "breeze testing providers-db-tests": [
+ *TEST_PARAMS_DB,
+ DATABASE_ISOLATION_TESTS,
+ TEST_ADVANCED_FLAGS,
+ TEST_ADVANCED_FLAGS_FOR_INSTALLATION,
+ TEST_ADVANCED_FLAGS_FOR_PROVIDERS,
+ ],
+ "breeze testing providers-non-db-tests": [
+ *TEST_PARAMS_NON_DB,
+ TEST_ADVANCED_FLAGS,
+ TEST_ADVANCED_FLAGS_FOR_INSTALLATION,
+ TEST_ADVANCED_FLAGS_FOR_PROVIDERS,
],
"breeze testing task-sdk-tests": [
- {
- "name": "Test options",
- "options": [
- "--test-timeout",
- "--enable-coverage",
- "--collect-only",
- ],
- },
+ TEST_OPTIONS_NON_DB,
{
"name": "Test environment",
"options": [
@@ -186,154 +267,47 @@
"--force-sa-warnings",
],
},
- {
- "name": "Options for parallel test commands",
- "options": [
- "--parallelism",
- "--skip-cleanup",
- "--debug-resources",
- "--include-success-outputs",
- ],
- },
- {
- "name": "Upgrading/downgrading/removing selected packages",
- "options": [
- "--downgrade-sqlalchemy",
- "--downgrade-pendulum",
- "--remove-arm-packages",
- ],
- },
- {
- "name": "Advanced flag for tests command",
- "options": [
- "--airflow-constraints-reference",
- "--clean-airflow-installation",
- "--github-repository",
- "--image-tag",
- "--package-format",
- "--mount-sources",
- "--skip-docker-compose-down",
- "--keep-env-variables",
- ],
- },
+ TEST_ADVANCED_FLAGS,
+ TEST_PARALLELISM_OPTIONS,
],
- "breeze testing db-tests": [
- {
- "name": "Select tests to run",
- "options": [
- "--parallel-test-types",
- "--database-isolation",
- "--excluded-parallel-test-types",
- ],
- },
- {
- "name": "Test options",
- "options": [
- "--test-timeout",
- "--enable-coverage",
- "--collect-only",
- "--skip-provider-tests",
- ],
- },
- {
- "name": "Test environment",
- "options": [
- "--backend",
- "--python",
- "--postgres-version",
- "--mysql-version",
- "--forward-credentials",
- "--force-sa-warnings",
- ],
- },
- {
- "name": "Options for parallel test commands",
- "options": [
- "--parallelism",
- "--skip-cleanup",
- "--debug-resources",
- "--include-success-outputs",
- ],
- },
- {
- "name": "Upgrading/downgrading/removing selected packages",
- "options": [
- "--upgrade-boto",
- "--downgrade-sqlalchemy",
- "--downgrade-pendulum",
- "--remove-arm-packages",
- ],
- },
- {
- "name": "Advanced flag for tests command",
- "options": [
- "--airflow-constraints-reference",
- "--clean-airflow-installation",
- "--excluded-providers",
- "--force-lowest-dependencies",
- "--github-repository",
- "--image-tag",
- "--install-airflow-with-constraints",
- "--package-format",
- "--providers-constraints-location",
- "--providers-skip-constraints",
- "--use-airflow-version",
- "--use-packages-from-dist",
- "--mount-sources",
- "--skip-docker-compose-down",
- "--skip-providers",
- "--keep-env-variables",
- "--no-db-cleanup",
- ],
- },
+ "breeze testing integration-core-tests": [
+ TEST_OPTIONS_DB,
+ TEST_ENVIRONMENT_DB,
+ INTEGRATION_TESTS,
+ TEST_ADVANCED_FLAGS,
],
- "breeze testing integration-tests": [
- {
- "name": "Test options",
- "options": [
- "--test-timeout",
- "--enable-coverage",
- "--db-reset",
- "--skip-provider-tests",
- ],
- },
- {
- "name": "Test environment",
- "options": [
- "--integration",
- "--backend",
- "--python",
- "--postgres-version",
- "--mysql-version",
- "--forward-credentials",
- "--force-sa-warnings",
- ],
- },
- {
- "name": "Advanced flag for integration tests command",
- "options": [
- "--image-tag",
- "--mount-sources",
- "--github-repository",
- ],
- },
+ "breeze testing integration-providers-tests": [
+ TEST_OPTIONS_DB,
+ TEST_ENVIRONMENT_DB,
+ INTEGRATION_TESTS,
+ TEST_ADVANCED_FLAGS,
+ ],
+ "breeze testing system-core-tests": [
+ TEST_OPTIONS_DB,
+ TEST_ENVIRONMENT_DB,
+ TEST_ADVANCED_FLAGS,
+ ],
+ "breeze testing system-providers-tests": [
+ TEST_OPTIONS_DB,
+ TEST_ENVIRONMENT_DB,
+ TEST_ADVANCED_FLAGS,
],
"breeze testing helm-tests": [
{
"name": "Flags for helms-tests command",
"options": [
- "--helm-test-package",
+ "--test-type",
"--test-timeout",
"--use-xdist",
"--parallelism",
],
},
{
- "name": "Advanced flags for helms-tests command",
+ "name": "Advanced flag for helm-test command",
"options": [
+ "--github-repository",
"--image-tag",
"--mount-sources",
- "--github-repository",
],
},
],
diff --git a/dev/breeze/src/airflow_breeze/configure_rich_click.py b/dev/breeze/src/airflow_breeze/configure_rich_click.py
index fc6ccb9d59084..a7a147a04e5d0 100644
--- a/dev/breeze/src/airflow_breeze/configure_rich_click.py
+++ b/dev/breeze/src/airflow_breeze/configure_rich_click.py
@@ -97,7 +97,7 @@
"commands": ["setup", "ci"],
},
],
- "breeze testing": [TESTING_COMMANDS],
+ "breeze testing": TESTING_COMMANDS,
"breeze k8s": [
KUBERNETES_CLUSTER_COMMANDS,
KUBERNETES_INSPECTION_COMMANDS,
diff --git a/dev/breeze/src/airflow_breeze/global_constants.py b/dev/breeze/src/airflow_breeze/global_constants.py
index 15cd0ac81cc57..6e9361dc3bd11 100644
--- a/dev/breeze/src/airflow_breeze/global_constants.py
+++ b/dev/breeze/src/airflow_breeze/global_constants.py
@@ -77,12 +77,14 @@
ALLOWED_PROD_BACKENDS = [MYSQL_BACKEND, POSTGRES_BACKEND]
DEFAULT_BACKEND = ALLOWED_BACKENDS[0]
CELERY_INTEGRATION = "celery"
-TESTABLE_INTEGRATIONS = [
- "cassandra",
+TESTABLE_CORE_INTEGRATIONS = [
CELERY_INTEGRATION,
+ "kerberos",
+]
+TESTABLE_PROVIDERS_INTEGRATIONS = [
+ "cassandra",
"drill",
"kafka",
- "kerberos",
"mongo",
"mssql",
"pinot",
@@ -98,19 +100,41 @@
STATSD_INTEGRATION = "statsd"
OTEL_INTEGRATION = "otel"
OPENLINEAGE_INTEGRATION = "openlineage"
-OTHER_INTEGRATIONS = [STATSD_INTEGRATION, OTEL_INTEGRATION, OPENLINEAGE_INTEGRATION, KEYCLOAK_INTEGRATION]
+OTHER_CORE_INTEGRATIONS = [STATSD_INTEGRATION, OTEL_INTEGRATION, KEYCLOAK_INTEGRATION]
+OTHER_PROVIDERS_INTEGRATIONS = [OPENLINEAGE_INTEGRATION]
ALLOWED_DEBIAN_VERSIONS = ["bookworm"]
-ALL_INTEGRATIONS = sorted(
+ALL_CORE_INTEGRATIONS = sorted(
+ [
+ *TESTABLE_CORE_INTEGRATIONS,
+ *OTHER_CORE_INTEGRATIONS,
+ ]
+)
+ALL_PROVIDERS_INTEGRATIONS = sorted(
+ [
+ *TESTABLE_PROVIDERS_INTEGRATIONS,
+ *OTHER_PROVIDERS_INTEGRATIONS,
+ ]
+)
+AUTOCOMPLETE_CORE_INTEGRATIONS = sorted(
[
- *TESTABLE_INTEGRATIONS,
- *OTHER_INTEGRATIONS,
+ "all-testable",
+ "all",
+ *ALL_CORE_INTEGRATIONS,
+ ]
+)
+AUTOCOMPLETE_PROVIDERS_INTEGRATIONS = sorted(
+ [
+ "all-testable",
+ "all",
+ *ALL_PROVIDERS_INTEGRATIONS,
]
)
-AUTOCOMPLETE_INTEGRATIONS = sorted(
+AUTOCOMPLETE_ALL_INTEGRATIONS = sorted(
[
"all-testable",
"all",
- *ALL_INTEGRATIONS,
+ *ALL_CORE_INTEGRATIONS,
+ *ALL_PROVIDERS_INTEGRATIONS,
]
)
ALLOWED_TTY = ["auto", "enabled", "disabled"]
@@ -199,44 +223,59 @@
@cache
-def all_selective_test_types() -> tuple[str, ...]:
- return tuple(sorted(e.value for e in SelectiveUnitTestTypes))
+def all_selective_core_test_types() -> tuple[str, ...]:
+ return tuple(sorted(e.value for e in SelectiveCoreTestType))
@cache
-def all_selective_test_types_except_providers() -> tuple[str, ...]:
- return tuple(sorted(e.value for e in SelectiveUnitTestTypes if e != SelectiveUnitTestTypes.PROVIDERS))
+def providers_test_type() -> tuple[str, ...]:
+ return tuple(sorted(e.value for e in SelectiveProvidersTestType))
-class SelectiveUnitTestTypes(Enum):
+class SelectiveTestType(Enum):
+ pass
+
+
+class SelectiveCoreTestType(SelectiveTestType):
ALWAYS = "Always"
API = "API"
- BRANCH_PYTHON_VENV = "BranchPythonVenv"
- EXTERNAL_PYTHON = "ExternalPython"
- EXTERNAL_BRANCH_PYTHON = "BranchExternalPython"
CLI = "CLI"
CORE = "Core"
SERIALIZATION = "Serialization"
OTHER = "Other"
OPERATORS = "Operators"
- PLAIN_ASSERTS = "PlainAsserts"
- PROVIDERS = "Providers"
- PYTHON_VENV = "PythonVenv"
WWW = "WWW"
-ALLOWED_TEST_TYPE_CHOICES = [
- "All",
- "Default",
- *all_selective_test_types(),
- "All-Postgres",
- "All-MySQL",
- "All-Quarantined",
-]
+class SelectiveProvidersTestType(SelectiveTestType):
+ PROVIDERS = "Providers"
-ALLOWED_PARALLEL_TEST_TYPE_CHOICES = [
- *all_selective_test_types(),
-]
+
+class SelectiveTaskSdkTestType(SelectiveTestType):
+ TASK_SDK = "TaskSdk"
+
+
+class GroupOfTests(Enum):
+ CORE = "core"
+ PROVIDERS = "providers"
+ TASK_SDK = "task-sdk"
+ HELM = "helm"
+ INTEGRATION_CORE = "integration-core"
+ INTEGRATION_PROVIDERS = "integration-providers"
+ SYSTEM_CORE = "system-core"
+ SYSTEM_PROVIDERS = "system-providers"
+
+
+ALL_TEST_TYPE = "All"
+
+
+ALL_TEST_SUITES: dict[str, tuple[str, ...]] = {
+ "All": (),
+ "All-Long": ("-m", "long_running", "--include-long-running"),
+ "All-Quarantined": ("-m", "quarantined", "--include-quarantined"),
+ "All-Postgres": ("--backend", "postgres"),
+ "All-MySQL": ("--backend", "mysql"),
+}
@cache
@@ -250,10 +289,12 @@ def all_helm_test_packages() -> list[str]:
)
-ALLOWED_HELM_TEST_PACKAGES = [
- "all",
- *all_helm_test_packages(),
-]
+ALLOWED_TEST_TYPE_CHOICES: dict[GroupOfTests, list[str]] = {
+ GroupOfTests.CORE: [*ALL_TEST_SUITES.keys(), *all_selective_core_test_types()],
+ GroupOfTests.PROVIDERS: [*ALL_TEST_SUITES.keys()],
+ GroupOfTests.TASK_SDK: [ALL_TEST_TYPE],
+ GroupOfTests.HELM: [ALL_TEST_TYPE, *all_helm_test_packages()],
+}
@cache
diff --git a/dev/breeze/src/airflow_breeze/params/shell_params.py b/dev/breeze/src/airflow_breeze/params/shell_params.py
index f37e5b21d6df5..e5fd57a3f4324 100644
--- a/dev/breeze/src/airflow_breeze/params/shell_params.py
+++ b/dev/breeze/src/airflow_breeze/params/shell_params.py
@@ -25,7 +25,8 @@
from airflow_breeze.branch_defaults import AIRFLOW_BRANCH, DEFAULT_AIRFLOW_CONSTRAINTS_BRANCH
from airflow_breeze.global_constants import (
- ALL_INTEGRATIONS,
+ ALL_CORE_INTEGRATIONS,
+ ALL_PROVIDERS_INTEGRATIONS,
ALLOWED_BACKENDS,
ALLOWED_CONSTRAINTS_MODES_CI,
ALLOWED_DOCKER_COMPOSE_PROJECTS,
@@ -56,10 +57,12 @@
REDIS_HOST_PORT,
SSH_PORT,
START_AIRFLOW_DEFAULT_ALLOWED_EXECUTOR,
- TESTABLE_INTEGRATIONS,
+ TESTABLE_CORE_INTEGRATIONS,
+ TESTABLE_PROVIDERS_INTEGRATIONS,
USE_AIRFLOW_MOUNT_SOURCES,
WEBSERVER_HOST_PORT,
GithubEvents,
+ GroupOfTests,
get_airflow_version,
)
from airflow_breeze.utils.console import get_console
@@ -162,7 +165,6 @@ class ShellParams:
github_actions: str = os.environ.get("GITHUB_ACTIONS", "false")
github_repository: str = APACHE_AIRFLOW_GITHUB_REPOSITORY
github_token: str = os.environ.get("GITHUB_TOKEN", "")
- helm_test_package: str | None = None
image_tag: str | None = None
include_mypy_volume: bool = False
install_airflow_version: str = ""
@@ -200,11 +202,11 @@ class ShellParams:
skip_environment_initialization: bool = False
skip_image_upgrade_check: bool = False
skip_provider_dependencies_check: bool = False
- skip_provider_tests: bool = False
skip_ssh_setup: bool = os.environ.get("SKIP_SSH_SETUP", "false") == "true"
standalone_dag_processor: bool = False
start_airflow: bool = False
test_type: str | None = None
+ test_group: GroupOfTests | None = None
tty: str = "auto"
upgrade_boto: bool = False
use_airflow_version: str | None = None
@@ -376,9 +378,26 @@ def compose_file(self) -> str:
if self.include_mypy_volume:
compose_file_list.append(DOCKER_COMPOSE_DIR / "mypy.yml")
if "all-testable" in self.integration:
- integrations = TESTABLE_INTEGRATIONS
+ if self.test_group == GroupOfTests.CORE:
+ integrations = TESTABLE_CORE_INTEGRATIONS
+ elif self.test_group == GroupOfTests.PROVIDERS:
+ integrations = TESTABLE_PROVIDERS_INTEGRATIONS
+ else:
+ get_console().print(
+ "[error]You can only use `core` or `providers` test "
+ "group with `all-testable` integration."
+ )
+ sys.exit(1)
elif "all" in self.integration:
- integrations = ALL_INTEGRATIONS
+ if self.test_group == GroupOfTests.CORE:
+ integrations = ALL_CORE_INTEGRATIONS
+ elif self.test_group == GroupOfTests.PROVIDERS:
+ integrations = ALL_PROVIDERS_INTEGRATIONS
+ else:
+ get_console().print(
+ "[error]You can only use `core` or `providers` test group with `all` integration."
+ )
+ sys.exit(1)
else:
integrations = self.integration
for integration in integrations:
@@ -536,7 +555,6 @@ def env_variables_for_docker_commands(self) -> dict[str, str]:
_set_var(_env, "FORCE_LOWEST_DEPENDENCIES", self.force_lowest_dependencies)
_set_var(_env, "SQLALCHEMY_WARN_20", self.force_sa_warnings)
_set_var(_env, "GITHUB_ACTIONS", self.github_actions)
- _set_var(_env, "HELM_TEST_PACKAGE", self.helm_test_package, "")
_set_var(_env, "HOST_GROUP_ID", self.host_group_id)
_set_var(_env, "HOST_OS", self.host_os)
_set_var(_env, "HOST_USER_ID", self.host_user_id)
@@ -578,6 +596,7 @@ def env_variables_for_docker_commands(self) -> dict[str, str]:
_set_var(_env, "SUSPENDED_PROVIDERS_FOLDERS", self.suspended_providers_folders)
_set_var(_env, "SYSTEM_TESTS_ENV_ID", None, "")
_set_var(_env, "TEST_TYPE", self.test_type, "")
+ _set_var(_env, "TEST_GROUP", str(self.test_group.value) if self.test_group else "")
_set_var(_env, "UPGRADE_BOTO", self.upgrade_boto)
_set_var(_env, "USE_AIRFLOW_VERSION", self.use_airflow_version, "")
_set_var(_env, "USE_PACKAGES_FROM_DIST", self.use_packages_from_dist)
diff --git a/dev/breeze/src/airflow_breeze/utils/run_tests.py b/dev/breeze/src/airflow_breeze/utils/run_tests.py
index 9e9ca2d2660b7..539332148a31a 100644
--- a/dev/breeze/src/airflow_breeze/utils/run_tests.py
+++ b/dev/breeze/src/airflow_breeze/utils/run_tests.py
@@ -22,7 +22,15 @@
from itertools import chain
from subprocess import DEVNULL
-from airflow_breeze.global_constants import PIP_VERSION, UV_VERSION
+from airflow_breeze.global_constants import (
+ ALL_TEST_SUITES,
+ ALL_TEST_TYPE,
+ PIP_VERSION,
+ UV_VERSION,
+ GroupOfTests,
+ SelectiveCoreTestType,
+ all_helm_test_packages,
+)
from airflow_breeze.utils.console import Output, get_console
from airflow_breeze.utils.packages import get_excluded_provider_folders, get_suspended_provider_folders
from airflow_breeze.utils.path_utils import AIRFLOW_SOURCES_ROOT, TESTS_PROVIDERS_ROOT
@@ -100,12 +108,11 @@ def file_name_from_test_type(test_type: str):
return re.sub("[,.]", "_", test_type_no_brackets)[:30]
-def test_paths(test_type: str, backend: str, helm_test_package: str | None) -> tuple[str, str, str]:
+def test_paths(test_type: str, backend: str) -> tuple[str, str, str]:
file_friendly_test_type = file_name_from_test_type(test_type)
- extra_package = f"-{helm_test_package}" if helm_test_package else ""
random_suffix = os.urandom(4).hex()
- result_log_file = f"/files/test_result-{file_friendly_test_type}{extra_package}-{backend}.xml"
- warnings_file = f"/files/warnings-{file_friendly_test_type}{extra_package}-{backend}.txt"
+ result_log_file = f"/files/test_result-{file_friendly_test_type}-{backend}.xml"
+ warnings_file = f"/files/warnings-{file_friendly_test_type}-{backend}.txt"
coverage_file = f"/files/coverage-{file_friendly_test_type}-{backend}-{random_suffix}.xml"
return result_log_file, warnings_file, coverage_file
@@ -133,15 +140,9 @@ def get_excluded_provider_args(python_version: str) -> list[str]:
return get_ignore_switches_for_provider(excluded_folders)
-TEST_TYPE_MAP_TO_PYTEST_ARGS: dict[str, list[str]] = {
+TEST_TYPE_CORE_MAP_TO_PYTEST_ARGS: dict[str, list[str]] = {
"Always": ["tests/always"],
"API": ["tests/api", "tests/api_connexion", "tests/api_internal", "tests/api_fastapi"],
- "BranchPythonVenv": [
- "providers/tests/standard/operators/test_python.py::TestBranchPythonVirtualenvOperator",
- ],
- "BranchExternalPython": [
- "providers/tests/standard/operators/test_python.py::TestBranchExternalPythonOperator",
- ],
"CLI": ["tests/cli"],
"Core": [
"tests/core",
@@ -151,22 +152,8 @@ def get_excluded_provider_args(python_version: str) -> list[str]:
"tests/ti_deps",
"tests/utils",
],
- "ExternalPython": [
- "providers/tests/standard/operators/test_python.py::TestExternalPythonOperator",
- ],
"Integration": ["tests/integration"],
- # Operators test type excludes Virtualenv/External tests - they have their own test types
- "Operators": ["tests/operators", "--exclude-virtualenv-operator", "--exclude-external-python-operator"],
- # this one is mysteriously failing dill serialization. It could be removed once
- # https://github.com/pytest-dev/pytest/issues/10845 is fixed
- "PlainAsserts": [
- "providers/tests/standard/operators/test_python.py::TestPythonVirtualenvOperator::test_airflow_context",
- "--assert=plain",
- ],
- "Providers": ["providers/tests"],
- "PythonVenv": [
- "providers/tests/standard/operators/test_python.py::TestPythonVirtualenvOperator",
- ],
+ "Operators": ["tests/operators"],
"Serialization": [
"tests/serialization",
],
@@ -176,9 +163,18 @@ def get_excluded_provider_args(python_version: str) -> list[str]:
],
}
-HELM_TESTS = "helm_tests"
-INTEGRATION_TESTS = "tests/integration"
-SYSTEM_TESTS = "tests/system"
+
+TEST_GROUP_TO_TEST_FOLDER: dict[GroupOfTests, str] = {
+ GroupOfTests.CORE: "tests",
+ GroupOfTests.PROVIDERS: "providers/tests",
+ GroupOfTests.TASK_SDK: "task_sdk/tests",
+ GroupOfTests.HELM: "helm_tests",
+ GroupOfTests.INTEGRATION_CORE: "tests/integration",
+ GroupOfTests.INTEGRATION_PROVIDERS: "providers/tests/integration",
+ GroupOfTests.SYSTEM_CORE: "tests/system",
+ GroupOfTests.SYSTEM_PROVIDERS: "providers/tests/system",
+}
+
# Those directories are already ignored vu pyproject.toml. We want to exclude them here as well.
NO_RECURSE_DIRS = [
@@ -192,96 +188,95 @@ def get_excluded_provider_args(python_version: str) -> list[str]:
def find_all_other_tests() -> list[str]:
- all_named_test_folders = list(chain.from_iterable(TEST_TYPE_MAP_TO_PYTEST_ARGS.values()))
- all_named_test_folders.append(HELM_TESTS)
- all_named_test_folders.append(INTEGRATION_TESTS)
- all_named_test_folders.append(SYSTEM_TESTS)
+ all_named_test_folders = list(chain.from_iterable(TEST_TYPE_CORE_MAP_TO_PYTEST_ARGS.values()))
+ all_named_test_folders.append(TEST_GROUP_TO_TEST_FOLDER[GroupOfTests.PROVIDERS])
+ all_named_test_folders.append(TEST_GROUP_TO_TEST_FOLDER[GroupOfTests.TASK_SDK])
+ all_named_test_folders.append(TEST_GROUP_TO_TEST_FOLDER[GroupOfTests.HELM])
+ all_named_test_folders.append(TEST_GROUP_TO_TEST_FOLDER[GroupOfTests.INTEGRATION_CORE])
+ all_named_test_folders.append(TEST_GROUP_TO_TEST_FOLDER[GroupOfTests.INTEGRATION_PROVIDERS])
+ all_named_test_folders.append(TEST_GROUP_TO_TEST_FOLDER[GroupOfTests.SYSTEM_CORE])
+ all_named_test_folders.append(TEST_GROUP_TO_TEST_FOLDER[GroupOfTests.SYSTEM_PROVIDERS])
all_named_test_folders.extend(NO_RECURSE_DIRS)
- all_curent_test_folders = [
+ all_current_test_folders = [
str(path.relative_to(AIRFLOW_SOURCES_ROOT))
for path in AIRFLOW_SOURCES_ROOT.glob("tests/*")
if path.is_dir() and path.name != "__pycache__"
]
for named_test_folder in all_named_test_folders:
- if named_test_folder in all_curent_test_folders:
- all_curent_test_folders.remove(named_test_folder)
- return sorted(all_curent_test_folders)
+ if named_test_folder in all_current_test_folders:
+ all_current_test_folders.remove(named_test_folder)
+ return sorted(all_current_test_folders)
+PROVIDERS_PREFIX = "Providers"
PROVIDERS_LIST_PREFIX = "Providers["
PROVIDERS_LIST_EXCLUDE_PREFIX = "Providers[-"
-ALL_TEST_SUITES: dict[str, tuple[str, ...]] = {
- # TODO: This is not really correct now - we should allow to run both providers and airflow
- # as "ALL" tests - currently it is not possible due to conftest.py present at top-level of
- # all different test suites ("tests", "providers/tests", "task_sdk/tests")
- # The only reason it is working now in CI is because we run tests in parallel (both DB and non-DB)
- # each test subfolder is separately specified in the pytest command line
- # This should be solved as part of https://github.com/apache/airflow/issues/42632
- "All": ("tests",),
- "All-Long": ("tests", "-m", "long_running", "--include-long-running"),
- "All-Quarantined": ("tests", "-m", "quarantined", "--include-quarantined"),
- "All-Postgres": ("tests", "--backend", "postgres"),
- "All-MySQL": ("tests", "--backend", "mysql"),
-}
-
def convert_test_type_to_pytest_args(
*,
+ test_group: GroupOfTests,
test_type: str,
- skip_provider_tests: bool,
- helm_test_package: str | None = None,
) -> list[str]:
if test_type == "None":
return []
if test_type in ALL_TEST_SUITES:
return [
+ TEST_GROUP_TO_TEST_FOLDER[test_group],
*ALL_TEST_SUITES[test_type],
]
- if test_type == "Helm":
- if helm_test_package and helm_test_package != "all":
- return [f"helm_tests/{helm_test_package}"]
+ if test_group == GroupOfTests.HELM:
+ if test_type not in all_helm_test_packages():
+ get_console().print(f"[error]Unknown helm test type: {test_type}[/]")
+ sys.exit(1)
+ helm_folder = TEST_GROUP_TO_TEST_FOLDER[test_group]
+ if test_type and test_type != ALL_TEST_TYPE:
+ return [f"{helm_folder}/{test_type}"]
else:
- return [HELM_TESTS]
- if test_type == "Integration":
- if skip_provider_tests:
- return [
- "tests/integration/cli",
- "tests/integration/executors",
- "tests/integration/security",
- ]
- else:
- return [INTEGRATION_TESTS]
- if test_type == "System":
- return []
- if skip_provider_tests and test_type.startswith("Providers"):
- return []
- if test_type.startswith(PROVIDERS_LIST_EXCLUDE_PREFIX):
- excluded_provider_list = test_type[len(PROVIDERS_LIST_EXCLUDE_PREFIX) : -1].split(",")
- providers_with_exclusions = TEST_TYPE_MAP_TO_PYTEST_ARGS["Providers"].copy()
- for excluded_provider in excluded_provider_list:
- providers_with_exclusions.append(
- "--ignore=providers/tests/" + excluded_provider.replace(".", "/")
- )
- return providers_with_exclusions
- if test_type.startswith(PROVIDERS_LIST_PREFIX):
- provider_list = test_type[len(PROVIDERS_LIST_PREFIX) : -1].split(",")
- providers_to_test = []
- for provider in provider_list:
- provider_path = TESTS_PROVIDERS_ROOT.joinpath(provider.replace(".", "/"))
- if provider_path.is_dir():
- providers_to_test.append(provider_path.relative_to(AIRFLOW_SOURCES_ROOT).as_posix())
- else:
- get_console().print(
- f"[error]Provider directory {provider_path} does not exist for {provider}. "
- f"This is bad. Please add it (all providers should have a package in tests)"
- )
- sys.exit(1)
- return providers_to_test
- if test_type == "Other":
+ return [helm_folder]
+ if test_type == SelectiveCoreTestType.OTHER.value and test_group == GroupOfTests.CORE:
return find_all_other_tests()
- test_dirs = TEST_TYPE_MAP_TO_PYTEST_ARGS.get(test_type)
+ if test_group in [
+ GroupOfTests.INTEGRATION_CORE,
+ GroupOfTests.INTEGRATION_PROVIDERS,
+ GroupOfTests.SYSTEM_CORE,
+ GroupOfTests.SYSTEM_PROVIDERS,
+ ]:
+ if test_type != ALL_TEST_TYPE:
+ get_console().print(f"[error]Unknown test type for {test_group}: {test_type}[/]")
+ sys.exit(1)
+ if test_group == GroupOfTests.PROVIDERS:
+ if test_type.startswith(PROVIDERS_LIST_EXCLUDE_PREFIX):
+ excluded_provider_list = test_type[len(PROVIDERS_LIST_EXCLUDE_PREFIX) : -1].split(",")
+ providers_folder = TEST_GROUP_TO_TEST_FOLDER[GroupOfTests.PROVIDERS]
+ providers_with_exclusions: list = [providers_folder]
+ for excluded_provider in excluded_provider_list:
+ providers_with_exclusions.append(
+ f"--ignore={providers_folder}/" + excluded_provider.replace(".", "/")
+ )
+ return providers_with_exclusions
+ if test_type.startswith(PROVIDERS_LIST_PREFIX):
+ provider_list = test_type[len(PROVIDERS_LIST_PREFIX) : -1].split(",")
+ providers_to_test = []
+ for provider in provider_list:
+ provider_path = TESTS_PROVIDERS_ROOT.joinpath(provider.replace(".", "/"))
+ if provider_path.is_dir():
+ providers_to_test.append(provider_path.relative_to(AIRFLOW_SOURCES_ROOT).as_posix())
+ else:
+ get_console().print(
+ f"[error]Provider directory {provider_path} does not exist for {provider}. "
+ f"This is bad. Please add it (all providers should have a package in tests)"
+ )
+ sys.exit(1)
+ return providers_to_test
+ if not test_type.startswith(PROVIDERS_PREFIX):
+ get_console().print(f"[error]Unknown test type for {GroupOfTests.PROVIDERS}: {test_type}[/]")
+ sys.exit(1)
+ return [TEST_GROUP_TO_TEST_FOLDER[test_group]]
+ if test_group != GroupOfTests.CORE:
+ get_console().print(f"[error]Only {GroupOfTests.CORE} should be allowed here[/]")
+ test_dirs = TEST_TYPE_CORE_MAP_TO_PYTEST_ARGS.get(test_type)
if test_dirs:
return test_dirs.copy()
get_console().print(f"[error]Unknown test type: {test_type}[/]")
@@ -290,9 +285,9 @@ def convert_test_type_to_pytest_args(
def generate_args_for_pytest(
*,
+ test_group: GroupOfTests,
test_type: str,
test_timeout: int,
- skip_provider_tests: bool,
skip_db_tests: bool,
run_db_tests_only: bool,
backend: str,
@@ -302,18 +297,19 @@ def generate_args_for_pytest(
parallelism: int,
parallel_test_types_list: list[str],
python_version: str,
- helm_test_package: str | None,
keep_env_variables: bool,
no_db_cleanup: bool,
):
- result_log_file, warnings_file, coverage_file = test_paths(test_type, backend, helm_test_package)
+ result_log_file, warnings_file, coverage_file = test_paths(test_type, backend)
if skip_db_tests and parallel_test_types_list:
- args = convert_parallel_types_to_folders(parallel_test_types_list, skip_provider_tests)
+ args = convert_parallel_types_to_folders(
+ test_group=test_group,
+ parallel_test_types_list=parallel_test_types_list,
+ )
else:
args = convert_test_type_to_pytest_args(
+ test_group=test_group,
test_type=test_type,
- skip_provider_tests=skip_provider_tests,
- helm_test_package=helm_test_package,
)
args.extend(
[
@@ -347,15 +343,17 @@ def generate_args_for_pytest(
args.append("--skip-db-tests")
if run_db_tests_only:
args.append("--run-db-tests-only")
- if test_type != "System":
- args.append(f"--ignore-glob=*/{SYSTEM_TESTS}")
- if test_type != "Integration":
- args.append(f"--ignore-glob=*/{INTEGRATION_TESTS}")
- if test_type != "Helm":
+ if test_group not in [GroupOfTests.SYSTEM_CORE, GroupOfTests.SYSTEM_PROVIDERS]:
+ args.append("--ignore-glob=*/tests/system/*")
+ if test_group != GroupOfTests.INTEGRATION_CORE:
+ args.append(f"--ignore-glob=*/{TEST_GROUP_TO_TEST_FOLDER[GroupOfTests.INTEGRATION_CORE]}/*")
+ if test_group != GroupOfTests.INTEGRATION_PROVIDERS:
+ args.append(f"--ignore-glob=*/{TEST_GROUP_TO_TEST_FOLDER[GroupOfTests.INTEGRATION_PROVIDERS]}/*")
+ if test_group != GroupOfTests.HELM:
# do not produce warnings output for helm tests
args.append(f"--warning-output-path={warnings_file}")
- args.append(f"--ignore={HELM_TESTS}")
- if test_type not in ("Helm", "System"):
+ args.append(f"--ignore={TEST_GROUP_TO_TEST_FOLDER[GroupOfTests.HELM]}")
+ if test_group not in [GroupOfTests.HELM, GroupOfTests.SYSTEM_PROVIDERS, GroupOfTests.SYSTEM_CORE]:
args.append("--with-db-init")
args.extend(get_suspended_provider_args())
args.extend(get_excluded_provider_args(python_version))
@@ -391,18 +389,19 @@ def generate_args_for_pytest(
return args
-def convert_parallel_types_to_folders(parallel_test_types_list: list[str], skip_provider_tests: bool):
+def convert_parallel_types_to_folders(test_group: GroupOfTests, parallel_test_types_list: list[str]):
args = []
for _test_type in parallel_test_types_list:
args.extend(
convert_test_type_to_pytest_args(
+ test_group=test_group,
test_type=_test_type,
- skip_provider_tests=skip_provider_tests,
- helm_test_package=None,
)
)
# leave only folders, strip --pytest-args that exclude some folders with `-' prefix
- folders = [arg for arg in args if arg.startswith("test") or arg.startswith("providers/tests")]
+ folders = [
+ arg for arg in args if any(arg.startswith(prefix) for prefix in TEST_GROUP_TO_TEST_FOLDER.values())
+ ]
# remove specific provider sub-folders if "providers/tests" is already in the list
# This workarounds pytest issues where it will only run tests from specific subfolders
# if both parent and child folders are in the list
diff --git a/dev/breeze/src/airflow_breeze/utils/selective_checks.py b/dev/breeze/src/airflow_breeze/utils/selective_checks.py
index 079d4326a8812..162762a12a6bc 100644
--- a/dev/breeze/src/airflow_breeze/utils/selective_checks.py
+++ b/dev/breeze/src/airflow_breeze/utils/selective_checks.py
@@ -48,12 +48,15 @@
RUNS_ON_PUBLIC_RUNNER,
RUNS_ON_SELF_HOSTED_ASF_RUNNER,
RUNS_ON_SELF_HOSTED_RUNNER,
- TESTABLE_INTEGRATIONS,
+ TESTABLE_CORE_INTEGRATIONS,
+ TESTABLE_PROVIDERS_INTEGRATIONS,
GithubEvents,
- SelectiveUnitTestTypes,
+ SelectiveCoreTestType,
+ SelectiveProvidersTestType,
+ SelectiveTaskSdkTestType,
all_helm_test_packages,
- all_selective_test_types,
- all_selective_test_types_except_providers,
+ all_selective_core_test_types,
+ providers_test_type,
)
from airflow_breeze.utils.console import get_console
from airflow_breeze.utils.exclude_from_matrix import excluded_combos
@@ -85,17 +88,8 @@
USE_PUBLIC_RUNNERS_LABEL = "use public runners"
USE_SELF_HOSTED_RUNNERS_LABEL = "use self-hosted runners"
-ALL_CI_SELECTIVE_TEST_TYPES = (
- "API Always BranchExternalPython BranchPythonVenv "
- "CLI Core ExternalPython Operators Other PlainAsserts "
- "Providers[-amazon,google] Providers[amazon] Providers[google] "
- "PythonVenv Serialization WWW"
-)
+ALL_CI_SELECTIVE_TEST_TYPES = "API Always CLI Core Operators Other Serialization WWW"
-ALL_CI_SELECTIVE_TEST_TYPES_WITHOUT_PROVIDERS = (
- "API Always BranchExternalPython BranchPythonVenv CLI Core "
- "ExternalPython Operators Other PlainAsserts PythonVenv Serialization WWW"
-)
ALL_PROVIDERS_SELECTIVE_TEST_TYPES = "Providers[-amazon,google] Providers[amazon] Providers[google]"
@@ -125,7 +119,13 @@ class FileGroupForCi(Enum):
TESTS_UTILS_FILES = "test_utils_files"
-T = TypeVar("T", FileGroupForCi, SelectiveUnitTestTypes)
+class AllProvidersSentinel:
+ pass
+
+
+ALL_PROVIDERS_SENTINEL = AllProvidersSentinel()
+
+T = TypeVar("T", FileGroupForCi, SelectiveCoreTestType)
class HashableDict(dict[T, list[str]]):
@@ -279,7 +279,7 @@ def __hash__(self):
TEST_TYPE_MATCHES = HashableDict(
{
- SelectiveUnitTestTypes.API: [
+ SelectiveCoreTestType.API: [
r"^airflow/api/",
r"^airflow/api_connexion/",
r"^airflow/api_internal/",
@@ -289,28 +289,28 @@ def __hash__(self):
r"^tests/api_internal/",
r"^tests/api_fastapi/",
],
- SelectiveUnitTestTypes.CLI: [
+ SelectiveCoreTestType.CLI: [
r"^airflow/cli/",
r"^tests/cli/",
],
- SelectiveUnitTestTypes.OPERATORS: [
+ SelectiveCoreTestType.OPERATORS: [
r"^airflow/operators/",
r"^tests/operators/",
],
- SelectiveUnitTestTypes.PROVIDERS: [
+ SelectiveProvidersTestType.PROVIDERS: [
r"^providers/src/airflow/providers/",
r"^providers/tests/system/",
r"^providers/tests/",
],
- SelectiveUnitTestTypes.SERIALIZATION: [
+ SelectiveTaskSdkTestType.TASK_SDK: [
+ r"^task_sdk/src/",
+ r"^task_sdk/tests/",
+ ],
+ SelectiveCoreTestType.SERIALIZATION: [
r"^airflow/serialization/",
r"^tests/serialization/",
],
- SelectiveUnitTestTypes.PYTHON_VENV: PYTHON_OPERATOR_FILES,
- SelectiveUnitTestTypes.BRANCH_PYTHON_VENV: PYTHON_OPERATOR_FILES,
- SelectiveUnitTestTypes.EXTERNAL_PYTHON: PYTHON_OPERATOR_FILES,
- SelectiveUnitTestTypes.EXTERNAL_BRANCH_PYTHON: PYTHON_OPERATOR_FILES,
- SelectiveUnitTestTypes.WWW: [r"^airflow/www", r"^tests/www"],
+ SelectiveCoreTestType.WWW: [r"^airflow/www", r"^tests/www"],
}
)
@@ -708,11 +708,11 @@ def run_www_tests(self) -> bool:
@cached_property
def run_amazon_tests(self) -> bool:
- if self.parallel_test_types_list_as_string is None:
+ if self.providers_test_types_list_as_string is None:
return False
return (
- "amazon" in self.parallel_test_types_list_as_string
- or "Providers" in self.parallel_test_types_list_as_string.split(" ")
+ "amazon" in self.providers_test_types_list_as_string
+ or "Providers" in self.providers_test_types_list_as_string.split(" ")
)
@cached_property
@@ -733,6 +733,8 @@ def needs_helm_tests(self) -> bool:
@cached_property
def run_tests(self) -> bool:
+ if self.only_new_ui_files:
+ return False
# we should run all test
return self._should_be_run(FileGroupForCi.ALL_SOURCE_FILES)
@@ -754,7 +756,7 @@ def prod_image_build(self) -> bool:
return self.run_kubernetes_tests or self.needs_helm_tests
def _select_test_type_if_matching(
- self, test_types: set[str], test_type: SelectiveUnitTestTypes
+ self, test_types: set[str], test_type: SelectiveCoreTestType
) -> list[str]:
matched_files = self._matching_files(test_type, TEST_TYPE_MATCHES, TEST_TYPE_EXCLUDES)
count = len(matched_files)
@@ -766,23 +768,22 @@ def _select_test_type_if_matching(
def _are_all_providers_affected(self) -> bool:
# if "Providers" test is present in the list of tests, it means that we should run all providers tests
# prepare all providers packages and build all providers documentation
- return "Providers" in self._get_test_types_to_run()
+ return "Providers" in self._get_providers_test_types_to_run()
def _fail_if_suspended_providers_affected(self) -> bool:
return "allow suspended provider changes" not in self._pr_labels
- def _get_test_types_to_run(self, split_to_individual_providers: bool = False) -> list[str]:
+ def _get_core_test_types_to_run(self) -> list[str]:
if self.full_tests_needed:
- return list(all_selective_test_types())
+ return list(all_selective_core_test_types())
candidate_test_types: set[str] = {"Always"}
matched_files: set[str] = set()
- for test_type in SelectiveUnitTestTypes:
+ for test_type in SelectiveCoreTestType:
if test_type not in [
- SelectiveUnitTestTypes.ALWAYS,
- SelectiveUnitTestTypes.CORE,
- SelectiveUnitTestTypes.OTHER,
- SelectiveUnitTestTypes.PLAIN_ASSERTS,
+ SelectiveCoreTestType.ALWAYS,
+ SelectiveCoreTestType.CORE,
+ SelectiveCoreTestType.OTHER,
]:
matched_files.update(self._select_test_type_if_matching(candidate_test_types, test_type))
@@ -795,6 +796,9 @@ def _get_test_types_to_run(self, split_to_individual_providers: bool = False) ->
all_source_files = self._matching_files(
FileGroupForCi.ALL_SOURCE_FILES, CI_FILE_GROUP_MATCHES, CI_FILE_GROUP_EXCLUDES
)
+ all_providers_source_files = self._matching_files(
+ FileGroupForCi.ALL_PROVIDERS_PYTHON_FILES, CI_FILE_GROUP_MATCHES, CI_FILE_GROUP_EXCLUDES
+ )
test_always_files = self._matching_files(
FileGroupForCi.ALWAYS_TESTS_FILES, CI_FILE_GROUP_MATCHES, CI_FILE_GROUP_EXCLUDES
)
@@ -804,6 +808,7 @@ def _get_test_types_to_run(self, split_to_individual_providers: bool = False) ->
remaining_files = (
set(all_source_files)
+ - set(all_providers_source_files)
- set(matched_files)
- set(kubernetes_files)
- set(system_test_files)
@@ -825,25 +830,8 @@ def _get_test_types_to_run(self, split_to_individual_providers: bool = False) ->
f"into Core/Other category[/]"
)
get_console().print(remaining_files)
- if self.run_task_sdk_tests:
- candidate_test_types.add("PythonVenv")
- candidate_test_types.update(all_selective_test_types_except_providers())
+ candidate_test_types.update(all_selective_core_test_types())
else:
- if "Providers" in candidate_test_types or "API" in candidate_test_types:
- affected_providers = self._find_all_providers_affected(
- include_docs=False,
- )
- if affected_providers != "ALL_PROVIDERS" and affected_providers is not None:
- candidate_test_types.discard("Providers")
- if split_to_individual_providers:
- for provider in affected_providers:
- candidate_test_types.add(f"Providers[{provider}]")
- else:
- candidate_test_types.add(f"Providers[{','.join(sorted(affected_providers))}]")
- elif split_to_individual_providers and "Providers" in candidate_test_types:
- candidate_test_types.discard("Providers")
- for provider in get_available_packages():
- candidate_test_types.add(f"Providers[{provider}]")
get_console().print(
"[warning]There are no core/other files. Only tests relevant to the changed files are run.[/]"
)
@@ -853,6 +841,42 @@ def _get_test_types_to_run(self, split_to_individual_providers: bool = False) ->
get_console().print(sorted_candidate_test_types)
return sorted_candidate_test_types
+ def _get_providers_test_types_to_run(self, split_to_individual_providers: bool = False) -> list[str]:
+ if self._default_branch != "main":
+ return []
+ affected_providers: AllProvidersSentinel | list[str] | None = ALL_PROVIDERS_SENTINEL
+ if self.full_tests_needed:
+ if split_to_individual_providers:
+ return list(providers_test_type())
+ else:
+ return ["Providers"]
+ else:
+ all_providers_source_files = self._matching_files(
+ FileGroupForCi.ALL_PROVIDERS_PYTHON_FILES, CI_FILE_GROUP_MATCHES, CI_FILE_GROUP_EXCLUDES
+ )
+ if len(all_providers_source_files) == 0 and not self.needs_api_tests:
+ # IF API tests are needed, that will trigger extra provider checks
+ return []
+ else:
+ affected_providers = self._find_all_providers_affected(
+ include_docs=False,
+ )
+ candidate_test_types: set[str] = set()
+ if affected_providers and not isinstance(affected_providers, AllProvidersSentinel):
+ if split_to_individual_providers:
+ for provider in affected_providers:
+ candidate_test_types.add(f"Providers[{provider}]")
+ else:
+ candidate_test_types.add(f"Providers[{','.join(sorted(affected_providers))}]")
+ elif split_to_individual_providers:
+ candidate_test_types.discard("Providers")
+ for provider in get_available_packages():
+ candidate_test_types.add(f"Providers[{provider}]")
+ sorted_candidate_test_types = sorted(candidate_test_types)
+ get_console().print("[warning]Selected test type candidates to run:[/]")
+ get_console().print(sorted_candidate_test_types)
+ return sorted_candidate_test_types
+
@staticmethod
def _extract_long_provider_tests(current_test_types: set[str]):
"""
@@ -884,10 +908,17 @@ def _extract_long_provider_tests(current_test_types: set[str]):
current_test_types.add(f"Providers[{','.join(provider_tests_to_run)}]")
@cached_property
- def parallel_test_types_list_as_string(self) -> str | None:
+ def core_test_types_list_as_string(self) -> str | None:
if not self.run_tests:
return None
- current_test_types = set(self._get_test_types_to_run())
+ current_test_types = set(self._get_core_test_types_to_run())
+ return " ".join(sorted(current_test_types))
+
+ @cached_property
+ def providers_test_types_list_as_string(self) -> str | None:
+ if not self.run_tests:
+ return None
+ current_test_types = set(self._get_providers_test_types_to_run())
if self._default_branch != "main":
test_types_to_remove: set[str] = set()
for test_type in current_test_types:
@@ -898,33 +929,19 @@ def parallel_test_types_list_as_string(self) -> str | None:
)
test_types_to_remove.add(test_type)
current_test_types = current_test_types - test_types_to_remove
-
self._extract_long_provider_tests(current_test_types)
return " ".join(sorted(current_test_types))
@cached_property
- def providers_test_types_list_as_string(self) -> str | None:
- all_test_types = self.parallel_test_types_list_as_string
- if all_test_types is None:
- return None
- return " ".join(
- test_type for test_type in all_test_types.split(" ") if test_type.startswith("Providers")
- )
-
- @cached_property
- def separate_test_types_list_as_string(self) -> str | None:
+ def individual_providers_test_types_list_as_string(self) -> str | None:
if not self.run_tests:
return None
- current_test_types = set(self._get_test_types_to_run(split_to_individual_providers=True))
+ current_test_types = set(self._get_providers_test_types_to_run(split_to_individual_providers=True))
if "Providers" in current_test_types:
current_test_types.remove("Providers")
current_test_types.update(
{f"Providers[{provider}]" for provider in get_available_packages(include_not_ready=True)}
)
- if self.skip_provider_tests:
- current_test_types = {
- test_type for test_type in current_test_types if not test_type.startswith("Providers")
- }
return " ".join(sorted(current_test_types))
@cached_property
@@ -1054,7 +1071,7 @@ def docs_list_as_string(self) -> str | None:
include_docs=True,
)
if (
- providers_affected == "ALL_PROVIDERS"
+ isinstance(providers_affected, AllProvidersSentinel)
or "docs/conf.py" in self._files
or "docs/build_docs.py" in self._files
or self._are_all_providers_affected()
@@ -1144,10 +1161,20 @@ def skip_provider_tests(self) -> bool:
return True
if self.full_tests_needed:
return False
- if any(test_type.startswith("Providers") for test_type in self._get_test_types_to_run()):
+ if self._get_providers_test_types_to_run():
return False
return True
+ @cached_property
+ def test_groups(self):
+ if self.skip_provider_tests:
+ if self.run_tests:
+ return "['core']"
+ else:
+ if self.run_tests:
+ return "['core', 'providers']"
+ return "[]"
+
@cached_property
def docker_cache(self) -> str:
return (
@@ -1169,17 +1196,18 @@ def helm_test_packages(self) -> str:
return json.dumps(all_helm_test_packages())
@cached_property
- def affected_providers_list_as_string(self) -> str | None:
- _ALL_PROVIDERS_LIST = ""
+ def selected_providers_list_as_string(self) -> str | None:
+ if self._default_branch != "main":
+ return None
if self.full_tests_needed:
- return _ALL_PROVIDERS_LIST
+ return ""
if self._are_all_providers_affected():
- return _ALL_PROVIDERS_LIST
+ return ""
affected_providers = self._find_all_providers_affected(include_docs=True)
if not affected_providers:
return None
- if affected_providers == "ALL_PROVIDERS":
- return _ALL_PROVIDERS_LIST
+ if isinstance(affected_providers, AllProvidersSentinel):
+ return ""
return " ".join(sorted(affected_providers))
@cached_property
@@ -1363,13 +1391,24 @@ def only_new_ui_files(self) -> bool:
return False
@cached_property
- def testable_integrations(self) -> list[str]:
- if self.only_new_ui_files:
+ def testable_core_integrations(self) -> list[str]:
+ if not self.run_tests:
+ return []
+ else:
+ return [
+ integration
+ for integration in TESTABLE_CORE_INTEGRATIONS
+ if integration not in DISABLE_TESTABLE_INTEGRATIONS_FROM_CI
+ ]
+
+ @cached_property
+ def testable_providers_integrations(self) -> list[str]:
+ if not self.run_tests:
return []
else:
return [
integration
- for integration in TESTABLE_INTEGRATIONS
+ for integration in TESTABLE_PROVIDERS_INTEGRATIONS
if integration not in DISABLE_TESTABLE_INTEGRATIONS_FROM_CI
]
@@ -1379,7 +1418,7 @@ def is_committer_build(self):
return False
return self._github_actor in COMMITTERS
- def _find_all_providers_affected(self, include_docs: bool) -> list[str] | str | None:
+ def _find_all_providers_affected(self, include_docs: bool) -> list[str] | AllProvidersSentinel | None:
all_providers: set[str] = set()
all_providers_affected = False
@@ -1396,7 +1435,7 @@ def _find_all_providers_affected(self, include_docs: bool) -> list[str] | str |
if self.needs_api_tests:
all_providers.add("fab")
if all_providers_affected:
- return "ALL_PROVIDERS"
+ return ALL_PROVIDERS_SENTINEL
if suspended_providers:
# We check for suspended providers only after we have checked if all providers are affected.
# No matter if we found that we are modifying a suspended provider individually,
diff --git a/dev/breeze/tests/test_pytest_args_for_test_types.py b/dev/breeze/tests/test_pytest_args_for_test_types.py
index d4e61b08c6044..d223d7fdf711d 100644
--- a/dev/breeze/tests/test_pytest_args_for_test_types.py
+++ b/dev/breeze/tests/test_pytest_args_for_test_types.py
@@ -18,14 +18,16 @@
import pytest
+from airflow_breeze.global_constants import GroupOfTests
from airflow_breeze.utils.run_tests import convert_parallel_types_to_folders, convert_test_type_to_pytest_args
@pytest.mark.parametrize(
- "test_type, pytest_args, skip_provider_tests",
+ "test_group, test_type, pytest_args",
[
# Those list needs to be updated every time we add a new directory to tests/ folder
(
+ GroupOfTests.CORE,
"Core",
[
"tests/core",
@@ -35,68 +37,54 @@
"tests/ti_deps",
"tests/utils",
],
- False,
),
(
- "Integration",
- ["tests/integration"],
- False,
+ GroupOfTests.INTEGRATION_PROVIDERS,
+ "All",
+ ["providers/tests/integration"],
),
(
- "Integration",
- [
- "tests/integration/cli",
- "tests/integration/executors",
- "tests/integration/security",
- ],
- True,
+ GroupOfTests.INTEGRATION_CORE,
+ "All",
+ ["tests/integration"],
),
(
+ GroupOfTests.CORE,
"API",
["tests/api", "tests/api_connexion", "tests/api_internal", "tests/api_fastapi"],
- False,
),
(
+ GroupOfTests.CORE,
"Serialization",
["tests/serialization"],
- False,
- ),
- (
- "System",
- [],
- False,
),
(
+ GroupOfTests.CORE,
"Operators",
- ["tests/operators", "--exclude-virtualenv-operator", "--exclude-external-python-operator"],
- False,
+ ["tests/operators"],
),
(
+ GroupOfTests.PROVIDERS,
"Providers",
["providers/tests"],
- False,
- ),
- (
- "Providers",
- [],
- True,
),
(
+ GroupOfTests.PROVIDERS,
"Providers[amazon]",
["providers/tests/amazon"],
- False,
),
(
+ GroupOfTests.PROVIDERS,
"Providers[common.io]",
["providers/tests/common/io"],
- False,
),
(
+ GroupOfTests.PROVIDERS,
"Providers[amazon,google,apache.hive]",
["providers/tests/amazon", "providers/tests/google", "providers/tests/apache/hive"],
- False,
),
(
+ GroupOfTests.PROVIDERS,
"Providers[-amazon,google,microsoft.azure]",
[
"providers/tests",
@@ -104,50 +92,19 @@
"--ignore=providers/tests/google",
"--ignore=providers/tests/microsoft/azure",
],
- False,
- ),
- (
- "PlainAsserts",
- [
- "providers/tests/standard/operators/test_python.py::TestPythonVirtualenvOperator::test_airflow_context",
- "--assert=plain",
- ],
- False,
),
(
+ GroupOfTests.CORE,
"All-Quarantined",
["tests", "-m", "quarantined", "--include-quarantined"],
- False,
- ),
- (
- "PythonVenv",
- [
- "providers/tests/standard/operators/test_python.py::TestPythonVirtualenvOperator",
- ],
- False,
),
(
- "BranchPythonVenv",
- [
- "providers/tests/standard/operators/test_python.py::TestBranchPythonVirtualenvOperator",
- ],
- False,
- ),
- (
- "ExternalPython",
- [
- "providers/tests/standard/operators/test_python.py::TestExternalPythonOperator",
- ],
- False,
- ),
- (
- "BranchExternalPython",
- [
- "providers/tests/standard/operators/test_python.py::TestBranchExternalPythonOperator",
- ],
- False,
+ GroupOfTests.PROVIDERS,
+ "All-Quarantined",
+ ["providers/tests", "-m", "quarantined", "--include-quarantined"],
),
(
+ GroupOfTests.CORE,
"Other",
[
"tests/assets",
@@ -174,19 +131,28 @@
"tests/timetables",
"tests/triggers",
],
- False,
+ ),
+ (
+ GroupOfTests.HELM,
+ "All",
+ ["helm_tests"],
+ ),
+ (
+ GroupOfTests.HELM,
+ "airflow_aux",
+ ["helm_tests/airflow_aux"],
),
],
)
def test_pytest_args_for_regular_test_types(
+ test_group: GroupOfTests,
test_type: str,
pytest_args: list[str],
- skip_provider_tests: bool,
):
assert (
convert_test_type_to_pytest_args(
+ test_group=test_group,
test_type=test_type,
- skip_provider_tests=skip_provider_tests,
)
== pytest_args
)
@@ -195,55 +161,28 @@ def test_pytest_args_for_regular_test_types(
def test_pytest_args_for_missing_provider():
with pytest.raises(SystemExit):
convert_test_type_to_pytest_args(
+ test_group=GroupOfTests.PROVIDERS,
test_type="Providers[missing.provider]",
- skip_provider_tests=False,
)
@pytest.mark.parametrize(
- "helm_test_package, pytest_args",
- [
- (
- None,
- ["helm_tests"],
- ),
- (
- "airflow_aux",
- ["helm_tests/airflow_aux"],
- ),
- (
- "all",
- ["helm_tests"],
- ),
- ],
-)
-def test_pytest_args_for_helm_test_types(helm_test_package: str, pytest_args: list[str]):
- assert (
- convert_test_type_to_pytest_args(
- test_type="Helm",
- skip_provider_tests=False,
- helm_test_package=helm_test_package,
- )
- == pytest_args
- )
-
-
-@pytest.mark.parametrize(
- "parallel_test_types, folders, skip_provider_tests",
+ "test_group, parallel_test_types, folders",
[
(
+ GroupOfTests.CORE,
"API",
["tests/api", "tests/api_connexion", "tests/api_internal", "tests/api_fastapi"],
- False,
),
(
+ GroupOfTests.CORE,
"CLI",
[
"tests/cli",
],
- False,
),
(
+ GroupOfTests.CORE,
"API CLI",
[
"tests/api",
@@ -252,100 +191,152 @@ def test_pytest_args_for_helm_test_types(helm_test_package: str, pytest_args: li
"tests/api_fastapi",
"tests/cli",
],
- False,
),
(
+ GroupOfTests.CORE,
"Core",
["tests/core", "tests/executors", "tests/jobs", "tests/models", "tests/ti_deps", "tests/utils"],
- False,
),
(
- "Core Providers",
+ GroupOfTests.PROVIDERS,
+ "Providers",
[
- "tests/core",
- "tests/executors",
- "tests/jobs",
- "tests/models",
- "tests/ti_deps",
- "tests/utils",
"providers/tests",
],
- False,
),
(
- "Core Providers[amazon]",
+ GroupOfTests.PROVIDERS,
+ "Providers[amazon]",
[
- "tests/core",
- "tests/executors",
- "tests/jobs",
- "tests/models",
- "tests/ti_deps",
- "tests/utils",
"providers/tests/amazon",
],
- False,
),
(
- "Core Providers[amazon] Providers[google]",
+ GroupOfTests.PROVIDERS,
+ "Providers[amazon] Providers[google]",
[
- "tests/core",
- "tests/executors",
- "tests/jobs",
- "tests/models",
- "tests/ti_deps",
- "tests/utils",
"providers/tests/amazon",
"providers/tests/google",
],
- False,
),
(
- "Core Providers[-amazon,google]",
+ GroupOfTests.PROVIDERS,
+ "Providers[-amazon,google]",
[
- "tests/core",
- "tests/executors",
- "tests/jobs",
- "tests/models",
- "tests/ti_deps",
- "tests/utils",
"providers/tests",
],
- False,
),
(
- "Core Providers[amazon] Providers[google]",
+ GroupOfTests.PROVIDERS,
+ "Providers[-amazon,google] Providers[amazon] Providers[google]",
[
- "tests/core",
- "tests/executors",
- "tests/jobs",
- "tests/models",
- "tests/ti_deps",
- "tests/utils",
+ "providers/tests",
],
- True,
),
(
- "Core Providers[-amazon,google] Providers[amazon] Providers[google]",
+ GroupOfTests.INTEGRATION_PROVIDERS,
+ "All",
[
- "tests/core",
- "tests/executors",
- "tests/jobs",
- "tests/models",
- "tests/ti_deps",
- "tests/utils",
- "providers/tests",
+ "providers/tests/integration",
+ ],
+ ),
+ (
+ GroupOfTests.HELM,
+ "All",
+ [
+ "helm_tests",
+ ],
+ ),
+ (
+ GroupOfTests.TASK_SDK,
+ "All",
+ [
+ "task_sdk/tests",
+ ],
+ ),
+ (
+ GroupOfTests.INTEGRATION_CORE,
+ "All",
+ [
+ "tests/integration",
+ ],
+ ),
+ (
+ GroupOfTests.SYSTEM_PROVIDERS,
+ "All",
+ [
+ "providers/tests/system",
+ ],
+ ),
+ (
+ GroupOfTests.SYSTEM_CORE,
+ "All",
+ [
+ "tests/system",
],
- False,
),
],
)
def test_folders_for_parallel_test_types(
- parallel_test_types: str, folders: list[str], skip_provider_tests: bool
+ test_group: GroupOfTests, parallel_test_types: str, folders: list[str]
):
assert (
convert_parallel_types_to_folders(
+ test_group=test_group,
parallel_test_types_list=parallel_test_types.split(" "),
- skip_provider_tests=skip_provider_tests,
)
== folders
)
+
+
+@pytest.mark.parametrize(
+ "test_group, parallel_test_types",
+ [
+ (
+ GroupOfTests.CORE,
+ "Providers",
+ ),
+ (
+ GroupOfTests.CORE,
+ "Helm",
+ ),
+ (
+ GroupOfTests.PROVIDERS,
+ "API CLI",
+ ),
+ (
+ GroupOfTests.PROVIDERS,
+ "API CLI Providers",
+ ),
+ (
+ GroupOfTests.HELM,
+ "API",
+ ),
+ (
+ GroupOfTests.HELM,
+ "Providers",
+ ),
+ (
+ GroupOfTests.INTEGRATION_PROVIDERS,
+ "API",
+ ),
+ (
+ GroupOfTests.INTEGRATION_CORE,
+ "WWW",
+ ),
+ (
+ GroupOfTests.SYSTEM_PROVIDERS,
+ "Providers",
+ ),
+ (
+ GroupOfTests.SYSTEM_CORE,
+ "CLI",
+ ),
+ ],
+)
+def test_wrong_folders_for_parallel_test_types(test_group: GroupOfTests, parallel_test_types: str):
+ with pytest.raises(SystemExit):
+ convert_parallel_types_to_folders(
+ test_group=test_group,
+ parallel_test_types_list=parallel_test_types.split(" "),
+ )
diff --git a/dev/breeze/tests/test_run_test_args.py b/dev/breeze/tests/test_run_test_args.py
index a2a2b4f4cf471..43e68be7617ee 100644
--- a/dev/breeze/tests/test_run_test_args.py
+++ b/dev/breeze/tests/test_run_test_args.py
@@ -22,6 +22,7 @@
import pytest
from airflow_breeze.commands.testing_commands import _run_test
+from airflow_breeze.global_constants import GroupOfTests
from airflow_breeze.params.shell_params import ShellParams
@@ -74,7 +75,7 @@ def test_irregular_provider_with_extra_ignore_should_be_valid_cmd(mock_run_comma
mock_to_train.return_value = [fake_provider_name]
_run_test(
- shell_params=ShellParams(test_type="Providers"),
+ shell_params=ShellParams(test_group=GroupOfTests.PROVIDERS, test_type="Providers"),
extra_pytest_args=(f"--ignore=providers/tests/{fake_provider_name}",),
python_version="3.9",
output=None,
@@ -103,7 +104,10 @@ def test_primary_test_arg_is_excluded_by_extra_pytest_arg(mock_run_command):
test_provider = "http" # "Providers[]" scans the source tree so we need to use a real provider id
test_provider_not_skipped = "ftp"
_run_test(
- shell_params=ShellParams(test_type=f"Providers[{test_provider},{test_provider_not_skipped}]"),
+ shell_params=ShellParams(
+ test_group=GroupOfTests.PROVIDERS,
+ test_type=f"Providers[{test_provider},{test_provider_not_skipped}]",
+ ),
extra_pytest_args=(f"--ignore=providers/tests/{test_provider}",),
python_version="3.9",
output=None,
@@ -134,8 +138,10 @@ def test_test_is_skipped_if_all_are_ignored(mock_run_command):
"ftp",
] # "Providers[]" scans the source tree so we need to use a real provider id
_run_test(
- shell_params=ShellParams(test_type=f"Providers[{','.join(test_providers)}]"),
- extra_pytest_args=[f"--ignore=providers/tests/{provider}" for provider in test_providers],
+ shell_params=ShellParams(
+ test_group=GroupOfTests.PROVIDERS, test_type=f"Providers[{','.join(test_providers)}]"
+ ),
+ extra_pytest_args=tuple(f"--ignore=providers/tests/{provider}" for provider in test_providers),
python_version="3.9",
output=None,
test_timeout=60,
diff --git a/dev/breeze/tests/test_selective_checks.py b/dev/breeze/tests/test_selective_checks.py
index cafce521ce80a..d385c597184f9 100644
--- a/dev/breeze/tests/test_selective_checks.py
+++ b/dev/breeze/tests/test_selective_checks.py
@@ -33,7 +33,6 @@
from airflow_breeze.utils.packages import get_available_packages
from airflow_breeze.utils.selective_checks import (
ALL_CI_SELECTIVE_TEST_TYPES,
- ALL_CI_SELECTIVE_TEST_TYPES_WITHOUT_PROVIDERS,
ALL_PROVIDERS_SELECTIVE_TEST_TYPES,
SelectiveChecks,
)
@@ -113,7 +112,7 @@ def assert_outputs_are_printed(expected_outputs: dict[str, str], stderr: str):
pytest.param(
("INTHEWILD.md",),
{
- "affected-providers-list-as-string": None,
+ "selected-providers-list-as-string": None,
"all-python-versions": "['3.9']",
"all-python-versions-list-as-string": "3.9",
"python-versions": "['3.9']",
@@ -126,9 +125,9 @@ def assert_outputs_are_printed(expected_outputs: dict[str, str], stderr: str):
"skip-pre-commits": "check-provider-yaml-valid,flynt,identity,lint-helm-chart,mypy-airflow,mypy-dev,"
"mypy-docs,mypy-providers,mypy-task-sdk,ts-compile-format-lint-ui,ts-compile-format-lint-www",
"upgrade-to-newer-dependencies": "false",
- "parallel-test-types-list-as-string": None,
+ "core-test-types-list-as-string": None,
"providers-test-types-list-as-string": None,
- "separate-test-types-list-as-string": None,
+ "individual-providers-test-types-list-as-string": None,
"needs-mypy": "false",
"mypy-checks": "[]",
},
@@ -148,7 +147,7 @@ def assert_outputs_are_printed(expected_outputs: dict[str, str], stderr: str):
pytest.param(
("airflow/api/file.py",),
{
- "affected-providers-list-as-string": "common.compat fab",
+ "selected-providers-list-as-string": "common.compat fab",
"all-python-versions": "['3.9']",
"all-python-versions-list-as-string": "3.9",
"python-versions": "['3.9']",
@@ -162,9 +161,11 @@ def assert_outputs_are_printed(expected_outputs: dict[str, str], stderr: str):
"skip-pre-commits": "check-provider-yaml-valid,identity,lint-helm-chart,mypy-airflow,mypy-dev,"
"mypy-docs,mypy-providers,mypy-task-sdk,ts-compile-format-lint-ui,ts-compile-format-lint-www",
"upgrade-to-newer-dependencies": "false",
- "parallel-test-types-list-as-string": "API Always Providers[common.compat,fab]",
+ "core-test-types-list-as-string": "API Always",
"providers-test-types-list-as-string": "Providers[common.compat,fab]",
- "separate-test-types-list-as-string": "API Always Providers[common.compat] Providers[fab]",
+ "individual-providers-test-types-list-as-string": "Providers[common.compat] Providers[fab]",
+ "testable-core-integrations": "['celery', 'kerberos']",
+ "testable-providers-integrations": "['cassandra', 'drill', 'kafka', 'mongo', 'pinot', 'qdrant', 'redis', 'trino', 'ydb']",
"needs-mypy": "true",
"mypy-checks": "['mypy-airflow']",
},
@@ -188,8 +189,9 @@ def assert_outputs_are_printed(expected_outputs: dict[str, str], stderr: str):
"skip-pre-commits": "check-provider-yaml-valid,identity,lint-helm-chart,mypy-airflow,mypy-dev,"
"mypy-docs,mypy-providers,mypy-task-sdk,ts-compile-format-lint-ui,ts-compile-format-lint-www",
"upgrade-to-newer-dependencies": "false",
- "parallel-test-types-list-as-string": "API Always",
- "separate-test-types-list-as-string": "API Always",
+ "core-test-types-list-as-string": "API Always",
+ "providers-test-types-list-as-string": "",
+ "individual-providers-test-types-list-as-string": "",
"needs-mypy": "true",
"mypy-checks": "['mypy-airflow']",
},
@@ -213,8 +215,9 @@ def assert_outputs_are_printed(expected_outputs: dict[str, str], stderr: str):
"skip-pre-commits": "check-provider-yaml-valid,identity,lint-helm-chart,mypy-airflow,mypy-dev,"
"mypy-docs,mypy-providers,mypy-task-sdk,ts-compile-format-lint-ui,ts-compile-format-lint-www",
"upgrade-to-newer-dependencies": "false",
- "parallel-test-types-list-as-string": "API Always",
- "separate-test-types-list-as-string": "API Always",
+ "core-test-types-list-as-string": "API Always",
+ "providers-test-types-list-as-string": "",
+ "individual-providers-test-types-list-as-string": "",
"needs-mypy": "true",
"mypy-checks": "['mypy-airflow']",
},
@@ -238,8 +241,9 @@ def assert_outputs_are_printed(expected_outputs: dict[str, str], stderr: str):
"skip-pre-commits": "check-provider-yaml-valid,identity,lint-helm-chart,mypy-airflow,mypy-dev,"
"mypy-docs,mypy-providers,mypy-task-sdk,ts-compile-format-lint-ui,ts-compile-format-lint-www",
"upgrade-to-newer-dependencies": "false",
- "parallel-test-types-list-as-string": "API Always",
- "separate-test-types-list-as-string": "API Always",
+ "core-test-types-list-as-string": "API Always",
+ "providers-test-types-list-as-string": "",
+ "individual-providers-test-types-list-as-string": "",
"needs-mypy": "true",
"mypy-checks": "['mypy-airflow']",
},
@@ -250,7 +254,7 @@ def assert_outputs_are_printed(expected_outputs: dict[str, str], stderr: str):
pytest.param(
("airflow/operators/file.py",),
{
- "affected-providers-list-as-string": None,
+ "selected-providers-list-as-string": None,
"all-python-versions": "['3.9']",
"all-python-versions-list-as-string": "3.9",
"python-versions": "['3.9']",
@@ -264,9 +268,9 @@ def assert_outputs_are_printed(expected_outputs: dict[str, str], stderr: str):
"skip-pre-commits": "check-provider-yaml-valid,identity,lint-helm-chart,mypy-airflow,mypy-dev,"
"mypy-docs,mypy-providers,mypy-task-sdk,ts-compile-format-lint-ui,ts-compile-format-lint-www",
"upgrade-to-newer-dependencies": "false",
- "parallel-test-types-list-as-string": "Always Operators",
+ "core-test-types-list-as-string": "Always Operators",
"providers-test-types-list-as-string": "",
- "separate-test-types-list-as-string": "Always Operators",
+ "individual-providers-test-types-list-as-string": "",
"needs-mypy": "true",
"mypy-checks": "['mypy-airflow']",
},
@@ -277,7 +281,7 @@ def assert_outputs_are_printed(expected_outputs: dict[str, str], stderr: str):
pytest.param(
("providers/src/airflow/providers/standard/operators/python.py",),
{
- "affected-providers-list-as-string": None,
+ "selected-providers-list-as-string": None,
"all-python-versions": "['3.9']",
"all-python-versions-list-as-string": "3.9",
"python-versions": "['3.9']",
@@ -291,9 +295,9 @@ def assert_outputs_are_printed(expected_outputs: dict[str, str], stderr: str):
"skip-pre-commits": "identity,lint-helm-chart,mypy-airflow,mypy-dev,"
"mypy-docs,mypy-providers,mypy-task-sdk,ts-compile-format-lint-ui,ts-compile-format-lint-www",
"upgrade-to-newer-dependencies": "false",
- "parallel-test-types-list-as-string": "Always Providers[common.compat,standard]",
+ "core-test-types-list-as-string": "Always",
"providers-test-types-list-as-string": "Providers[common.compat,standard]",
- "separate-test-types-list-as-string": "Always Providers[common.compat] Providers[standard]",
+ "individual-providers-test-types-list-as-string": "Providers[common.compat] Providers[standard]",
"needs-mypy": "true",
"mypy-checks": "['mypy-providers']",
},
@@ -304,7 +308,7 @@ def assert_outputs_are_printed(expected_outputs: dict[str, str], stderr: str):
pytest.param(
("airflow/serialization/python.py",),
{
- "affected-providers-list-as-string": None,
+ "selected-providers-list-as-string": None,
"all-python-versions": "['3.9']",
"all-python-versions-list-as-string": "3.9",
"python-versions": "['3.9']",
@@ -318,9 +322,9 @@ def assert_outputs_are_printed(expected_outputs: dict[str, str], stderr: str):
"skip-pre-commits": "check-provider-yaml-valid,identity,lint-helm-chart,mypy-airflow,mypy-dev,"
"mypy-docs,mypy-providers,mypy-task-sdk,ts-compile-format-lint-ui,ts-compile-format-lint-www",
"upgrade-to-newer-dependencies": "false",
- "parallel-test-types-list-as-string": "Always Serialization",
+ "core-test-types-list-as-string": "Always Serialization",
"providers-test-types-list-as-string": "",
- "separate-test-types-list-as-string": "Always Serialization",
+ "individual-providers-test-types-list-as-string": "",
"needs-mypy": "true",
"mypy-checks": "['mypy-airflow']",
},
@@ -334,7 +338,7 @@ def assert_outputs_are_printed(expected_outputs: dict[str, str], stderr: str):
"providers/tests/postgres/file.py",
),
{
- "affected-providers-list-as-string": "amazon common.compat common.sql fab google openlineage "
+ "selected-providers-list-as-string": "amazon common.compat common.sql fab google openlineage "
"pgvector postgres",
"all-python-versions": "['3.9']",
"all-python-versions-list-as-string": "3.9",
@@ -349,11 +353,10 @@ def assert_outputs_are_printed(expected_outputs: dict[str, str], stderr: str):
"skip-pre-commits": "identity,lint-helm-chart,mypy-airflow,mypy-dev,mypy-docs,mypy-providers,mypy-task-sdk,"
"ts-compile-format-lint-ui,ts-compile-format-lint-www",
"upgrade-to-newer-dependencies": "false",
- "parallel-test-types-list-as-string": "API Always Providers[amazon] "
- "Providers[common.compat,common.sql,fab,openlineage,pgvector,postgres] Providers[google]",
+ "core-test-types-list-as-string": "API Always",
"providers-test-types-list-as-string": "Providers[amazon] "
"Providers[common.compat,common.sql,fab,openlineage,pgvector,postgres] Providers[google]",
- "separate-test-types-list-as-string": "API Always Providers[amazon] Providers[common.compat] Providers[common.sql] "
+ "individual-providers-test-types-list-as-string": "Providers[amazon] Providers[common.compat] Providers[common.sql] "
"Providers[fab] Providers[google] Providers[openlineage] Providers[pgvector] "
"Providers[postgres]",
"needs-mypy": "true",
@@ -366,7 +369,7 @@ def assert_outputs_are_printed(expected_outputs: dict[str, str], stderr: str):
pytest.param(
("providers/tests/apache/beam/file.py",),
{
- "affected-providers-list-as-string": "apache.beam common.compat google",
+ "selected-providers-list-as-string": "apache.beam common.compat google",
"all-python-versions": "['3.9']",
"all-python-versions-list-as-string": "3.9",
"python-versions": "['3.9']",
@@ -383,9 +386,9 @@ def assert_outputs_are_printed(expected_outputs: dict[str, str], stderr: str):
),
"run-kubernetes-tests": "false",
"upgrade-to-newer-dependencies": "false",
- "parallel-test-types-list-as-string": "Always Providers[apache.beam,common.compat] Providers[google]",
+ "core-test-types-list-as-string": "Always",
"providers-test-types-list-as-string": "Providers[apache.beam,common.compat] Providers[google]",
- "separate-test-types-list-as-string": "Always Providers[apache.beam] Providers[common.compat] Providers[google]",
+ "individual-providers-test-types-list-as-string": "Providers[apache.beam] Providers[common.compat] Providers[google]",
"needs-mypy": "true",
"mypy-checks": "['mypy-providers']",
},
@@ -396,7 +399,7 @@ def assert_outputs_are_printed(expected_outputs: dict[str, str], stderr: str):
pytest.param(
("docs/file.rst",),
{
- "affected-providers-list-as-string": None,
+ "selected-providers-list-as-string": None,
"all-python-versions": "['3.9']",
"all-python-versions-list-as-string": "3.9",
"python-versions": "['3.9']",
@@ -411,7 +414,7 @@ def assert_outputs_are_printed(expected_outputs: dict[str, str], stderr: str):
"mypy-docs,mypy-providers,mypy-task-sdk,ts-compile-format-lint-ui,ts-compile-format-lint-www",
"run-kubernetes-tests": "false",
"upgrade-to-newer-dependencies": "false",
- "parallel-test-types-list-as-string": None,
+ "core-test-types-list-as-string": None,
"providers-test-types-list-as-string": None,
"needs-mypy": "false",
"mypy-checks": "[]",
@@ -443,9 +446,8 @@ def assert_outputs_are_printed(expected_outputs: dict[str, str], stderr: str):
),
"skip-provider-tests": "true",
"upgrade-to-newer-dependencies": "false",
- "parallel-test-types-list-as-string": (
- "API Always BranchExternalPython BranchPythonVenv CLI Core ExternalPython "
- "Operators Other PlainAsserts PythonVenv Serialization WWW"
+ "core-test-types-list-as-string": (
+ "API Always CLI Core Operators Other Serialization WWW"
),
"providers-test-types-list-as-string": "",
"needs-mypy": "true",
@@ -461,7 +463,7 @@ def assert_outputs_are_printed(expected_outputs: dict[str, str], stderr: str):
"providers/tests/postgres/file.py",
),
{
- "affected-providers-list-as-string": "amazon common.sql google openlineage "
+ "selected-providers-list-as-string": "amazon common.sql google openlineage "
"pgvector postgres",
"all-python-versions": "['3.9']",
"all-python-versions-list-as-string": "3.9",
@@ -477,8 +479,7 @@ def assert_outputs_are_printed(expected_outputs: dict[str, str], stderr: str):
"ts-compile-format-lint-ui,ts-compile-format-lint-www",
"run-kubernetes-tests": "true",
"upgrade-to-newer-dependencies": "false",
- "parallel-test-types-list-as-string": "Always Providers[amazon] "
- "Providers[common.sql,openlineage,pgvector,postgres] Providers[google]",
+ "core-test-types-list-as-string": "Always",
"providers-test-types-list-as-string": "Providers[amazon] "
"Providers[common.sql,openlineage,pgvector,postgres] Providers[google]",
"needs-mypy": "true",
@@ -496,7 +497,7 @@ def assert_outputs_are_printed(expected_outputs: dict[str, str], stderr: str):
"providers/tests/http/file.py",
),
{
- "affected-providers-list-as-string": "amazon apache.livy "
+ "selected-providers-list-as-string": "amazon apache.livy "
"dbt.cloud dingding discord http",
"all-python-versions": "['3.9']",
"all-python-versions-list-as-string": "3.9",
@@ -512,10 +513,9 @@ def assert_outputs_are_printed(expected_outputs: dict[str, str], stderr: str):
"ts-compile-format-lint-ui,ts-compile-format-lint-www",
"run-kubernetes-tests": "true",
"upgrade-to-newer-dependencies": "false",
- "parallel-test-types-list-as-string": "Always "
- "Providers[amazon] Providers[apache.livy,dbt.cloud,dingding,discord,http]",
+ "core-test-types-list-as-string": "Always",
"providers-test-types-list-as-string": "Providers[amazon] Providers[apache.livy,dbt.cloud,dingding,discord,http]",
- "separate-test-types-list-as-string": "Always Providers[amazon] "
+ "individual-providers-test-types-list-as-string": "Providers[amazon] "
"Providers[apache.livy] Providers[dbt.cloud] "
"Providers[dingding] Providers[discord] Providers[http]",
"needs-mypy": "true",
@@ -533,7 +533,7 @@ def assert_outputs_are_printed(expected_outputs: dict[str, str], stderr: str):
"providers/tests/airbyte/file.py",
),
{
- "affected-providers-list-as-string": "airbyte",
+ "selected-providers-list-as-string": "airbyte",
"all-python-versions": "['3.9']",
"all-python-versions-list-as-string": "3.9",
"python-versions": "['3.9']",
@@ -548,7 +548,7 @@ def assert_outputs_are_printed(expected_outputs: dict[str, str], stderr: str):
"ts-compile-format-lint-ui,ts-compile-format-lint-www",
"run-kubernetes-tests": "true",
"upgrade-to-newer-dependencies": "false",
- "parallel-test-types-list-as-string": "Always Providers[airbyte]",
+ "core-test-types-list-as-string": "Always",
"providers-test-types-list-as-string": "Providers[airbyte]",
"needs-mypy": "true",
"mypy-checks": "['mypy-providers']",
@@ -565,7 +565,7 @@ def assert_outputs_are_printed(expected_outputs: dict[str, str], stderr: str):
"foo/other.py",
),
{
- "affected-providers-list-as-string": None,
+ "selected-providers-list-as-string": None,
"all-python-versions": "['3.9']",
"all-python-versions-list-as-string": "3.9",
"python-versions": "['3.9']",
@@ -580,7 +580,7 @@ def assert_outputs_are_printed(expected_outputs: dict[str, str], stderr: str):
"run-amazon-tests": "false",
"run-kubernetes-tests": "true",
"upgrade-to-newer-dependencies": "false",
- "parallel-test-types-list-as-string": "Always",
+ "core-test-types-list-as-string": "Always",
"providers-test-types-list-as-string": "",
"needs-mypy": "true",
"mypy-checks": "['mypy-airflow']",
@@ -593,7 +593,7 @@ def assert_outputs_are_printed(expected_outputs: dict[str, str], stderr: str):
pytest.param(
("generated/provider_dependencies.json",),
{
- "affected-providers-list-as-string": ALL_PROVIDERS_AFFECTED,
+ "selected-providers-list-as-string": ALL_PROVIDERS_AFFECTED,
"all-python-versions": "['3.9', '3.10', '3.11', '3.12']",
"all-python-versions-list-as-string": "3.9 3.10 3.11 3.12",
"python-versions": "['3.9', '3.10', '3.11', '3.12']",
@@ -607,7 +607,7 @@ def assert_outputs_are_printed(expected_outputs: dict[str, str], stderr: str):
"full-tests-needed": "true",
"skip-pre-commits": "identity,mypy-airflow,mypy-dev,mypy-docs,mypy-providers,mypy-task-sdk",
"upgrade-to-newer-dependencies": "true",
- "parallel-test-types-list-as-string": ALL_CI_SELECTIVE_TEST_TYPES,
+ "core-test-types-list-as-string": ALL_CI_SELECTIVE_TEST_TYPES,
"providers-test-types-list-as-string": ALL_PROVIDERS_SELECTIVE_TEST_TYPES,
"needs-mypy": "true",
"mypy-checks": "['mypy-airflow', 'mypy-providers', 'mypy-docs', 'mypy-dev', 'mypy-task-sdk']",
@@ -620,7 +620,7 @@ def assert_outputs_are_printed(expected_outputs: dict[str, str], stderr: str):
pytest.param(
("generated/provider_dependencies.json",),
{
- "affected-providers-list-as-string": ALL_PROVIDERS_AFFECTED,
+ "selected-providers-list-as-string": ALL_PROVIDERS_AFFECTED,
"all-python-versions": "['3.9', '3.10', '3.11', '3.12']",
"all-python-versions-list-as-string": "3.9 3.10 3.11 3.12",
"python-versions": "['3.9', '3.10', '3.11', '3.12']",
@@ -634,7 +634,7 @@ def assert_outputs_are_printed(expected_outputs: dict[str, str], stderr: str):
"full-tests-needed": "true",
"skip-pre-commits": "identity,mypy-airflow,mypy-dev,mypy-docs,mypy-providers,mypy-task-sdk",
"upgrade-to-newer-dependencies": "true",
- "parallel-test-types-list-as-string": ALL_CI_SELECTIVE_TEST_TYPES,
+ "core-test-types-list-as-string": ALL_CI_SELECTIVE_TEST_TYPES,
"providers-test-types-list-as-string": ALL_PROVIDERS_SELECTIVE_TEST_TYPES,
"needs-mypy": "true",
"mypy-checks": "['mypy-airflow', 'mypy-providers', 'mypy-docs', 'mypy-dev', 'mypy-task-sdk']",
@@ -645,7 +645,7 @@ def assert_outputs_are_printed(expected_outputs: dict[str, str], stderr: str):
pytest.param(
("providers/src/airflow/providers/amazon/__init__.py",),
{
- "affected-providers-list-as-string": "amazon apache.hive cncf.kubernetes "
+ "selected-providers-list-as-string": "amazon apache.hive cncf.kubernetes "
"common.compat common.sql exasol ftp google http imap microsoft.azure "
"mongo mysql openlineage postgres salesforce ssh teradata",
"all-python-versions": "['3.9']",
@@ -662,7 +662,8 @@ def assert_outputs_are_printed(expected_outputs: dict[str, str], stderr: str):
"run-kubernetes-tests": "false",
"upgrade-to-newer-dependencies": "false",
"run-amazon-tests": "true",
- "parallel-test-types-list-as-string": "Always Providers[amazon] Providers[apache.hive,cncf.kubernetes,common.compat,common.sql,exasol,ftp,http,imap,microsoft.azure,mongo,mysql,openlineage,postgres,salesforce,ssh,teradata] Providers[google]",
+ "core-test-types-list-as-string": "Always",
+ "providers-test-types-list-as-string": "Providers[amazon] Providers[apache.hive,cncf.kubernetes,common.compat,common.sql,exasol,ftp,http,imap,microsoft.azure,mongo,mysql,openlineage,postgres,salesforce,ssh,teradata] Providers[google]",
"needs-mypy": "true",
"mypy-checks": "['mypy-providers']",
},
@@ -671,7 +672,7 @@ def assert_outputs_are_printed(expected_outputs: dict[str, str], stderr: str):
pytest.param(
("providers/tests/airbyte/__init__.py",),
{
- "affected-providers-list-as-string": "airbyte",
+ "selected-providers-list-as-string": "airbyte",
"all-python-versions": "['3.9']",
"all-python-versions-list-as-string": "3.9",
"python-versions": "['3.9']",
@@ -686,7 +687,8 @@ def assert_outputs_are_printed(expected_outputs: dict[str, str], stderr: str):
"ts-compile-format-lint-ui,ts-compile-format-lint-www",
"run-kubernetes-tests": "false",
"upgrade-to-newer-dependencies": "false",
- "parallel-test-types-list-as-string": "Always Providers[airbyte]",
+ "core-test-types-list-as-string": "Always",
+ "providers-test-types-list-as-string": "Providers[airbyte]",
"needs-mypy": "true",
"mypy-checks": "['mypy-providers']",
},
@@ -695,7 +697,7 @@ def assert_outputs_are_printed(expected_outputs: dict[str, str], stderr: str):
pytest.param(
("providers/src/airflow/providers/amazon/file.py",),
{
- "affected-providers-list-as-string": "amazon apache.hive cncf.kubernetes "
+ "selected-providers-list-as-string": "amazon apache.hive cncf.kubernetes "
"common.compat common.sql exasol ftp google http imap microsoft.azure "
"mongo mysql openlineage postgres salesforce ssh teradata",
"all-python-versions": "['3.9']",
@@ -712,7 +714,8 @@ def assert_outputs_are_printed(expected_outputs: dict[str, str], stderr: str):
"ts-compile-format-lint-ui,ts-compile-format-lint-www",
"run-kubernetes-tests": "false",
"upgrade-to-newer-dependencies": "false",
- "parallel-test-types-list-as-string": "Always Providers[amazon] Providers[apache.hive,cncf.kubernetes,common.compat,common.sql,exasol,ftp,http,imap,microsoft.azure,mongo,mysql,openlineage,postgres,salesforce,ssh,teradata] Providers[google]",
+ "core-test-types-list-as-string": "Always",
+ "providers-test-types-list-as-string": "Providers[amazon] Providers[apache.hive,cncf.kubernetes,common.compat,common.sql,exasol,ftp,http,imap,microsoft.azure,mongo,mysql,openlineage,postgres,salesforce,ssh,teradata] Providers[google]",
"needs-mypy": "true",
"mypy-checks": "['mypy-providers']",
},
@@ -725,7 +728,7 @@ def assert_outputs_are_printed(expected_outputs: dict[str, str], stderr: str):
"providers/tests/common/io/operators/test_file_transfer.py",
),
{
- "affected-providers-list-as-string": "common.compat common.io openlineage",
+ "selected-providers-list-as-string": "common.compat common.io openlineage",
"all-python-versions": "['3.9']",
"all-python-versions-list-as-string": "3.9",
"python-versions": "['3.9']",
@@ -740,7 +743,8 @@ def assert_outputs_are_printed(expected_outputs: dict[str, str], stderr: str):
"skip-pre-commits": "identity,lint-helm-chart,mypy-airflow,mypy-dev,mypy-docs,mypy-providers,mypy-task-sdk,"
"ts-compile-format-lint-ui,ts-compile-format-lint-www",
"upgrade-to-newer-dependencies": "false",
- "parallel-test-types-list-as-string": "Always Providers[common.compat,common.io,openlineage]",
+ "core-test-types-list-as-string": "Always",
+ "providers-test-types-list-as-string": "Providers[common.compat,common.io,openlineage]",
"needs-mypy": "true",
"mypy-checks": "['mypy-airflow', 'mypy-providers']",
},
@@ -749,7 +753,7 @@ def assert_outputs_are_printed(expected_outputs: dict[str, str], stderr: str):
pytest.param(
("providers/src/airflow/providers/standard/operators/bash.py",),
{
- "affected-providers-list-as-string": "common.compat standard",
+ "selected-providers-list-as-string": "common.compat standard",
"all-python-versions": "['3.9']",
"all-python-versions-list-as-string": "3.9",
"python-versions": "['3.9']",
@@ -764,7 +768,8 @@ def assert_outputs_are_printed(expected_outputs: dict[str, str], stderr: str):
"skip-pre-commits": "identity,lint-helm-chart,mypy-airflow,mypy-dev,mypy-docs,mypy-providers,mypy-task-sdk,"
"ts-compile-format-lint-ui,ts-compile-format-lint-www",
"upgrade-to-newer-dependencies": "false",
- "parallel-test-types-list-as-string": "Always Core Providers[common.compat,standard] Serialization",
+ "core-test-types-list-as-string": "Always Core Serialization",
+ "providers-test-types-list-as-string": "Providers[common.compat,standard]",
"needs-mypy": "true",
"mypy-checks": "['mypy-providers']",
},
@@ -773,7 +778,7 @@ def assert_outputs_are_printed(expected_outputs: dict[str, str], stderr: str):
pytest.param(
("providers/src/airflow/providers/standard/operators/bash.py",),
{
- "affected-providers-list-as-string": None,
+ "selected-providers-list-as-string": None,
"all-python-versions": "['3.9']",
"all-python-versions-list-as-string": "3.9",
"python-versions": "['3.9']",
@@ -788,7 +793,8 @@ def assert_outputs_are_printed(expected_outputs: dict[str, str], stderr: str):
"skip-pre-commits": "identity,lint-helm-chart,mypy-airflow,mypy-dev,mypy-docs,mypy-providers,mypy-task-sdk,"
"ts-compile-format-lint-ui,ts-compile-format-lint-www",
"upgrade-to-newer-dependencies": "false",
- "parallel-test-types-list-as-string": "Always Core Providers[common.compat,standard] Serialization",
+ "core-test-types-list-as-string": "Always Core Serialization",
+ "providers-test-types-list-as-string": "Providers[common.compat,standard]",
"needs-mypy": "true",
"mypy-checks": "['mypy-providers']",
},
@@ -798,7 +804,7 @@ def assert_outputs_are_printed(expected_outputs: dict[str, str], stderr: str):
pytest.param(
("tests/utils/test_cli_util.py",),
{
- "affected-providers-list-as-string": ALL_PROVIDERS_AFFECTED,
+ "selected-providers-list-as-string": ALL_PROVIDERS_AFFECTED,
"all-python-versions": "['3.9']",
"all-python-versions-list-as-string": "3.9",
"python-versions": "['3.9']",
@@ -812,7 +818,7 @@ def assert_outputs_are_printed(expected_outputs: dict[str, str], stderr: str):
"full-tests-needed": "true",
"skip-pre-commits": "identity,mypy-airflow,mypy-dev,mypy-docs,mypy-providers,mypy-task-sdk",
"upgrade-to-newer-dependencies": "false",
- "parallel-test-types-list-as-string": ALL_CI_SELECTIVE_TEST_TYPES,
+ "core-test-types-list-as-string": ALL_CI_SELECTIVE_TEST_TYPES,
"providers-test-types-list-as-string": ALL_PROVIDERS_SELECTIVE_TEST_TYPES,
"needs-mypy": "true",
"mypy-checks": "['mypy-airflow', 'mypy-providers', 'mypy-docs', 'mypy-dev', 'mypy-task-sdk']",
@@ -824,7 +830,7 @@ def assert_outputs_are_printed(expected_outputs: dict[str, str], stderr: str):
pytest.param(
("tests_common/__init__.py",),
{
- "affected-providers-list-as-string": ALL_PROVIDERS_AFFECTED,
+ "selected-providers-list-as-string": ALL_PROVIDERS_AFFECTED,
"all-python-versions": "['3.9']",
"all-python-versions-list-as-string": "3.9",
"python-versions": "['3.9']",
@@ -838,8 +844,10 @@ def assert_outputs_are_printed(expected_outputs: dict[str, str], stderr: str):
"full-tests-needed": "true",
"skip-pre-commits": "identity,mypy-airflow,mypy-dev,mypy-docs,mypy-providers,mypy-task-sdk",
"upgrade-to-newer-dependencies": "false",
- "parallel-test-types-list-as-string": ALL_CI_SELECTIVE_TEST_TYPES,
+ "core-test-types-list-as-string": ALL_CI_SELECTIVE_TEST_TYPES,
"providers-test-types-list-as-string": ALL_PROVIDERS_SELECTIVE_TEST_TYPES,
+ "testable-core-integrations": "['celery', 'kerberos']",
+ "testable-providers-integrations": "['cassandra', 'drill', 'kafka', 'mongo', 'pinot', 'qdrant', 'redis', 'trino', 'ydb']",
"needs-mypy": "true",
"mypy-checks": "['mypy-airflow', 'mypy-providers', 'mypy-docs', 'mypy-dev', 'mypy-task-sdk']",
},
@@ -850,27 +858,24 @@ def assert_outputs_are_printed(expected_outputs: dict[str, str], stderr: str):
pytest.param(
("airflow/ui/src/index.tsx",),
{
- "affected-providers-list-as-string": None,
+ "selected-providers-list-as-string": None,
"all-python-versions": "['3.9']",
"all-python-versions-list-as-string": "3.9",
"python-versions": "['3.9']",
"python-versions-list-as-string": "3.9",
- "ci-image-build": "true",
+ "ci-image-build": "false",
"prod-image-build": "false",
"needs-helm-tests": "false",
- "run-tests": "true",
+ "run-tests": "false",
"run-amazon-tests": "false",
"docs-build": "false",
"full-tests-needed": "false",
"skip-pre-commits": "check-provider-yaml-valid,flynt,identity,lint-helm-chart,mypy-airflow,mypy-dev,mypy-docs,mypy-providers,mypy-task-sdk,ts-compile-format-lint-www",
"upgrade-to-newer-dependencies": "false",
- "parallel-test-types-list-as-string": "Always",
- "providers-test-types-list-as-string": "",
"needs-mypy": "false",
"mypy-checks": "[]",
"run-ui-tests": "true",
"only-new-ui-files": "true",
- "testable-integrations": "[]",
},
id="Run only ui tests for PR with new UI only changes.",
)
@@ -1019,7 +1024,7 @@ def test_full_test_needed_when_scripts_changes(files: tuple[str, ...], expected_
("full tests needed", "all versions"),
"main",
{
- "affected-providers-list-as-string": ALL_PROVIDERS_AFFECTED,
+ "selected-providers-list-as-string": ALL_PROVIDERS_AFFECTED,
"all-versions": "true",
"all-python-versions": "['3.9', '3.10', '3.11', '3.12']",
"all-python-versions-list-as-string": "3.9 3.10 3.11 3.12",
@@ -1033,12 +1038,14 @@ def test_full_test_needed_when_scripts_changes(files: tuple[str, ...], expected_
"ci-image-build": "true",
"prod-image-build": "true",
"run-tests": "true",
+ "skip-provider-tests": "false",
+ "test-groups": "['core', 'providers']",
"docs-build": "true",
"docs-list-as-string": ALL_DOCS_SELECTED_FOR_BUILD,
"full-tests-needed": "true",
"skip-pre-commits": "identity,mypy-airflow,mypy-dev,mypy-docs,mypy-providers,mypy-task-sdk",
"upgrade-to-newer-dependencies": "false",
- "parallel-test-types-list-as-string": ALL_CI_SELECTIVE_TEST_TYPES,
+ "core-test-types-list-as-string": ALL_CI_SELECTIVE_TEST_TYPES,
"providers-test-types-list-as-string": ALL_PROVIDERS_SELECTIVE_TEST_TYPES,
"needs-mypy": "true",
"mypy-checks": "['mypy-airflow', 'mypy-providers', 'mypy-docs', 'mypy-dev', 'mypy-task-sdk']",
@@ -1053,7 +1060,7 @@ def test_full_test_needed_when_scripts_changes(files: tuple[str, ...], expected_
("full tests needed", "default versions only"),
"main",
{
- "affected-providers-list-as-string": ALL_PROVIDERS_AFFECTED,
+ "selected-providers-list-as-string": ALL_PROVIDERS_AFFECTED,
"all-python-versions": "['3.9']",
"all-python-versions-list-as-string": "3.9",
"all-versions": "false",
@@ -1067,12 +1074,14 @@ def test_full_test_needed_when_scripts_changes(files: tuple[str, ...], expected_
"ci-image-build": "true",
"prod-image-build": "true",
"run-tests": "true",
+ "skip-provider-tests": "false",
+ "test-groups": "['core', 'providers']",
"docs-build": "true",
"docs-list-as-string": ALL_DOCS_SELECTED_FOR_BUILD,
"full-tests-needed": "true",
"skip-pre-commits": "identity,mypy-airflow,mypy-dev,mypy-docs,mypy-providers,mypy-task-sdk",
"upgrade-to-newer-dependencies": "false",
- "parallel-test-types-list-as-string": ALL_CI_SELECTIVE_TEST_TYPES,
+ "core-test-types-list-as-string": ALL_CI_SELECTIVE_TEST_TYPES,
"providers-test-types-list-as-string": ALL_PROVIDERS_SELECTIVE_TEST_TYPES,
"needs-mypy": "true",
"mypy-checks": "['mypy-airflow', 'mypy-providers', 'mypy-docs', 'mypy-dev', 'mypy-task-sdk']",
@@ -1087,7 +1096,7 @@ def test_full_test_needed_when_scripts_changes(files: tuple[str, ...], expected_
("full tests needed",),
"main",
{
- "affected-providers-list-as-string": ALL_PROVIDERS_AFFECTED,
+ "selected-providers-list-as-string": ALL_PROVIDERS_AFFECTED,
"all-python-versions": "['3.9']",
"all-python-versions-list-as-string": "3.9",
"all-versions": "false",
@@ -1101,12 +1110,14 @@ def test_full_test_needed_when_scripts_changes(files: tuple[str, ...], expected_
"ci-image-build": "true",
"prod-image-build": "true",
"run-tests": "true",
+ "skip-provider-tests": "false",
+ "test-groups": "['core', 'providers']",
"docs-build": "true",
"docs-list-as-string": ALL_DOCS_SELECTED_FOR_BUILD,
"full-tests-needed": "true",
"skip-pre-commits": "identity,mypy-airflow,mypy-dev,mypy-docs,mypy-providers,mypy-task-sdk",
"upgrade-to-newer-dependencies": "false",
- "parallel-test-types-list-as-string": ALL_CI_SELECTIVE_TEST_TYPES,
+ "core-test-types-list-as-string": ALL_CI_SELECTIVE_TEST_TYPES,
"providers-test-types-list-as-string": ALL_PROVIDERS_SELECTIVE_TEST_TYPES,
"needs-mypy": "true",
"mypy-checks": "['mypy-airflow', 'mypy-providers', 'mypy-docs', 'mypy-dev', 'mypy-task-sdk']",
@@ -1121,7 +1132,7 @@ def test_full_test_needed_when_scripts_changes(files: tuple[str, ...], expected_
("full tests needed", "latest versions only"),
"main",
{
- "affected-providers-list-as-string": ALL_PROVIDERS_AFFECTED,
+ "selected-providers-list-as-string": ALL_PROVIDERS_AFFECTED,
"all-python-versions": "['3.12']",
"all-python-versions-list-as-string": "3.12",
"all-versions": "false",
@@ -1136,12 +1147,14 @@ def test_full_test_needed_when_scripts_changes(files: tuple[str, ...], expected_
"ci-image-build": "true",
"prod-image-build": "true",
"run-tests": "true",
+ "skip-provider-tests": "false",
+ "test-groups": "['core', 'providers']",
"docs-build": "true",
"docs-list-as-string": ALL_DOCS_SELECTED_FOR_BUILD,
"full-tests-needed": "true",
"skip-pre-commits": "identity,mypy-airflow,mypy-dev,mypy-docs,mypy-providers,mypy-task-sdk",
"upgrade-to-newer-dependencies": "false",
- "parallel-test-types-list-as-string": ALL_CI_SELECTIVE_TEST_TYPES,
+ "core-test-types-list-as-string": ALL_CI_SELECTIVE_TEST_TYPES,
"providers-test-types-list-as-string": ALL_PROVIDERS_SELECTIVE_TEST_TYPES,
"needs-mypy": "true",
"mypy-checks": "['mypy-airflow', 'mypy-providers', 'mypy-docs', 'mypy-dev', 'mypy-task-sdk']",
@@ -1159,7 +1172,7 @@ def test_full_test_needed_when_scripts_changes(files: tuple[str, ...], expected_
),
"main",
{
- "affected-providers-list-as-string": ALL_PROVIDERS_AFFECTED,
+ "selected-providers-list-as-string": ALL_PROVIDERS_AFFECTED,
"all-python-versions": "['3.9']",
"all-python-versions-list-as-string": "3.9",
"all-versions": "false",
@@ -1171,12 +1184,14 @@ def test_full_test_needed_when_scripts_changes(files: tuple[str, ...], expected_
"ci-image-build": "true",
"prod-image-build": "true",
"run-tests": "true",
+ "skip-provider-tests": "false",
+ "test-groups": "['core', 'providers']",
"docs-build": "true",
"docs-list-as-string": ALL_DOCS_SELECTED_FOR_BUILD,
"full-tests-needed": "true",
"skip-pre-commits": "identity,mypy-airflow,mypy-dev,mypy-docs,mypy-providers,mypy-task-sdk",
"upgrade-to-newer-dependencies": "false",
- "parallel-test-types-list-as-string": ALL_CI_SELECTIVE_TEST_TYPES,
+ "core-test-types-list-as-string": ALL_CI_SELECTIVE_TEST_TYPES,
"providers-test-types-list-as-string": ALL_PROVIDERS_SELECTIVE_TEST_TYPES,
"needs-mypy": "true",
"mypy-checks": "['mypy-airflow', 'mypy-providers', 'mypy-docs', 'mypy-dev', 'mypy-task-sdk']",
@@ -1191,7 +1206,7 @@ def test_full_test_needed_when_scripts_changes(files: tuple[str, ...], expected_
("full tests needed",),
"main",
{
- "affected-providers-list-as-string": ALL_PROVIDERS_AFFECTED,
+ "selected-providers-list-as-string": ALL_PROVIDERS_AFFECTED,
"all-python-versions": "['3.9']",
"all-python-versions-list-as-string": "3.9",
"all-versions": "false",
@@ -1203,17 +1218,16 @@ def test_full_test_needed_when_scripts_changes(files: tuple[str, ...], expected_
"ci-image-build": "true",
"prod-image-build": "true",
"run-tests": "true",
+ "skip-provider-tests": "false",
+ "test-groups": "['core', 'providers']",
"docs-build": "true",
"docs-list-as-string": ALL_DOCS_SELECTED_FOR_BUILD,
"full-tests-needed": "true",
"skip-pre-commits": "identity,mypy-airflow,mypy-dev,mypy-docs,mypy-providers,mypy-task-sdk",
"upgrade-to-newer-dependencies": "false",
- "parallel-test-types-list-as-string": ALL_CI_SELECTIVE_TEST_TYPES,
+ "core-test-types-list-as-string": ALL_CI_SELECTIVE_TEST_TYPES,
"providers-test-types-list-as-string": ALL_PROVIDERS_SELECTIVE_TEST_TYPES,
- "separate-test-types-list-as-string": "API Always BranchExternalPython BranchPythonVenv "
- "CLI Core ExternalPython Operators Other PlainAsserts "
- + LIST_OF_ALL_PROVIDER_TESTS
- + " PythonVenv Serialization WWW",
+ "individual-providers-test-types-list-as-string": LIST_OF_ALL_PROVIDER_TESTS,
"needs-mypy": "true",
"mypy-checks": "['mypy-airflow', 'mypy-providers', 'mypy-docs', 'mypy-dev', 'mypy-task-sdk']",
},
@@ -1227,7 +1241,6 @@ def test_full_test_needed_when_scripts_changes(files: tuple[str, ...], expected_
("full tests needed",),
"v2-7-stable",
{
- "affected-providers-list-as-string": ALL_PROVIDERS_AFFECTED,
"all-python-versions": "['3.9']",
"all-python-versions-list-as-string": "3.9",
"python-versions": "['3.9']",
@@ -1236,18 +1249,15 @@ def test_full_test_needed_when_scripts_changes(files: tuple[str, ...], expected_
"ci-image-build": "true",
"prod-image-build": "true",
"run-tests": "true",
+ "skip-provider-tests": "true",
+ "test-groups": "['core']",
"docs-build": "true",
"docs-list-as-string": "apache-airflow docker-stack",
"full-tests-needed": "true",
"skip-pre-commits": "check-airflow-provider-compatibility,check-extra-packages-references,check-provider-yaml-valid,identity,lint-helm-chart,mypy-airflow,mypy-dev,mypy-docs,mypy-providers,mypy-task-sdk,validate-operators-init",
- "skip-provider-tests": "true",
"upgrade-to-newer-dependencies": "false",
- "parallel-test-types-list-as-string": "API Always BranchExternalPython "
- "BranchPythonVenv CLI Core ExternalPython Operators Other PlainAsserts "
- "PythonVenv Serialization WWW",
- "separate-test-types-list-as-string": "API Always BranchExternalPython "
- "BranchPythonVenv CLI Core ExternalPython Operators Other PlainAsserts "
- "PythonVenv Serialization WWW",
+ "core-test-types-list-as-string": "API Always CLI Core Operators Other "
+ "Serialization WWW",
"needs-mypy": "true",
"mypy-checks": "['mypy-airflow', 'mypy-docs', 'mypy-dev', 'mypy-task-sdk']",
},
@@ -1279,18 +1289,19 @@ def test_expected_output_full_tests_needed(
pytest.param(
("INTHEWILD.md",),
{
- "affected-providers-list-as-string": None,
+ "selected-providers-list-as-string": None,
"all-python-versions": "['3.9']",
"all-python-versions-list-as-string": "3.9",
"ci-image-build": "false",
"needs-helm-tests": "false",
"run-tests": "false",
+ "skip-provider-tests": "true",
+ "test-groups": "[]",
"docs-build": "false",
"docs-list-as-string": None,
"full-tests-needed": "false",
"upgrade-to-newer-dependencies": "false",
- "skip-provider-tests": "true",
- "parallel-test-types-list-as-string": None,
+ "core-test-types-list-as-string": None,
"needs-mypy": "false",
"mypy-checks": "[]",
},
@@ -1302,22 +1313,20 @@ def test_expected_output_full_tests_needed(
"providers/tests/google/file.py",
),
{
- "affected-providers-list-as-string": "amazon apache.beam apache.cassandra cncf.kubernetes "
- "common.compat common.sql facebook google hashicorp microsoft.azure microsoft.mssql "
- "mysql openlineage oracle postgres presto salesforce samba sftp ssh trino",
"all-python-versions": "['3.9']",
"all-python-versions-list-as-string": "3.9",
"needs-helm-tests": "false",
"ci-image-build": "true",
"prod-image-build": "true",
"run-tests": "true",
+ "skip-provider-tests": "true",
+ "test-groups": "['core']",
"docs-build": "true",
"docs-list-as-string": "apache-airflow docker-stack",
"full-tests-needed": "false",
"run-kubernetes-tests": "true",
"upgrade-to-newer-dependencies": "false",
- "skip-provider-tests": "true",
- "parallel-test-types-list-as-string": "Always",
+ "core-test-types-list-as-string": "Always",
"needs-mypy": "false",
"mypy-checks": "[]",
},
@@ -1331,23 +1340,20 @@ def test_expected_output_full_tests_needed(
"providers/tests/google/file.py",
),
{
- "affected-providers-list-as-string": "amazon apache.beam apache.cassandra "
- "cncf.kubernetes common.compat common.sql facebook google "
- "hashicorp microsoft.azure microsoft.mssql mysql openlineage oracle postgres "
- "presto salesforce samba sftp ssh trino",
"all-python-versions": "['3.9']",
"all-python-versions-list-as-string": "3.9",
"ci-image-build": "true",
"prod-image-build": "true",
"needs-helm-tests": "false",
"run-tests": "true",
+ "skip-provider-tests": "true",
+ "test-groups": "['core']",
"docs-build": "true",
"docs-list-as-string": "apache-airflow docker-stack",
"full-tests-needed": "false",
"run-kubernetes-tests": "true",
"upgrade-to-newer-dependencies": "false",
- "skip-provider-tests": "true",
- "parallel-test-types-list-as-string": "Always CLI",
+ "core-test-types-list-as-string": "Always CLI",
"needs-mypy": "true",
"mypy-checks": "['mypy-airflow']",
},
@@ -1359,21 +1365,20 @@ def test_expected_output_full_tests_needed(
"providers/tests/google/file.py",
),
{
- "affected-providers-list-as-string": ALL_PROVIDERS_AFFECTED,
"all-python-versions": "['3.9']",
"all-python-versions-list-as-string": "3.9",
"ci-image-build": "true",
"prod-image-build": "false",
"needs-helm-tests": "false",
"run-tests": "true",
+ "skip-provider-tests": "true",
+ "test-groups": "['core']",
"docs-build": "true",
"docs-list-as-string": "apache-airflow docker-stack",
"full-tests-needed": "false",
"run-kubernetes-tests": "false",
"upgrade-to-newer-dependencies": "false",
- "skip-provider-tests": "true",
- "parallel-test-types-list-as-string": "API Always BranchExternalPython BranchPythonVenv "
- "CLI Core ExternalPython Operators Other PlainAsserts PythonVenv Serialization WWW",
+ "core-test-types-list-as-string": "API Always CLI Core Operators Other Serialization WWW",
"needs-mypy": "true",
"mypy-checks": "['mypy-airflow']",
},
@@ -1396,25 +1401,113 @@ def test_expected_output_pull_request_v2_7(
assert_outputs_are_printed(expected_outputs, str(stderr))
+@pytest.mark.parametrize(
+ "files, pr_labels, default_branch, expected_outputs,",
+ [
+ pytest.param(
+ ("INTHEWILD.md",),
+ (),
+ "main",
+ {
+ "selected-providers-list-as-string": ALL_PROVIDERS_AFFECTED,
+ "all-python-versions": "['3.9', '3.10', '3.11', '3.12']",
+ "all-python-versions-list-as-string": "3.9 3.10 3.11 3.12",
+ "ci-image-build": "true",
+ "prod-image-build": "true",
+ "needs-helm-tests": "true",
+ "run-tests": "true",
+ "docs-build": "true",
+ "docs-list-as-string": ALL_DOCS_SELECTED_FOR_BUILD,
+ "skip-pre-commits": "identity,mypy-airflow,mypy-dev,mypy-docs,mypy-providers,mypy-task-sdk",
+ "upgrade-to-newer-dependencies": "true",
+ "core-test-types-list-as-string": ALL_CI_SELECTIVE_TEST_TYPES,
+ "needs-mypy": "true",
+ "mypy-checks": "['mypy-airflow', 'mypy-providers', 'mypy-docs', 'mypy-dev', 'mypy-task-sdk']",
+ },
+ id="All tests run on push even if unimportant file changed",
+ ),
+ pytest.param(
+ ("INTHEWILD.md",),
+ (),
+ "v2-3-stable",
+ {
+ "all-python-versions": "['3.9', '3.10', '3.11', '3.12']",
+ "all-python-versions-list-as-string": "3.9 3.10 3.11 3.12",
+ "ci-image-build": "true",
+ "prod-image-build": "true",
+ "needs-helm-tests": "false",
+ "run-tests": "true",
+ "docs-build": "true",
+ "skip-pre-commits": "check-airflow-provider-compatibility,check-extra-packages-references,check-provider-yaml-valid,identity,lint-helm-chart,mypy-airflow,mypy-dev,mypy-docs,mypy-providers,mypy-task-sdk,validate-operators-init",
+ "docs-list-as-string": "apache-airflow docker-stack",
+ "upgrade-to-newer-dependencies": "true",
+ "core-test-types-list-as-string": "API Always CLI Core Operators Other Serialization WWW",
+ "needs-mypy": "true",
+ "mypy-checks": "['mypy-airflow', 'mypy-docs', 'mypy-dev', 'mypy-task-sdk']",
+ },
+ id="All tests except Providers and Helm run on push"
+ " even if unimportant file changed in non-main branch",
+ ),
+ pytest.param(
+ ("airflow/api.py",),
+ (),
+ "main",
+ {
+ "selected-providers-list-as-string": ALL_PROVIDERS_AFFECTED,
+ "all-python-versions": "['3.9', '3.10', '3.11', '3.12']",
+ "all-python-versions-list-as-string": "3.9 3.10 3.11 3.12",
+ "ci-image-build": "true",
+ "prod-image-build": "true",
+ "needs-helm-tests": "true",
+ "run-tests": "true",
+ "docs-build": "true",
+ "skip-pre-commits": "identity,mypy-airflow,mypy-dev,mypy-docs,mypy-providers,mypy-task-sdk",
+ "docs-list-as-string": ALL_DOCS_SELECTED_FOR_BUILD,
+ "upgrade-to-newer-dependencies": "true",
+ "core-test-types-list-as-string": ALL_CI_SELECTIVE_TEST_TYPES,
+ "needs-mypy": "true",
+ "mypy-checks": "['mypy-airflow', 'mypy-providers', 'mypy-docs', 'mypy-dev', 'mypy-task-sdk']",
+ },
+ id="All tests run on push if core file changed",
+ ),
+ ],
+)
+def test_expected_output_push(
+ files: tuple[str, ...],
+ pr_labels: tuple[str, ...],
+ default_branch: str,
+ expected_outputs: dict[str, str],
+):
+ stderr = SelectiveChecks(
+ files=files,
+ commit_ref=NEUTRAL_COMMIT,
+ github_event=GithubEvents.PUSH,
+ pr_labels=pr_labels,
+ default_branch=default_branch,
+ )
+ assert_outputs_are_printed(expected_outputs, str(stderr))
+
+
@pytest.mark.parametrize(
"files, expected_outputs,",
[
pytest.param(
("INTHEWILD.md",),
{
- "affected-providers-list-as-string": None,
+ "selected-providers-list-as-string": None,
"all-python-versions": "['3.9']",
"all-python-versions-list-as-string": "3.9",
"ci-image-build": "false",
"needs-helm-tests": "false",
"run-tests": "false",
+ "skip-provider-tests": "true",
+ "test-groups": "[]",
"docs-build": "false",
"docs-list-as-string": None,
"upgrade-to-newer-dependencies": "false",
"skip-pre-commits": "check-provider-yaml-valid,flynt,identity,lint-helm-chart,"
"mypy-airflow,mypy-dev,mypy-docs,mypy-providers,mypy-task-sdk,ts-compile-format-lint-ui,ts-compile-format-lint-www",
- "skip-provider-tests": "true",
- "parallel-test-types-list-as-string": None,
+ "core-test-types-list-as-string": None,
"needs-mypy": "false",
"mypy-checks": "[]",
},
@@ -1423,20 +1516,21 @@ def test_expected_output_pull_request_v2_7(
pytest.param(
("tests/system/any_file.py",),
{
- "affected-providers-list-as-string": None,
+ "selected-providers-list-as-string": None,
"all-python-versions": "['3.9']",
"all-python-versions-list-as-string": "3.9",
"ci-image-build": "true",
"prod-image-build": "false",
"needs-helm-tests": "false",
"run-tests": "true",
+ "skip-provider-tests": "true",
+ "test-groups": "['core']",
"docs-build": "true",
"docs-list-as-string": ALL_DOCS_SELECTED_FOR_BUILD,
"skip-pre-commits": "check-provider-yaml-valid,identity,lint-helm-chart,mypy-airflow,mypy-dev,mypy-docs,mypy-providers,mypy-task-sdk,"
"ts-compile-format-lint-ui,ts-compile-format-lint-www",
"upgrade-to-newer-dependencies": "false",
- "skip-provider-tests": "true",
- "parallel-test-types-list-as-string": "Always",
+ "core-test-types-list-as-string": "Always",
"needs-mypy": "true",
"mypy-checks": "['mypy-airflow']",
},
@@ -1449,7 +1543,7 @@ def test_expected_output_pull_request_v2_7(
"providers/tests/google/file.py",
),
{
- "affected-providers-list-as-string": "amazon apache.beam apache.cassandra "
+ "selected-providers-list-as-string": "amazon apache.beam apache.cassandra "
"cncf.kubernetes common.compat common.sql "
"facebook google hashicorp microsoft.azure microsoft.mssql mysql "
"openlineage oracle postgres presto salesforce samba sftp ssh trino",
@@ -1459,6 +1553,8 @@ def test_expected_output_pull_request_v2_7(
"prod-image-build": "true",
"needs-helm-tests": "true",
"run-tests": "true",
+ "skip-provider-tests": "false",
+ "test-groups": "['core', 'providers']",
"docs-build": "true",
"docs-list-as-string": "apache-airflow helm-chart amazon apache.beam apache.cassandra "
"cncf.kubernetes common.compat common.sql facebook google hashicorp microsoft.azure "
@@ -1467,9 +1563,8 @@ def test_expected_output_pull_request_v2_7(
"skip-pre-commits": "identity,mypy-airflow,mypy-dev,mypy-docs,mypy-providers,mypy-task-sdk,ts-compile-format-lint-ui,ts-compile-format-lint-www",
"run-kubernetes-tests": "true",
"upgrade-to-newer-dependencies": "false",
- "skip-provider-tests": "false",
- "parallel-test-types-list-as-string": "Always CLI Providers[amazon] "
- "Providers[apache.beam,apache.cassandra,cncf.kubernetes,common.compat,common.sql,facebook,"
+ "core-test-types-list-as-string": "Always CLI",
+ "providers-test-types-list-as-string": "Providers[amazon] Providers[apache.beam,apache.cassandra,cncf.kubernetes,common.compat,common.sql,facebook,"
"hashicorp,microsoft.azure,microsoft.mssql,mysql,openlineage,oracle,postgres,presto,"
"salesforce,samba,sftp,ssh,trino] Providers[google]",
"needs-mypy": "true",
@@ -1486,21 +1581,23 @@ def test_expected_output_pull_request_v2_7(
"airflow/api/file.py",
),
{
- "affected-providers-list-as-string": "common.compat fab",
+ "selected-providers-list-as-string": "common.compat fab",
"all-python-versions": "['3.9']",
"all-python-versions-list-as-string": "3.9",
"ci-image-build": "true",
"prod-image-build": "false",
"needs-helm-tests": "false",
"run-tests": "true",
+ "skip-provider-tests": "false",
+ "test-groups": "['core', 'providers']",
"docs-build": "true",
"docs-list-as-string": "apache-airflow common.compat fab",
"skip-pre-commits": "check-provider-yaml-valid,identity,lint-helm-chart,mypy-airflow,mypy-dev,mypy-docs,mypy-providers,mypy-task-sdk,"
"ts-compile-format-lint-ui,ts-compile-format-lint-www",
"run-kubernetes-tests": "false",
"upgrade-to-newer-dependencies": "false",
- "skip-provider-tests": "false",
- "parallel-test-types-list-as-string": "API Always CLI Operators Providers[common.compat,fab] WWW",
+ "core-test-types-list-as-string": "API Always CLI Operators WWW",
+ "providers-test-types-list-as-string": "Providers[common.compat,fab]",
"needs-mypy": "true",
"mypy-checks": "['mypy-airflow']",
},
@@ -1515,14 +1612,15 @@ def test_expected_output_pull_request_v2_7(
"prod-image-build": "false",
"needs-helm-tests": "false",
"run-tests": "true",
+ "skip-provider-tests": "true",
+ "test-groups": "['core']",
"docs-build": "true",
"docs-list-as-string": "apache-airflow",
"skip-pre-commits": "check-provider-yaml-valid,identity,lint-helm-chart,mypy-airflow,mypy-dev,mypy-docs,mypy-providers,mypy-task-sdk,"
"ts-compile-format-lint-ui,ts-compile-format-lint-www",
"run-kubernetes-tests": "false",
"upgrade-to-newer-dependencies": "false",
- "skip-provider-tests": "true",
- "parallel-test-types-list-as-string": ALL_CI_SELECTIVE_TEST_TYPES_WITHOUT_PROVIDERS,
+ "core-test-types-list-as-string": ALL_CI_SELECTIVE_TEST_TYPES,
"needs-mypy": "true",
"mypy-checks": "['mypy-airflow']",
},
@@ -1537,14 +1635,15 @@ def test_expected_output_pull_request_v2_7(
"prod-image-build": "false",
"needs-helm-tests": "false",
"run-tests": "true",
+ "skip-provider-tests": "true",
+ "test-groups": "['core']",
"docs-build": "true",
"docs-list-as-string": "apache-airflow",
"skip-pre-commits": "check-provider-yaml-valid,identity,lint-helm-chart,mypy-airflow,mypy-dev,mypy-docs,mypy-providers,mypy-task-sdk,"
"ts-compile-format-lint-ui,ts-compile-format-lint-www",
"run-kubernetes-tests": "false",
"upgrade-to-newer-dependencies": "false",
- "skip-provider-tests": "true",
- "parallel-test-types-list-as-string": ALL_CI_SELECTIVE_TEST_TYPES_WITHOUT_PROVIDERS,
+ "core-test-types-list-as-string": ALL_CI_SELECTIVE_TEST_TYPES,
"needs-mypy": "true",
"mypy-checks": "['mypy-airflow']",
},
@@ -1554,19 +1653,20 @@ def test_expected_output_pull_request_v2_7(
pytest.param(
("airflow/api_fastapi/core_api/openapi/v1-generated.yaml",),
{
- "affected-providers-list-as-string": None,
+ "selected-providers-list-as-string": None,
"all-python-versions": "['3.9']",
"all-python-versions-list-as-string": "3.9",
"ci-image-build": "true",
"needs-helm-tests": "false",
"run-tests": "true",
+ "skip-provider-tests": "true",
+ "test-groups": "['core']",
"docs-build": "false",
"docs-list-as-string": None,
"upgrade-to-newer-dependencies": "false",
"skip-pre-commits": "check-provider-yaml-valid,flynt,identity,lint-helm-chart,"
"mypy-airflow,mypy-dev,mypy-docs,mypy-providers,mypy-task-sdk,ts-compile-format-lint-www",
- "skip-provider-tests": "true",
- "parallel-test-types-list-as-string": None,
+ "core-test-types-list-as-string": None,
"needs-mypy": "false",
"mypy-checks": "[]",
},
@@ -1588,95 +1688,6 @@ def test_expected_output_pull_request_target(
assert_outputs_are_printed(expected_outputs, str(stderr))
-@pytest.mark.parametrize(
- "files, pr_labels, default_branch, expected_outputs,",
- [
- pytest.param(
- ("INTHEWILD.md",),
- (),
- "main",
- {
- "affected-providers-list-as-string": ALL_PROVIDERS_AFFECTED,
- "all-python-versions": "['3.9', '3.10', '3.11', '3.12']",
- "all-python-versions-list-as-string": "3.9 3.10 3.11 3.12",
- "ci-image-build": "true",
- "prod-image-build": "true",
- "needs-helm-tests": "true",
- "run-tests": "true",
- "docs-build": "true",
- "docs-list-as-string": ALL_DOCS_SELECTED_FOR_BUILD,
- "skip-pre-commits": "identity,mypy-airflow,mypy-dev,mypy-docs,mypy-providers,mypy-task-sdk",
- "upgrade-to-newer-dependencies": "true",
- "parallel-test-types-list-as-string": ALL_CI_SELECTIVE_TEST_TYPES,
- "needs-mypy": "true",
- "mypy-checks": "['mypy-airflow', 'mypy-providers', 'mypy-docs', 'mypy-dev', 'mypy-task-sdk']",
- },
- id="All tests run on push even if unimportant file changed",
- ),
- pytest.param(
- ("INTHEWILD.md",),
- (),
- "v2-3-stable",
- {
- "affected-providers-list-as-string": ALL_PROVIDERS_AFFECTED,
- "all-python-versions": "['3.9', '3.10', '3.11', '3.12']",
- "all-python-versions-list-as-string": "3.9 3.10 3.11 3.12",
- "ci-image-build": "true",
- "prod-image-build": "true",
- "needs-helm-tests": "false",
- "run-tests": "true",
- "docs-build": "true",
- "skip-pre-commits": "check-airflow-provider-compatibility,check-extra-packages-references,check-provider-yaml-valid,identity,lint-helm-chart,mypy-airflow,mypy-dev,mypy-docs,mypy-providers,mypy-task-sdk,validate-operators-init",
- "docs-list-as-string": "apache-airflow docker-stack",
- "upgrade-to-newer-dependencies": "true",
- "parallel-test-types-list-as-string": "API Always BranchExternalPython BranchPythonVenv "
- "CLI Core ExternalPython Operators Other PlainAsserts PythonVenv Serialization WWW",
- "needs-mypy": "true",
- "mypy-checks": "['mypy-airflow', 'mypy-docs', 'mypy-dev', 'mypy-task-sdk']",
- },
- id="All tests except Providers and Helm run on push"
- " even if unimportant file changed in non-main branch",
- ),
- pytest.param(
- ("airflow/api.py",),
- (),
- "main",
- {
- "affected-providers-list-as-string": ALL_PROVIDERS_AFFECTED,
- "all-python-versions": "['3.9', '3.10', '3.11', '3.12']",
- "all-python-versions-list-as-string": "3.9 3.10 3.11 3.12",
- "ci-image-build": "true",
- "prod-image-build": "true",
- "needs-helm-tests": "true",
- "run-tests": "true",
- "docs-build": "true",
- "skip-pre-commits": "identity,mypy-airflow,mypy-dev,mypy-docs,mypy-providers,mypy-task-sdk",
- "docs-list-as-string": ALL_DOCS_SELECTED_FOR_BUILD,
- "upgrade-to-newer-dependencies": "true",
- "parallel-test-types-list-as-string": ALL_CI_SELECTIVE_TEST_TYPES,
- "needs-mypy": "true",
- "mypy-checks": "['mypy-airflow', 'mypy-providers', 'mypy-docs', 'mypy-dev', 'mypy-task-sdk']",
- },
- id="All tests run on push if core file changed",
- ),
- ],
-)
-def test_expected_output_push(
- files: tuple[str, ...],
- pr_labels: tuple[str, ...],
- default_branch: str,
- expected_outputs: dict[str, str],
-):
- stderr = SelectiveChecks(
- files=files,
- commit_ref=NEUTRAL_COMMIT,
- github_event=GithubEvents.PUSH,
- pr_labels=pr_labels,
- default_branch=default_branch,
- )
- assert_outputs_are_printed(expected_outputs, str(stderr))
-
-
@pytest.mark.parametrize(
"github_event",
[
@@ -1708,7 +1719,7 @@ def test_no_commit_provided_trigger_full_build_for_any_event_type(github_event):
"upgrade-to-newer-dependencies": (
"true" if github_event in [GithubEvents.PUSH, GithubEvents.SCHEDULE] else "false"
),
- "parallel-test-types-list-as-string": ALL_CI_SELECTIVE_TEST_TYPES,
+ "core-test-types-list-as-string": ALL_CI_SELECTIVE_TEST_TYPES,
"needs-mypy": "true",
"mypy-checks": "['mypy-airflow', 'mypy-providers', 'mypy-docs', 'mypy-dev', 'mypy-task-sdk']",
},
diff --git a/dev/breeze/uv.lock b/dev/breeze/uv.lock
index d1095b2bf9f65..d400d08f40f58 100644
--- a/dev/breeze/uv.lock
+++ b/dev/breeze/uv.lock
@@ -39,7 +39,6 @@ dependencies = [
{ name = "jinja2" },
{ name = "jsonschema" },
{ name = "packaging" },
- { name = "pipx" },
{ name = "pre-commit" },
{ name = "pre-commit-uv" },
{ name = "psutil" },
@@ -73,7 +72,6 @@ requires-dist = [
{ name = "jinja2", specifier = ">=3.1.0" },
{ name = "jsonschema", specifier = ">=4.19.1" },
{ name = "packaging", specifier = ">=23.2" },
- { name = "pipx", specifier = ">=1.4.1" },
{ name = "pre-commit", specifier = ">=3.5.0" },
{ name = "pre-commit-uv", specifier = ">=4.1.3" },
{ name = "psutil", specifier = ">=5.9.6" },
@@ -90,15 +88,6 @@ requires-dist = [
{ name = "twine", specifier = ">=4.0.2" },
]
-[[package]]
-name = "argcomplete"
-version = "3.5.1"
-source = { registry = "https://pypi.org/simple" }
-sdist = { url = "https://files.pythonhosted.org/packages/5f/39/27605e133e7f4bb0c8e48c9a6b87101515e3446003e0442761f6a02ac35e/argcomplete-3.5.1.tar.gz", hash = "sha256:eb1ee355aa2557bd3d0145de7b06b2a45b0ce461e1e7813f5d066039ab4177b4", size = 82280 }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/f7/be/a606a6701d491cfae75583c80a6583f8abe9c36c0b9666e867e7cdd62fe8/argcomplete-3.5.1-py3-none-any.whl", hash = "sha256:1a1d148bdaa3e3b93454900163403df41448a248af01b6e849edc5ac08e6c363", size = 43498 },
-]
-
[[package]]
name = "attrs"
version = "24.2.0"
@@ -1033,23 +1022,6 @@ wheels = [
{ url = "https://files.pythonhosted.org/packages/ef/7d/500c9ad20238fcfcb4cb9243eede163594d7020ce87bd9610c9e02771876/pip-24.3.1-py3-none-any.whl", hash = "sha256:3790624780082365f47549d032f3770eeb2b1e8bd1f7b2e02dace1afa361b4ed", size = 1822182 },
]
-[[package]]
-name = "pipx"
-version = "1.7.1"
-source = { registry = "https://pypi.org/simple" }
-dependencies = [
- { name = "argcomplete" },
- { name = "colorama", marker = "sys_platform == 'win32'" },
- { name = "packaging" },
- { name = "platformdirs" },
- { name = "tomli", marker = "python_full_version < '3.11'" },
- { name = "userpath" },
-]
-sdist = { url = "https://files.pythonhosted.org/packages/17/21/dd6b9a9c4f0cb659ce3dad991f0e8dde852b2c81922224ef77df4222ab7a/pipx-1.7.1.tar.gz", hash = "sha256:762de134e16a462be92645166d225ecef446afaef534917f5f70008d63584360", size = 291889 }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/35/af/66db02a214590a841bcd1df1f02f7ef818dc3f43487acddab0b8c40b25d2/pipx-1.7.1-py3-none-any.whl", hash = "sha256:3933c43bb344e649cb28e10d357e0967ce8572f1c19caf90cf39ae95c2a0afaf", size = 78749 },
-]
-
[[package]]
name = "pkginfo"
version = "1.10.0"
diff --git a/providers/tests/system/example_empty.py b/providers/tests/system/example_empty.py
new file mode 100644
index 0000000000000..d2d362012c633
--- /dev/null
+++ b/providers/tests/system/example_empty.py
@@ -0,0 +1,48 @@
+# 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.
+from __future__ import annotations
+
+from datetime import datetime
+
+from airflow.models.baseoperator import chain
+from airflow.models.dag import DAG
+from airflow.operators.empty import EmptyOperator
+
+DAG_ID = "example_empty"
+
+with DAG(
+ dag_id=DAG_ID,
+ schedule="@once",
+ start_date=datetime(2021, 1, 1),
+ tags=["example"],
+ catchup=False,
+) as dag:
+ task = EmptyOperator(task_id="task")
+
+ chain(task)
+
+ from tests_common.test_utils.watcher import watcher
+
+ # This test needs watcher in order to properly mark success/failure
+ # when "tearDown" task with trigger rule is part of the DAG
+ list(dag.tasks) >> watcher()
+
+
+from tests_common.test_utils.system_tests import get_test_run # noqa: E402
+
+# Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest)
+test_run = get_test_run(dag)
diff --git a/scripts/ci/testing/run_integration_tests_with_retry.sh b/scripts/ci/testing/run_integration_tests_with_retry.sh
index 4fd25a75ecdff..d7b72323033f1 100755
--- a/scripts/ci/testing/run_integration_tests_with_retry.sh
+++ b/scripts/ci/testing/run_integration_tests_with_retry.sh
@@ -20,16 +20,17 @@ export COLOR_RED=$'\e[31m'
export COLOR_YELLOW=$'\e[33m'
export COLOR_RESET=$'\e[0m'
-if [[ ! "$#" -eq 1 ]]; then
- echo "${COLOR_RED}You must provide exactly one argument!.${COLOR_RESET}"
+if [[ ! "$#" -eq 2 ]]; then
+ echo "${COLOR_RED}You must provide 2 arguments. Test group and integration!.${COLOR_RESET}"
exit 1
fi
-INTEGRATION=${1}
+TEST_GROUP=${1}
+INTEGRATION=${2}
breeze down
set +e
-breeze testing integration-tests --integration "${INTEGRATION}"
+breeze testing "${TEST_GROUP}-integration-tests" --integration "${INTEGRATION}"
RESULT=$?
set -e
if [[ ${RESULT} != "0" ]]; then
@@ -41,7 +42,7 @@ if [[ ${RESULT} != "0" ]]; then
sudo service docker restart
breeze down
set +e
- breeze testing integration-tests --integration "${INTEGRATION}"
+ breeze testing "${TEST_GROUP}-integration-tests" --integration "${INTEGRATION}"
RESULT=$?
set -e
if [[ ${RESULT} != "0" ]]; then
diff --git a/scripts/ci/testing/run_unit_tests.sh b/scripts/ci/testing/run_unit_tests.sh
new file mode 100644
index 0000000000000..0f4d3a38cc58e
--- /dev/null
+++ b/scripts/ci/testing/run_unit_tests.sh
@@ -0,0 +1,121 @@
+#!/usr/bin/env bash
+# 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.
+
+export COLOR_RED=$'\e[31m'
+export COLOR_BLUE=$'\e[34m'
+export COLOR_YELLOW=$'\e[33m'
+export COLOR_RESET=$'\e[0m'
+
+if [[ ! "$#" -eq 2 ]]; then
+ echo "${COLOR_RED}You must provide 2 arguments: Group, Scope!.${COLOR_RESET}"
+ exit 1
+fi
+
+TEST_GROUP=${1}
+TEST_SCOPE=${2}
+
+function core_tests() {
+ echo "${COLOR_BLUE}Running core tests${COLOR_RESET}"
+ if [[ "${TEST_SCOPE}" == "DB" ]]; then
+ set -x
+ breeze testing core-db-tests
+ set +x
+ elif [[ "${TEST_SCOPE}" == "Non-DB" ]]; then
+ set -x
+ breeze testing core-non-db-tests
+ set +x
+ elif [[ "${TEST_SCOPE}" == "All" ]]; then
+ set -x
+ breeze testing core-tests
+ set +x
+ elif [[ "${TEST_SCOPE}" == "Quarantined" ]]; then
+ set -x
+ breeze testing core-tests
+ set +x
+ elif [[ "${TEST_SCOPE}" == "ARM collection" ]]; then
+ set -x
+ breeze testing core-tests --collect-only --remove-arm-packages
+ set +x
+ elif [[ "${TEST_SCOPE}" == "System" ]]; then
+ set -x
+ breeze testing system-core-tests tests/system/example_empty.py
+ set +x
+ else
+ echo "Unknown test scope: ${TEST_SCOPE}"
+ exit 1
+ fi
+ echo "${COLOR_BLUE}Core tests completed${COLOR_RESET}"
+}
+
+function providers_tests() {
+ echo "${COLOR_BLUE}Running providers tests${COLOR_RESET}"
+ if [[ "${TEST_SCOPE}" == "DB" ]]; then
+ set -x
+ breeze testing providers-db-tests
+ set +x
+ elif [[ "${TEST_SCOPE}" == "Non-DB" ]]; then
+ set -x
+ breeze testing providers-non-db-tests
+ set +x
+ elif [[ "${TEST_SCOPE}" == "All" ]]; then
+ set -x
+ breeze testing providers-tests
+ set +x
+ elif [[ "${TEST_SCOPE}" == "Quarantined" ]]; then
+ set -x
+ breeze testing providers-tests --parallel-test-types "All-Quarantined"
+ set +x
+ elif [[ "${TEST_SCOPE}" == "ARM collection" ]]; then
+ set -x
+ breeze testing providers-tests --collect-only --remove-arm-packages
+ set +x
+ elif [[ "${TEST_SCOPE}" == "System" ]]; then
+ set -x
+ breeze testing system-providers-tests providers/tests/system/example_empty.py
+ set +x
+ else
+ echo "Unknown test scope: ${TEST_SCOPE}"
+ exit 1
+ fi
+ echo "${COLOR_BLUE}Providers tests completed${COLOR_RESET}"
+}
+
+
+function task_sdk_tests() {
+ echo "${COLOR_BLUE}Running Task SDK tests${COLOR_RESET}"
+ set -x
+ breeze testing task-sdk-tests
+ set +x
+ echo "${COLOR_BLUE}Task SDK tests completed${COLOR_RESET}"
+}
+
+
+function run_tests() {
+ if [[ "${TEST_GROUP}" == "core" ]]; then
+ core_tests
+ elif [[ "${TEST_GROUP}" == "providers" ]]; then
+ providers_tests
+ elif [[ "${TEST_GROUP}" == "task_sdk" ]]; then
+ task_sdk_tests
+ else
+ echo "Unknown test group: ${TEST_GROUP}"
+ exit 1
+ fi
+}
+
+run_tests
diff --git a/scripts/docker/entrypoint_ci.sh b/scripts/docker/entrypoint_ci.sh
index 8e864ba83121b..6b6b4d5da27aa 100755
--- a/scripts/docker/entrypoint_ci.sh
+++ b/scripts/docker/entrypoint_ci.sh
@@ -320,12 +320,6 @@ function check_run_tests() {
python "${IN_CONTAINER_DIR}/remove_arm_packages.py"
fi
- if [[ ${TEST_TYPE} == "PlainAsserts" ]]; then
- # Plain asserts should be converted to env variable to make sure they are taken into account
- # otherwise they will not be effective during test collection when plain assert is breaking collection
- export PYTEST_PLAIN_ASSERTS="true"
- fi
-
if [[ ${DATABASE_ISOLATION=} == "true" ]]; then
echo "${COLOR_BLUE}Starting internal API server:${COLOR_RESET}"
# We need to start the internal API server before running tests
diff --git a/tests_common/pytest_plugin.py b/tests_common/pytest_plugin.py
index a27d4e0fa86de..fad8c5b34fc8c 100644
--- a/tests_common/pytest_plugin.py
+++ b/tests_common/pytest_plugin.py
@@ -293,18 +293,6 @@ def pytest_addoption(parser: pytest.Parser):
dest="include_quarantined",
help="Includes quarantined tests (marked with quarantined marker). They are skipped by default.",
)
- group.addoption(
- "--exclude-virtualenv-operator",
- action="store_true",
- dest="exclude_virtualenv_operator",
- help="Excludes virtualenv operators tests (marked with virtualenv_test marker).",
- )
- group.addoption(
- "--exclude-external-python-operator",
- action="store_true",
- dest="exclude_external_python_operator",
- help="Excludes external python operator tests (marked with external_python_test marker).",
- )
allowed_trace_sql_columns_list = ",".join(ALLOWED_TRACE_SQL_COLUMNS)
group.addoption(
"--trace-sql",
@@ -574,22 +562,6 @@ def skip_quarantined_test(item):
)
-def skip_virtualenv_operator_test(item):
- for _ in item.iter_markers(name="virtualenv_operator"):
- pytest.skip(
- f"The test is skipped because it has virtualenv_operator marker. "
- f"And --exclude-virtualenv-operator flag is not passed to pytest. {item}"
- )
-
-
-def skip_external_python_operator_test(item):
- for _ in item.iter_markers(name="external_python_operator"):
- pytest.skip(
- f"The test is skipped because it has external_python_operator marker. "
- f"And --exclude-external-python-operator flag is not passed to pytest. {item}"
- )
-
-
def skip_db_test(item):
if next(item.iter_markers(name="db_test"), None):
if next(item.iter_markers(name="non_db_test_override"), None):
@@ -677,8 +649,6 @@ def pytest_runtest_setup(item):
include_long_running = item.config.option.include_long_running
include_quarantined = item.config.option.include_quarantined
- exclude_virtualenv_operator = item.config.option.exclude_virtualenv_operator
- exclude_external_python_operator = item.config.option.exclude_external_python_operator
for marker in item.iter_markers(name="integration"):
skip_if_integration_disabled(marker, item)
@@ -700,10 +670,6 @@ def pytest_runtest_setup(item):
skip_long_running_test(item)
if not include_quarantined:
skip_quarantined_test(item)
- if exclude_virtualenv_operator:
- skip_virtualenv_operator_test(item)
- if exclude_external_python_operator:
- skip_external_python_operator_test(item)
if skip_db_tests:
skip_db_test(item)
if run_db_tests_only: