Eason09053360 opened a new pull request, #76284: URL: https://github.com/apache/airflow/pull/76284
## Why Python's `BaseOperator` caps `priority_weight` with `db_safe_priority` (#43611) so it fits the 32-bit `task_instance.priority_weight` column, but the Go SDK serialized the weight as the author set it. A Go task with a `PriorityWeight` outside that range made Postgres reject the task instance insert with `integer out of range`, the same error as #22781. ## What `serializeTaskLocked` in `go-sdk/airflow/serialize.go` now caps `PriorityWeight` to the int32 range, so a Go Dag serializes the weight Python would. `TestSerializeCapsThePriorityWeightAsPythonDoes` covers one past each bound and skips where `int` is 32 bits. Separately, core still leaves the summed `downstream`/`upstream` weight uncapped for every Dag (since #48818); this PR does not touch that. --- ##### Was generative AI tooling used to co-author this PR? - [X] Yes — Claude Code (Opus 5.5) Generated-by: Claude Code (Opus 5.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]
