Skip to content

Normalize BigQuery DTS sensor expected statuses after rendering - #70528

Open
mitre88 wants to merge 1 commit into
apache:mainfrom
mitre88:fix-bigquery-dts-sensor-template
Open

Normalize BigQuery DTS sensor expected statuses after rendering#70528
mitre88 wants to merge 1 commit into
apache:mainfrom
mitre88:fix-bigquery-dts-sensor-template

Conversation

@mitre88

@mitre88 mitre88 commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Part of the template-field validation burn-down tracked in #70296.

BigQueryDataTransferServiceTransferRunSensor lists expected_statuses in template_fields but converts it to TransferState members in __init__ via _normalize_state_list, so passing a Jinja expression raised KeyError at parse time. The sensor now stores the raw value and normalizes it in poke, after rendering.

Added a test constructing the sensor with a templated expected_statuses that passes once the field holds the rendered value — it fails against the previous implementation. The class is removed from the exemption list and the validate-operators-init check 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?
  • Yes — Claude Code (Fable 5)

Generated-by: Claude Code (Fable 5) following the guidelines

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:dev-tools area:providers backport-to-v3-3-test Backport to v3-3-test provider:google Google (including GCP) related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant