Normalize BigQuery DTS sensor expected statuses after rendering - #70528
Open
mitre88 wants to merge 1 commit into
Open
Normalize BigQuery DTS sensor expected statuses after rendering#70528mitre88 wants to merge 1 commit into
mitre88 wants to merge 1 commit into
Conversation
The sensor's expected_statuses is a template field, but the sensor normalized it to TransferState members in __init__, so a Jinja expression failed with a KeyError at parse time before rendering could supply the real value. Part of the burn-down tracked in apache#70296.
mitre88
requested review from
amoghrajesh,
ashb,
bugraoz93,
gopidesupavan,
jason810496,
jscheffl,
potiuk and
shahar1
as code owners
July 27, 2026 15:30
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.
Part of the template-field validation burn-down tracked in #70296.
BigQueryDataTransferServiceTransferRunSensorlistsexpected_statusesintemplate_fieldsbut converts it toTransferStatemembers in__init__via_normalize_state_list, so passing a Jinja expression raisedKeyErrorat parse time. The sensor now stores the raw value and normalizes it inpoke, after rendering.Added a test constructing the sensor with a templated
expected_statusesthat passes once the field holds the rendered value — it fails against the previous implementation. The class is removed from the exemption list and thevalidate-operators-initcheck passes locally.Per the discussion in #70505 this is a genuine value transformation (not an argument-provision check), so it belongs at execute time.
Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code (Fable 5) following the guidelines