Skip to content

Validate GCSToLocalFilesystemOperator arguments after template rendering - #70489

Closed
mitre88 wants to merge 1 commit into
apache:mainfrom
mitre88:fix-gcs-to-local-template
Closed

Validate GCSToLocalFilesystemOperator arguments after template rendering#70489
mitre88 wants to merge 1 commit into
apache:mainfrom
mitre88:fix-gcs-to-local-template

Conversation

@mitre88

@mitre88 mitre88 commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

filename and store_to_xcom_key are template fields of GCSToLocalFilesystemOperator, but the "only one can be set" check ran in __init__, before Jinja rendering — so templated values were judged on their raw expressions at Dag parse time. The check now runs at the top of execute() on rendered values, with a test asserting the failure at execute time. Removes the class from the exemption list.

related: #70296


Was generative AI tooling used to co-author this PR?
  • Yes — Claude Code (Fable 5)

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

filename and store_to_xcom_key are template fields, but their mutual-exclusion
check ran in __init__, before Jinja rendering — templated values were rejected
at Dag parse time based on the raw expressions. Validate in execute() instead.
@shahar1

shahar1 commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Closing as false positive according to the up-to-date definition, see details here:
#70505
Feel free to take on the remaining operators :)

@shahar1 shahar1 closed this Jul 27, 2026
@mitre88

mitre88 commented Jul 27, 2026

Copy link
Copy Markdown
Contributor Author

Thanks — that matches the relaxed definition in #70505 (provision checks belong in __init__, and with render_template_as_native_obj the execute-time check could even misfire). Will keep contributing to the remaining operators on #70296.


Drafted-by: Claude Code (Fable 5) (no human review before posting)

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.

3 participants