From c440332e267ce167a352062375155094d8e672f8 Mon Sep 17 00:00:00 2001 From: Andrew Chang <69671930+Andrushika@users.noreply.github.com> Date: Fri, 17 Jul 2026 23:31:24 +0800 Subject: [PATCH] [v3-3-test] Skip Go SDK CI jobs for doc-only changes under go-sdk/ (#70021) go-sdk/*.md edits (README, ADRs) currently match the Go SDK file groups and trigger the Go unit + e2e suites plus a prod image build, none of which a documentation change can affect. Excluding .md also lets non-.go build files (go.mod, go.sum, build config) trigger the unit tests, which the previous .go-only pattern missed. (cherry picked from commit 4f5e4b9843710b17990cbdc6aea7704525d669f7) Co-authored-by: Andrew Chang <69671930+Andrushika@users.noreply.github.com> --- .../airflow_breeze/utils/selective_checks.py | 7 +++-- dev/breeze/tests/test_selective_checks.py | 27 +++++++++++++++++++ 2 files changed, 32 insertions(+), 2 deletions(-) diff --git a/dev/breeze/src/airflow_breeze/utils/selective_checks.py b/dev/breeze/src/airflow_breeze/utils/selective_checks.py index c3a651ecafce9..79606ab826286 100644 --- a/dev/breeze/src/airflow_breeze/utils/selective_checks.py +++ b/dev/breeze/src/airflow_breeze/utils/selective_checks.py @@ -242,7 +242,8 @@ def __hash__(self): r"^task-sdk/src/airflow/sdk/coordinators/java/.*", ], FileGroupForCi.GO_SDK_E2E_FILES: [ - r"^go-sdk/.*", + # `.md` excluded — doc-only edits do not affect the Go build or e2e tests. + r"^go-sdk/(?!.*\.md$).*", r"^airflow-e2e-tests/tests/airflow_e2e_tests/go_sdk_tests/.*", r"^airflow-e2e-tests/docker/go\.yml$", r"^task-sdk/src/airflow/sdk/coordinators/_subprocess\.py$", @@ -418,7 +419,9 @@ def __hash__(self): r"^task-sdk-integration-tests/.*\.py$", ], FileGroupForCi.GO_SDK_FILES: [ - r"^go-sdk/.*\.go$", + # `.md` excluded — doc-only edits do not affect the Go build or tests, but + # everything else (go.mod, go.sum, build config) must trigger the unit tests. + r"^go-sdk/(?!.*\.md$).*", ], FileGroupForCi.JAVA_SDK_FILES: [ r"^java-sdk/", diff --git a/dev/breeze/tests/test_selective_checks.py b/dev/breeze/tests/test_selective_checks.py index ccf365d4734b9..9804873685f81 100644 --- a/dev/breeze/tests/test_selective_checks.py +++ b/dev/breeze/tests/test_selective_checks.py @@ -1453,6 +1453,33 @@ def assert_outputs_are_printed(expected_outputs: dict[str, str], stderr: str): }, id="Run go unit and e2e tests for go-sdk source change", ), + pytest.param( + ("go-sdk/go.mod",), + { + "run-go-sdk-tests": "true", + "run-go-sdk-e2e-tests": "true", + "prod-image-build": "true", + }, + id="Run go unit and e2e tests for go-sdk dependency change", + ), + pytest.param( + ("go-sdk/README.md",), + { + "run-go-sdk-tests": "false", + "run-go-sdk-e2e-tests": "false", + "prod-image-build": "false", + }, + id="Skip go unit and e2e tests for go-sdk README-only change", + ), + pytest.param( + ("go-sdk/adr/0001-bundle-packing-options.md",), + { + "run-go-sdk-tests": "false", + "run-go-sdk-e2e-tests": "false", + "prod-image-build": "false", + }, + id="Skip go unit and e2e tests for go-sdk ADR-only change", + ), pytest.param( ("airflow-e2e-tests/docker/go.yml",), {