Check Campaign Manager delete report arguments after rendering - #70530
Open
mitre88 wants to merge 1 commit into
Open
Check Campaign Manager delete report arguments after rendering#70530mitre88 wants to merge 1 commit into
mitre88 wants to merge 1 commit into
Conversation
Both report_name and report_id are template fields, but the operator verified them with truthiness checks in __init__, so a Jinja expression always counted as provided and rendered values were never re-checked. The checks now run at execute time on the rendered values, and the two AirflowException usages are narrowed to ValueError per the ongoing exception clean-up. 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:33
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.
GoogleCampaignManagerDeleteReportOperatorlists bothreport_nameandreport_idintemplate_fieldsbut validates them with truthiness checks in__init__. A Jinja expression is always truthy, so templated values were never actually validated — a pair of expressions rendering to empty strings sailed through andexecutesilently did nothing. The checks now run at the start ofexecute()against the rendered values.Since these are truthiness checks on rendered values (empty string counts as not provided), not pure
is Noneprovision checks, they are genuine under the relaxed definition proposed in #70505.While touching them, the two
raise AirflowExceptionusages are narrowed toValueErrorper the ongoing exception clean-up; theknown_airflow_exceptions.txtentry for this file drops from 2 to 0.Added a parametrized test that constructs the operator with a templated
report_nameand validates both failure modes at execute time — it fails against the previous implementation. The class is removed from the exemption list and both prek checks pass locally.Note: a coordination note for this class was posted on #70296 on Jul 24, but no PR has appeared since; following the "better PR wins" convention rather than letting the entry stall.
Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code (Fable 5) following the guidelines