Skip to content

Go SDK: Write the edge label text before the task - #75185

Merged
jason810496 merged 2 commits into
apache:mainfrom
FrankYang0529:go-sdk-label-syntax
Oct 22, 2026
Merged

jason810496 merged 2 commits into
apache:mainfrom
FrankYang0529:go-sdk-label-syntax

Conversation

@FrankYang0529

Copy link
Copy Markdown
Member

Change label form from airflow.Label(node, text) to airflow.Label(text).On(node) as Java SDK's edge labels (#74523).

  • airflow.Label(text) returns a *airflow.LabelRef. (*LabelRef).On(node, more...) returns the Node to pass to Before or After. The signature of On requires at least one node, so the compiler rejects a call with none. When On gets several nodes, the edges to all of them get the same label, as in Python's a >> Label("forks") >> [b, c].
  • airflow.Label now panics on text that is only white space, not only on empty text. Before and After now panic when their receiver carries a label.

Was generative AI tooling used to co-author this PR?
  • Yes - Claude Code

@FrankYang0529
FrankYang0529 marked this pull request as ready for review October 20, 2026 06:05

@jason810496 jason810496 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the cleanup, LGTM overall, here're some findings by the agent review.

Comment thread go-sdk/airflow/node.go Outdated
Comment thread go-sdk/airflow/node.go
Comment thread go-sdk/airflow/node.go Outdated
Comment thread go-sdk/airflow/node_test.go
Comment thread go-sdk/adr/0008-native-dag-interface.md
Comment thread go-sdk/adr/0008-native-dag-interface.md
Comment thread go-sdk/airflow/node.go
Comment thread go-sdk/airflow/node.go Outdated
Comment thread go-sdk/airflow/node.go Outdated
Comment thread go-sdk/airflow/node.go Outdated
Signed-off-by: PoAn Yang <payang@apache.org>
Signed-off-by: PoAn Yang <payang@apache.org>

@jason810496 jason810496 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the update, LGTM overall.

@jason810496 jason810496 added the backport-to-v3-4-test Backport to v3-4-test label Oct 22, 2026
@jason810496 jason810496 added this to the Airflow 3.4.0 milestone Oct 22, 2026
@jason810496
jason810496 merged commit 70b95a2 into apache:main Oct 22, 2026
78 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

Backport successfully created: v3-4-test

Note: As of Merging PRs targeted for Airflow 3.X
the committer who merges the PR is responsible for backporting the PRs that are bug fixes (generally speaking) to the maintenance branches.

In matter of doubt please ask in #release-management Slack channel.

Status Branch Result
✅ v3-4-test PR Link

github-actions Bot pushed a commit to aws-mwaa/upstream-to-airflow that referenced this pull request Oct 22, 2026
…#75185)

* Go SDK: Write the edge label text before the task

Signed-off-by: PoAn Yang <payang@apache.org>

* Go SDK: Reject labels with no edge and name nil task positions

Signed-off-by: PoAn Yang <payang@apache.org>

---------
(cherry picked from commit 70b95a2)

Co-authored-by: PoAn Yang <payang@apache.org>
Signed-off-by: PoAn Yang <payang@apache.org>
@FrankYang0529
FrankYang0529 deleted the go-sdk-label-syntax branch October 22, 2026 01:57
aws-airflow-bot pushed a commit to aws-mwaa/upstream-to-airflow that referenced this pull request Oct 22, 2026
…#75185)

* Go SDK: Write the edge label text before the task

Signed-off-by: PoAn Yang <payang@apache.org>

* Go SDK: Reject labels with no edge and name nil task positions

Signed-off-by: PoAn Yang <payang@apache.org>

---------
(cherry picked from commit 70b95a2)

Co-authored-by: PoAn Yang <payang@apache.org>
Signed-off-by: PoAn Yang <payang@apache.org>
jason810496 pushed a commit that referenced this pull request Oct 22, 2026
#75365)

* Go SDK: Write the edge label text before the task



* Go SDK: Reject labels with no edge and name nil task positions



---------
(cherry picked from commit 70b95a2)

Signed-off-by: PoAn Yang <payang@apache.org>
Co-authored-by: PoAn Yang <payang@apache.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants