Skip to content

Commit b4fe992

Browse files
jason810496claude
andcommitted
Rework the lang-SDK k8s harness for mixed-language and native Dag tests
Renames the combined Go + Java system test to mixed-language and adds TypeScript to it, adds one native Dag test per language SDK (Java and TypeScript; Go is skipped, native Dag parsing has no Go support yet), and drops the TypeScript-only gate: every lang-SDK artifact now builds unconditionally. Every coordinator queue now shares one runtime image (prod + JRE + Node) and one worker pod template. A coordinator downloads its own task_handler_bundle_name bundle directly from S3, the same way any Python Dag bundle works, so the init container and stage_artifacts.py staging step are gone -- restoring the Go binary's execute bit after an S3 download is now ExecutableCoordinator's own job (see the executable-bundle-exec-bit PR this depends on). Every task-handler bucket carries an .airflowignore so the Dag processor never tries to parse a packed artifact as a Dag; the two native buckets carry none, since parsing them is the point. With one coordinator per language, no [sdk] dag_bundle_to_coordinator entry is needed. Also updates the k8s CI job to provision Node, and the breeze docs and unit tests to match. Co-Authored-By: Claude <noreply@anthropic.com>
1 parent ba9b3af commit b4fe992

31 files changed

Lines changed: 1208 additions & 1077 deletions

‎.github/workflows/k8s-tests.yml‎

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ jobs:
106106
# preparing k8s environment with uv takes < 15 seconds with `uv` - there is no point in caching it.
107107
# The lang-SDK coordinator system test is intentionally NOT run in this matrix. It has its own
108108
# dedicated single-combo job (tests-kubernetes-lang-sdk below), so it no longer adds the ~6 minutes
109-
# of Go/Java build + coordinator run to each of these system-test jobs.
109+
# of Go/Java/TypeScript build + coordinator run to each of these system-test jobs.
110110
- name: "\
111111
Run complete K8S tests ${{ matrix.executor }}-${{ env.PYTHON_MAJOR_MINOR_VERSION }}-\
112112
${{env.KUBERNETES_VERSION}}-${{ matrix.use-standard-naming }}"
@@ -140,11 +140,12 @@ jobs:
140140
run: breeze k8s delete-cluster --all
141141
if: always()
142142

