From ad82ff66fc2a70d6c4904f2025f14f4ee767fef2 Mon Sep 17 00:00:00 2001 From: Amogh Desai Date: Mon, 14 Jul 2025 12:54:54 +0530 Subject: [PATCH 01/38] =?UTF-8?q?=E2=9A=A0=EF=B8=8F=20=20WIP:=20POC=20of?= =?UTF-8?q?=20task=20sdk=20integration=20tests?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../workflows/additional-prod-image-tests.yml | 30 ++ dev/breeze/doc/images/output_testing.svg | 32 +- dev/breeze/doc/images/output_testing.txt | 2 +- ...put_testing_task-sdk-integration-tests.svg | 140 ++++++ ...put_testing_task-sdk-integration-tests.txt | 1 + .../images/output_testing_task-sdk-tests.svg | 34 +- .../images/output_testing_task-sdk-tests.txt | 2 +- .../commands/testing_commands.py | 47 +- .../commands/testing_commands_config.py | 14 +- .../src/airflow_breeze/global_constants.py | 2 + .../src/airflow_breeze/utils/run_tests.py | 25 +- .../airflow_breeze/utils/task_sdk_tests.py | 21 + dev/report.txt | 441 ++++++++++++++++++ task-sdk-tests/pyproject.toml | 59 +++ .../tests/task_sdk_tests/__init__.py | 16 + .../tests/task_sdk_tests/conftest.py | 26 ++ .../tests/task_sdk_tests/constants.py | 30 ++ .../task_sdk_tests/test_task_sdk_health.py | 122 +++++ 18 files changed, 999 insertions(+), 45 deletions(-) create mode 100644 dev/breeze/doc/images/output_testing_task-sdk-integration-tests.svg create mode 100644 dev/breeze/doc/images/output_testing_task-sdk-integration-tests.txt create mode 100644 dev/breeze/src/airflow_breeze/utils/task_sdk_tests.py create mode 100644 dev/report.txt create mode 100644 task-sdk-tests/pyproject.toml create mode 100644 task-sdk-tests/tests/task_sdk_tests/__init__.py create mode 100644 task-sdk-tests/tests/task_sdk_tests/conftest.py create mode 100644 task-sdk-tests/tests/task_sdk_tests/constants.py create mode 100644 task-sdk-tests/tests/task_sdk_tests/test_task_sdk_health.py diff --git a/.github/workflows/additional-prod-image-tests.yml b/.github/workflows/additional-prod-image-tests.yml index e970526c4b0a7..c1db318416107 100644 --- a/.github/workflows/additional-prod-image-tests.yml +++ b/.github/workflows/additional-prod-image-tests.yml @@ -158,3 +158,33 @@ jobs: id: breeze - name: "Test docker-compose quick start" run: breeze testing docker-compose-tests + + test-task-sdk: + timeout-minutes: 60 + name: "Task SDK integration tests with PROD image" + runs-on: ${{ fromJSON(inputs.runners) }} + env: + PYTHON_MAJOR_MINOR_VERSION: "${{ inputs.default-python-version }}" + 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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + with: + fetch-depth: 2 + persist-credentials: false + - name: "Prepare breeze & PROD image: ${{ env.PYTHON_MAJOR_MINOR_VERSION }}" + uses: ./.github/actions/prepare_breeze_and_image + with: + platform: ${{ inputs.platform }} + image-type: "prod" + python: ${{ env.PYTHON_MAJOR_MINOR_VERSION }} + use-uv: ${{ inputs.use-uv }} + id: breeze + - name: "Run Task SDK integration tests" + run: breeze testing task-sdk-integration-tests diff --git a/dev/breeze/doc/images/output_testing.svg b/dev/breeze/doc/images/output_testing.svg index a844a8ef1b7c7..56062dfe5c65d 100644 --- a/dev/breeze/doc/images/output_testing.svg +++ b/dev/breeze/doc/images/output_testing.svg @@ -1,4 +1,4 @@ - +