Repository navigation
Decode state store vals through backend; treat null as missing - #76009
Merged
Merged
Conversation
Every writer rejects a null state store value, but the task and asset read endpoints would still return a 200 with null if a backend handed one back. Treat a stored JSON null the same as a missing key, so a successful read always carries a value.
uranusjr
force-pushed
the
execution-api-store-guard
branch
from
October 30, 2026 05:39
fee21ff to
6af7480
Compare
kaxil
reviewed
Nov 1, 2026
kaxil
approved these changes
Nov 4, 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.
Split out of #76007.
A state store value can never be JSON
null, because every writer rejects it: the Execution API and public API put bodies, and the Task SDK setters. This makes that part of theBaseStoreBackendcontract and has the Execution API read endpoints rely on it.The docstrings of
BaseStoreBackend.getandsetnow state that the value is never the JSONnull. The newget_valueandaget_valuemethods decode whatgetandagetreturn, and treat both a missing key and a stored JSONnullasNone. They are not abstract, so existing backends keep working, and a backend that stores values natively rather than as JSON strings can override them to skip the round trip.The task and asset state store read endpoints in the Execution API now read through
get_value. A custom backend configured with[state_store] backendthat hands back anulltherefore gets a 404 like a missing key, instead of a 200 with{"value": null}.The public API endpoints are unchanged, since they read the metastore directly rather than the configurable backend, and nothing can write null there. The Execution API spec stays
JsonValue, so there is no version change.