143-
# The Multi-Lang KubernetesExecutor coordinator system test builds a Go bundle and a Java jar and runs
144-
# them as workers under KubernetesExecutor. It is executor/naming/version-independent, so instead of
145-
# bolting it onto all six ``KubernetesExecutor``/``use-standard-naming == false`` system-test jobs above
146-
# (which ran it redundantly and added ~6 minutes each), it runs once here on a single default combo and
147-
# executes only the lang-SDK test (``-k test_lang_sdk_combined_dag_succeeds``) - not the full suite.
143+
# The lang-SDK KubernetesExecutor coordinator system tests build a Go bundle, Java jars and
144+
# TypeScript bundles and run them as workers under KubernetesExecutor. They are
145+
# executor/naming/version-independent, so instead of bolting them onto all six
146+
# ``KubernetesExecutor``/``use-standard-naming == false`` system-test jobs above (which ran them
147+
# redundantly and added several minutes each), they run once here on a single default combo and
148+
# execute only the lang-SDK tests (``-k TestLangSdk``) - not the full suite.
148149
tests-kubernetes-lang-sdk:
149150
timeout-minutes: 60
150151
name: "K8S Lang-SDK:${{ inputs.lang-sdk-kubernetes-combo }}"
@@ -182,7 +183,7 @@ jobs:
182183
use-uv: ${{ inputs.use-uv }}
183184
make-mnt-writeable-and-cleanup: true
184185
id: breeze
185-
# Provision the lang-SDK Go/Java toolchains on the host so breeze builds the artifacts natively
186+
# Provision the lang-SDK Go/Java/Node toolchains on the host so breeze builds the artifacts natively
186187
# (LANG_SDK_NATIVE_TOOLCHAIN=true) instead of in throwaway toolchain containers, skipping the image
187188
# pulls and reusing the caches restored below. The module/build and Gradle caches are keyed
188189
# explicitly (rather than via the setup-* built-in caching) so the key carries an ``-vN-`` salt:
@@ -213,15 +214,28 @@ jobs:
213214
path: |
214215
~/.gradle/caches
215216
~/.gradle/wrapper
216-
key: lang-sdk-gradle-v1-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('java-sdk/**/*.gradle*', 'java-sdk/**/gradle-wrapper.properties', 'kubernetes-tests/lang_sdk/java_example/**/*.gradle*') }} # yamllint disable-line rule:line-length
217+
key: lang-sdk-gradle-v1-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('java-sdk/**/*.gradle*', 'java-sdk/**/gradle-wrapper.properties', 'kubernetes-tests/lang_sdk/java_example/**/*.gradle*', 'airflow-e2e-tests/java-native-bundle/**/*.gradle*') }} # yamllint disable-line rule:line-length
217218
restore-keys: |
218219
lang-sdk-gradle-v1-${{ runner.os }}-${{ runner.arch }}-
220+
- name: "Setup pnpm for the lang-SDK TypeScript build"
221+
uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0
222+
with:
223+
package_json_file: ts-sdk/package.json
224+
run_install: false
225+
- name: "Setup Node for the lang-SDK TypeScript build"
226+
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
227+
with:
228+
node-version: 22
229+
cache: 'pnpm'
230+
cache-dependency-path: |
231+
ts-sdk/pnpm-lock.yaml
232+
kubernetes-tests/lang_sdk/ts_example/pnpm-lock.yaml
219233
# No --upgrade here: the redeploy/upgrade path is already exercised across the main matrix above;
220-
# this job only needs a single deploy to validate the Multi-Lang coordinator, saving ~1.5 minutes.
221-
- name: "Run lang-SDK K8S test ${{ inputs.lang-sdk-kubernetes-combo }}"
234+
# this job only needs a single deploy to validate the lang-SDK coordinators, saving ~1.5 minutes.
235+
- name: "Run lang-SDK K8S tests ${{ inputs.lang-sdk-kubernetes-combo }}"
222236
run: >-
223237
breeze k8s run-complete-tests --no-copy-local-sources
224-
-- -k test_lang_sdk_combined_dag_succeeds
238+
-- -k TestLangSdk
225239
env:
226240
EXECUTOR: "KubernetesExecutor"
227241
USE_STANDARD_NAMING: "false"

‎dev/breeze/doc/05_test_commands.rst‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -591,11 +591,11 @@ Setting up the lang-SDK coordinator system test
591591
...............................................
592592

593593
``breeze k8s setup-lang-sdk-test`` provisions a cluster for the lang-SDK coordinator
594-
system test: it builds the Go and Java example bundles, deploys an in-cluster localstack
595-
S3, uploads the artifacts and the Python stub Dag to their buckets, renders the
596-
coordinator pod-template image placeholders, and installs the Helm release configured for
597-
the ``golang`` and ``java`` queues. After it completes, run the test with
598-
``breeze k8s tests``.
594+
system tests: it builds the Go, Java and TypeScript example bundles (mixed-language and
595+
native), deploys an in-cluster localstack S3, uploads the artifacts and the Dag files to
596+
their buckets, builds and loads the shared runtime image (prod + JRE + Node), and installs
597+
the Helm release configured for the ``golang``, ``java``, ``java-native`` and ``typescript``
598+
queues. After it completes, run the tests with ``breeze k8s tests``.
599599

600600
All parameters of the command are here:
601601

‎dev/breeze/doc/images/output_k8s.svg‎

Lines changed: 6 additions & 6 deletions
Loading
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
7275bb89187fba314464a6566f7bf7fe
1+
e9520ded47d3061a2ee5357531b97d3e

0 commit comments

Comments
 (0)