Generate data models from supervisor schema for Go-SDK#68629
Generate data models from supervisor schema for Go-SDK#68629jason810496 wants to merge 8 commits into
Conversation
f0a609a to
5939e8a
Compare
5939e8a to
b5001f5
Compare
…inator protocol Outbound messages rely on a single chokepoint (EnsureType) to stamp the wire "type" discriminator. A pointer body slipped through that switch unstamped, producing a frame the supervisor could not dispatch; it now stamps the pointee so the binding holds regardless of how a caller passes the body. Supervisor error replies also lost their typed error code when the detail payload was off-contract, degrading specific errors (e.g. variable-not-found) into a generic one; the code is now recovered independently so callers still see the right typed error.
uranusjr
left a comment
There was a problem hiding this comment.
Disclosure: I don’t really understand Go tooling; the reviews are highly assisted by Claude.
The HasType flag and its wrapper struct recorded which parsed structs declared a Type discriminator field, but discriminator emission now keys off the schema's "type" const rather than the parsed struct, so the flag was set and never read. Collapsing the per-struct metadata to a plain field slice removes the unread state with no change to generated output.
|
According to Claude: The The minimal fix is to add a pass in
...from With this type, the call site passes
The change to |
Why
Same as Java-SDK implementation, we should auto generate the data models that will directly be sent to the Coordinator IPC channel from
task-sdk/src/airflow/sdk/execution_time/schema/schema.json. Actually, all the Lang-SDK should follow the generating data models from supervisor schema pattern to avoid the schema drift.Was generative AI tooling used to co-author this PR?