henry3260 opened a new pull request, #73528:
URL: https://github.com/apache/airflow/pull/73528

   The Go SDK's authoring API was replaced by the `airflow` package (#73277, 
#73394, #73426), but the docs still taught the removed one. Following them 
today produces a bundle that does not compile, and handlers the runtime rejects 
at registration.
   
   This is the migration step that has to land between the new surface and the 
removal of the old one.
   
   ### What changed
   
   `airflow-core/docs/authoring-and-scheduling/language-sdks/go.rst` 
(user-facing) and `go-sdk/README.md`:
   
   - The entry point is now `airflow.Bundle()` / `Register` / 
`airflow.TaskHandler(dagId, taskId, fn)` / `Serve`, replacing 
`bundlev1.BundleProvider` and `RegisterDags`.
   - **Both ids are written out explicitly.** The old docs said "task_id is 
taken from the function name", which silently produces a bundle whose tasks the 
supervisor cannot find.
   - Parameters are no longer injected by type. Every handler takes an 
`airflow.Context` first and reaches the logger, client, task instance and Dag 
run through it; declaring an `sdk.Client` or `*slog.Logger` parameter is now 
rejected. The "Injected value" table became a table of Context methods.
   - The rst gained the TaskFlow argument-binding section it never had, plus 
the `airflow.NewContext` unit-testing story. Binding rules stay single-sourced 
in the README so the two documents cannot drift.
   
   Also: two stale comments (`example/bundle/concurrentxcom`, 
`pack_integration_test.go`), and ADR 0007 spelled the shipped interface 
`Registraterable` rather than `Registerable`.
   
   No Go code changes — `go-sdk/example/` and 
`kubernetes-tests/lang_sdk/go_example/` were migrated in #73426, and the e2e 
suite packs the example bundle, so it follows along.
   
   ### Deliberately not in scope
   
   ADRs 0002, 0003 and 0005 still describe the old interface. #73426 annotated 
0001 with `(removed)` rather than rewriting it; applying that same treatment is 
a separate, mechanical change and is left for a follow-up PR to keep this one 
reviewable.
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes — Claude Code (Opus 5)
   
   Generated-by: Claude Code (Opus 5) following [the 
guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to