Skip to content

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

Open
FrankYang0529 wants to merge 1 commit into
apache:mainfrom
FrankYang0529:go-sdk-label-syntax
Open

FrankYang0529 wants to merge 1 commit 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

Signed-off-by: PoAn Yang <payang@apache.org>
@FrankYang0529
FrankYang0529 marked this pull request as ready for review October 20, 2026 06:05

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant