Emit GCSListObjectsOperator delimiter deprecation warning after rendering - #70533
Conversation
257c2b9 to
e97b0a4
Compare
potiuk
left a comment
There was a problem hiding this comment.
Thanks — clean and minimal. delimiter is a template field, so warning about it in __init__ checked the raw "{{ ... }}" string: a templated delimiter never triggered the deprecation notice, and a literal one warned on every Dag-processor parse rather than once per task run.
Two things I appreciated: you used the same _warn_on_deprecated_template_fields() helper name as #70449 and #70542, which makes the pattern greppable across the campaign rather than each operator inventing its own shape; and the test wraps the existing execute call in pytest.warns with context=mock.MagicMock() rather than None — several other PRs in this batch pass None and only get away with it because nothing reads the context before the warning.
Nothing further from me.
Drafted-by: Claude Code (Opus 5); reviewed by @potiuk before posting
Backport failed to create: v3-3-test. View the failure log Run detailsNote: As of Merging PRs targeted for Airflow 3.X In matter of doubt please ask in #release-management Slack channel.
You can attempt to backport this manually by running: cherry_picker ee5f379 v3-3-testThis should apply the commit to the v3-3-test branch and leave the commit in conflict state marking After you have resolved the conflicts, you can continue the backport process by running: cherry_picker --continueIf you don't have cherry-picker installed, see the installation guide. |
related: #70296
The delimiter template field was inspected in init, so the deprecation warning fired on the unrendered Jinja value instead of the resolved one.
Move the check to execute() so it reflects the value the task actually runs with.
Was generative AI tooling used to co-author this PR?
{pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.