[DON'T MERGE] Go-SDK with Coordinator interface#67032
Draft
jason810496 wants to merge 57 commits into
Draft
Conversation
- Introduced the `apache-airflow-providers-languages-java` package with version 0.1.0. - Added Java-specific task coordinators and DAG file processors. - Created documentation including README, changelog, and installation instructions. - Implemented provider info retrieval and commit tracking. - Established testing framework with initial unit tests for Java provider components.
…ng for improved performance and reliability
…e related components
- Renamed all instances of "process coordinators" to "runtime coordinators" in the codebase. - Updated the ProvidersManager and ProvidersManagerTaskRuntime classes to handle runtime coordinators. - Modified the DagFileProcessorManager to collect file extensions from runtime coordinators. - Adjusted the Java provider to implement the new runtime coordinator structure. - Updated tests to reflect changes from process to runtime coordinators.
…_runtime_mapping] config
Tweak coordinator class names, attribute names, and method names to be shorter and avoid the term 'runtime'.
- Remove Java SDK setup in Dockerfile - add multi-language extras documentation - Update TaskInstanceDTO description, and adjust API version in generated files
* Add 'sdk' to empty_subpackages in provider_conf so the autoapi- generated _api/airflow/providers/sdk/index.rst is excluded the same way the other namespace-only directories are. Without this, Sphinx warned that the document was not in any toctree. * Fix the relative include paths in security.rst and installing- providers-from-sources.rst. Nested providers (those under a namespace package like sdk/) sit one directory deeper than flat providers, so the include needs four ../ segments instead of three to reach devel-common/src/sphinx_exts/includes/.
- Introduced the `apache-airflow-providers-languages-executable` provider with version 0.1.0. - Updated `pyproject.toml` to include the new provider in dependencies and mypy paths. - Modified CI Docker Compose files to include paths for the new provider's source and tests. - Implemented `BaseRuntimeCoordinator` for handling non-Python DAG file processing and task execution. - Added selector-based I/O loop utilities for managing socket communication between the supervisor and runtime subprocesses. - Enhanced task runner to resolve and verify access to DAG bundles for runtime coordinators.
…ocumentation and codebase
…etadata and source
- Add `messages_test.go` to test message decoding and encoding functionalities. - Introduce `serde.go` for serialization of various data types to Airflow's format. - Create `serde_test.go` to validate serialization logic and ensure correctness. - Implement `server.go` to handle communication with the supervisor and manage task execution. - Add `task_runner.go` to execute tasks based on received startup details and handle success/failure.
…etection and update documentation accordingly
- Added new command `airflow-go-pack` to build a self-contained Airflow bundle from a Go package. - Introduced `inspect` command to print the embedded manifest and optionally the source from a bundle. - Implemented `dump-bundle-spec` functionality to output the bundle specification in JSON format. - Created `bundlefooter` package to manage appending source and metadata to the binary with a defined trailer. - Added tests for bundle footer operations and manifest rendering to ensure correctness. - Updated Justfile for building and packing example DAG bundles.
…proved configuration flexibility
…fter "--" and update example bundle to support dynamic DAG naming
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Disclaimer
The coordinator interface of this branch is not up to date with the latest discuss on Dev List.
I will wait until the final decision settle down then make the interface up to date and break down this PR into smaller pieces.
The implementation on this branch already worked for both "multi-lang tasks" and "defining the whole Dag in Go" features anyway.
Try it out
files/airflow-breeze-config/environment_variables.envbreeze start-airflow --backend postgresshelltabdag-processorandscheduler(pressrat scheduler and dag-processor tab)Note
The same Go source (
go-sdk/example/bundle/main.go) is built twice with a differentmain.dagIdoverride per build:/files/go-bundles//files/multi-lang-go-bundles/next tostub_dag.py(which declares the matching dag_id on the Python side).airflow-go-packforwards everything after--straight togo build, so we pass-ldflags "-X main.dagId=..."to overwrite the package-leveldagIdstring in the example bundle.