Repository navigation
Fix supervisor schema snapshot so go model generation works - #73531
Merged
Merged
Conversation
amoghrajesh
requested review from
ashb,
bugraoz93,
gopidesupavan,
jason810496,
jscheffl and
potiuk
as code owners
September 22, 2026 09:41
1 task
jason810496
approved these changes
Sep 22, 2026
jason810496
left a comment
Member
There was a problem hiding this comment.
Technically approve to solve the CI failure from main.
Member
|
Merge to unblock the CI failure from main. |
This was referenced Sep 30, 2026
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.
Was generative AI tooling used to co-author this PR?
Motivation
The go generate models just rule fails on main with:
The supervisor schema describes messages passed between the supervisor and language SDKs. The Go SDK generates its models from that file. One field,
LiteralArgBinding.value, is free-form: it can hold any JSON value.Pydantic describes that field's type as an empty schema:
"JsonValue": {}That is correct JSON Schema because an empty schema means "anything" but it gives a code generator nothing to work from. The field is also optional, so the schema says "either that, or null", and
go-jsonschemacannot turn "anythingplus null" into a Go type. It gives up.
Nobody noticed because no CI job and no prek hook runs the generator. It is a manual step, run only when the schema changes. (Maybe we fix that in a follow up)
What changed
Where the snapshot would emit an empty definition, it now spells out the same meaning as an explicit list of JSON types. The generator then picks
interface{}, which is what the previously committed models already used.The
titleis there so--struct-name-from-titlekeeps emitting a named type instead of inlining the union at every use site.This does not change what any message can carry.
check-supervisor-schemas-versionsagrees and does not ask for a schema version bump, which it would if the wire format had changed.About the size of the diff
The change to the schema itself is one definition. The large diff in
models.gen.goanddefaults.gen.gois not produced by this fix: those files were last regenerated before the generator broke, so they have drifted from the schema since. Running the generator catches all of that up at once.Some of the catch-up changes types the Go SDK exposes, for example:
Worth a careful look. All Go tests pass against the regenerated models.
Testing
Run on this branch:
cd go-sdk && just generate-models- succeeds (fails onmain)go build ./...0 cleango test ./...- all 12 packages passcd ts-sdk && pnpm exec tsc --noEmit- cleanpnpm testints-sdk- 22 files, 355 tests passprek run check-supervisor-schemas-versions --all-files- passesprek run generate-supervisor-schemas-snapshot --all-files- reproduces the committed schemaAlso confirmed the failure is not environmental: it reproduces on a clean
origin/mainworktree, under the Go version CI pins (1.25.13) as well as 1.27.1, and ongo-jsonschemav0.24.1 as well as the pinned v0.23.1. So a generatorversion bump is not an alternative fix.
{pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.