mitre88 opened a new pull request, #70530: URL: https://github.com/apache/airflow/pull/70530
Part of the template-field validation burn-down tracked in #70296. `GoogleCampaignManagerDeleteReportOperator` lists both `report_name` and `report_id` in `template_fields` but 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 and `execute` silently did nothing. The checks now run at the start of `execute()` against the rendered values. Since these are truthiness checks on rendered values (empty string counts as not provided), not pure `is None` provision checks, they are genuine under the relaxed definition proposed in #70505. While touching them, the two `raise AirflowException` usages are narrowed to `ValueError` per the ongoing exception clean-up; the `known_airflow_exceptions.txt` entry for this file drops from 2 to 0. Added a parametrized test that constructs the operator with a templated `report_name` and 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? - [X] Yes — Claude Code (Fable 5) Generated-by: Claude Code (Fable 5) following [the guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
