본문으로 건너뛰기
cccskills
무료GitHub에 공개

airflow-new-sdk

Guides contributors through adding a new programming language to Airflow, covering SDK structure, runtime coordination, communication rules, executable packaging, tests, and the documentation and configuration changes needed for a pull request.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

원문원문 설명 보기

Guide for implementing a brand-new language SDK for Airflow (AIP-108). Use this skill when a contributor wants to add support for a new programming language — designing the Python coordinator, implementing the wire protocol in the target language, writing the bundle format, and structuring the PR. Trigger on phrases like "new language SDK", "new SDK", "add support for [language]", "implement coordinator for", "SubprocessCoordinator", "BaseCoordinator", "new runtime", "AFBNDL01", "supervisor schema", or anything about bringing a new language into the Airflow executor ecosystem.

설치 방법 보기

이럴 때 유용합니다

  • Adding support for a new programming language
  • Choosing how Airflow launches a language runtime
  • Implementing communication and executable bundles
  • Preparing tests and documentation for an SDK pull request

포함된 파일(1)

  • SKILL.md6.7 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

<!-- SPDX-License-Identifier: Apache-2.0 https://www.apache.org/licenses/LICENSE-2.0 -->

Implementing a new language SDK for Airflow

Start here

Read contributing-docs/30_new_language_sdk.rst first. It is the authoritative contributor guide for this topic — coordinator base class choices, wire protocol spec, bundle footer format, and testing requirements. Everything in this skill builds on top of it, not alongside it.


Repository layout

Every new SDK needs two things. The coordinator (Python) goes here:

task-sdk/src/airflow/sdk/coordinators/<language>/
    __init__.py        # re-export + module docstring
    coordinator.py     # subclass of SubprocessCoordinator or BaseCoordinator
task-sdk/tests/coordinators/<language>/
    test_coordinator.py
task-sdk/tests/integration/coordinators/<language>/
    test_integration.py   # requires Breeze

The language SDK itself lives in a top-level <language>-sdk/ directory (like java-sdk/ and go-sdk/). For native-executable languages using ExecutableCoordinator, no coordinator code is needed at all.


Choosing the right base class — quick guide

Does the runtime compile to a self-contained native executable?
  YES → Use ExecutableCoordinator (zero Python to write).
        Append an AFBNDL01 footer with a packer tool (see go-sdk reference).
  NO  →
    Does it start via a single shell command (node, ruby, dotnet, …)?
      YES → Subclass SubprocessCoordinator.
            Implement _build_execute_task_command only (see 30_new_language_sdk.rst).
      NO  →
        Subclass BaseCoordinator and implement execute_task from scratch.
        (Rare: gRPC daemons, shared memory, persistent processes.)

The full rationale, method signature, and socket lifecycle for each path are in 30_new_language_sdk.rst. Read that section before writing any code.


Reference implementations to study

What to studyWhere
SubprocessCoordinator base classtask-sdk/src/airflow/sdk/coordinators/_subprocess.py
Java coordinator (SubprocessCoordinator subclass)task-sdk/src/airflow/sdk/coordinators/java/coordinator.py
ExecutableCoordinator (native bundles)task-sdk/src/airflow/sdk/coordinators/executable/coordinator.py
Wire protocol in Kotlinjava-sdk/sdk/src/main/kotlin/org/apache/airflow/sdk/execution/
Wire protocol in Gogo-sdk/pkg/execution/
AFBNDL01 footer (Go reference)go-sdk/internal/bundlefooter/, task-sdk/docs/executable-bundle-spec.rst
All message types and field specstask-sdk/src/airflow/sdk/execution_time/schema/schema.json

The Java and Go implementations are the two production reference points. When implementing a new SDK, read whichever matches the target language's runtime model (JVM/interpreted → Java; native/compiled → Go).


Logging

The Logging section of 30_new_language_sdk.rst is the spec: the --logs JSON record format, the level names, and the AIRFLOW__LOGGING__* environment variables. Read it first. A few language-neutral details it leaves out:

  • Level values. Levels follow Python's logging scale, so thresholds line up with the rest of Airflow: CRITICAL=50, ERROR=40, WARNING=30, INFO=20, DEBUG=10, NOTSET=0.
  • Parsing NAMESPACE_LEVELS. Split the value on [\s,]+, then split each item on = into (logger_name, level_name). Emit a record only when its level is >= the matching logger_name threshold, or the global threshold when no per-logger entry matches.
  • Don't drop late logs. Connect the --logs socket early and keep it open until the --comm channel has finished; otherwise records emitted during teardown can be lost.
  • Extra config keys. The runtime can't read Airflow's config, so if your SDK needs [logging] settings beyond the two above, propagate them as environment variables from your coordinator's start, the same way.

