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

   related: #74944
   
   ---
   
   A Python task logs a warning when it writes a task state value larger than 
`[state_store] max_value_storage_bytes`, but a Go task writes the same value 
silently: the coordinator never passed the limit to the language SDK runtime, 
and neither the supervisor nor the Execution API checks the size. This closes 
the TODO left for it in #73420.
   
   The coordinator now passes the limit the same way it passes 
`default_retention_days`, and the Go task state `Set` warns on an oversized 
value and still writes it, as the Python setter does.
   
   Decisions worth a look:
   - **Size is `len(json.dumps(value))` as Python computes it**, since that is 
what the Python setter and REST API compare and what the Execution API stores. 
Go's `encoding/json` output differs (no space after `,`/`:`, raw UTF-8, `1` 
instead of `1.0`), so the size is computed from the value as the supervisor 
decodes it instead. Checked against CPython on 120,000 random values with no 
mismatch.
   - **An absent variable skips the check**, so a Go SDK release running under 
an older coordinator keeps working; an unparsable value still fails like 
`getint`.
   - The integer parsing behind `default_retention_days` (which accepts `"7.0"` 
like `getint`) is now shared by both settings.
   
   TypeScript and Java have the same TODO (#73618, #73464); I'll follow up with 
them in separate PRs.
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes (please specify the tool below)
   
   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)
   
   ---
   
   * Read the **[Pull Request 
Guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#pull-request-guidelines)**
 for more information. Note: commit author/co-author name and email in commits 
become permanently public when merged.
   * For fundamental code changes, an Airflow Improvement Proposal 
([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvement+Proposals))
 is needed.
   * When adding dependency, check compliance with the [ASF 3rd Party License 
Policy](https://www.apache.org/legal/resolved.html#category-x).
   * For significant user-facing changes create newsfragment: 
`{pr_number}.significant.rst`, in 
[airflow-core/newsfragments](https://github.com/apache/airflow/tree/main/airflow-core/newsfragments).
 You can add this file in a follow-up commit after the PR is created so you 
know the PR number.
   


-- 
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