For how a given language wires its native logging frameworks into this channel, read that SDK's source (e.g. java-sdk/) rather than reproducing it here.

E2E test suite

Create two files mirroring java_sdk_tests/ or go_sdk_tests/:

airflow-e2e-tests/tests/airflow_e2e_tests/<language>_sdk_tests/
    __init__.py
    test_<language>_sdk_dag.py

The test file should:

  • Trigger the SDK's example Dag (the one added to <language>-sdk/dags/ or equivalent) via AirflowClient.trigger_dag.
  • Wait for the run to finish with AirflowClient.wait_for_dag_run.
  • Assert that each SDK task instance reached "success".
  • Assert at least one XCom value — confirms the full round-trip from task return value through the supervisor to the XCom store.
  • Assert structured logs where the SDK emits them (see the Go suite for an example of log-content assertions).

Run locally with:

E2E_TEST_MODE=<language>_sdk uv run --project airflow-e2e-tests pytest \
    tests/airflow_e2e_tests/<language>_sdk_tests/ -xvs

The Java (java_sdk_tests/test_java_sdk_dag.py) and Go (go_sdk_tests/test_go_sdk_dag.py) suites are the reference implementations.


PR checklist (items not covered by 30_new_language_sdk.rst)

The 30_new_language_sdk.rst guide covers coordinator placement, wire protocol implementation, and testing. These additional items belong in the same PR:

  1. task-sdk/src/airflow/sdk/coordinators/<language>/__init__.py — short module docstring and __all__ re-export of the coordinator class.
  2. airflow-core/docs/authoring-and-scheduling/language-sdks/<language>.rst — user-facing doc following the structure of java.rst or go.rst.
  3. airflow-core/docs/authoring-and-scheduling/language-sdks/index.rst — add the new doc to the toctree.
  4. airflow-core/newsfragments/<PR>.feature.rst — a new language is always user-visible; add a newsfragment.
  5. CI wiring — check dev/breeze/src/airflow_breeze/utils/selective_checks.py to confirm <language>-sdk/ changes trigger the right test group. Add if missing.
  6. E2E tests — add a <language>_sdk_tests/ suite under airflow-e2e-tests/tests/airflow_e2e_tests/. See below.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Assess Airflow Improvement Proposals by comparing Confluence specifications with pull requests, commits, and codebase files. Produce evidence-backed progress reports showing delivered items, remaining work, and specification updates needed across one or more proposals.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Check implementation progress for an Airflow proposal
  • Compare specification deliverables with shipped code
  • Compile a progress report across multiple proposals
apache/airflow4.7만2026년 10월 18일 업데이트

Turn Airflow Improvement Proposals into practical guides checked against current code, or proposed user stories for design review before implementation. Organize use cases, distinguish verified examples from speculative code, and capture specific design questions.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Create implementation-backed guides for an Airflow proposal
  • Explore user stories before a feature is implemented
  • Separate implemented features from proposed functionality
apache/airflow4.7만2026년 10월 18일 업데이트

Helps contributors develop and fix Airflow’s Java SDK for JVM tasks. Explains public API boundaries, JAR packaging, Python coordination, communication schema updates, and the test commands used to validate changes.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Adding features or fixing bugs in the Java SDK
  • Reviewing public API and internal implementation boundaries
  • Investigating JAR discovery and JVM startup failures
apache/airflow4.7만2026년 10월 18일 업데이트

Draft commit messages, pull request titles and descriptions, and GitHub comments or reviews for Apache Airflow contributions. Follows project wording and AI attribution rules, and helps decide whether a change needs a release note.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Draft commit messages and pull request titles
  • Prepare pull request descriptions using the project template
  • Draft GitHub comments and review text
apache/airflow4.7만2026년 10월 18일 업데이트

Guides preparation and authorized publication of Apache Airflow changes, including existing pull request checks, remote verification, reviews, tests, rebasing, and a prefilled submission page. Also explains how to track work deferred by temporary fixes.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Planning the steps for submitting Airflow changes
  • Checking existing pull requests and Git remote destinations
  • Reviewing and testing changes before pushing
apache/airflow4.7만2026년 10월 18일 업데이트

Helps add or update translations for the Apache Airflow interface. Covers language setup, translation file generation, consistent terminology, preserved variables and plural forms, and checks for missing, unfinished, or unused entries.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Adding a new interface language to Airflow
  • Filling gaps in an existing translation
  • Aligning terminology and preserving translation variables
apache/airflow4.7만2026년 10월 18일 업데이트

apache의 스킬 모두 보기

이 스킬의 문제 신고