bujjibabukatta opened a new pull request, #71343:
URL: https://github.com/apache/airflow/pull/71343
Part of #70296.
## Summary
Moves `report_name` / `report_id` validation in
`GoogleCampaignManagerDeleteReportOperator`
from `__init__` into `execute()`, and removes the class from the
`validate-operators-init` exemption list.
## Root cause
`report_name` and `report_id` are template fields, which are rendered
*after* the
constructor runs. Validating them in `__init__` therefore checks the
un-rendered
Jinja expressions instead of the actual values — the reason this class was
on the
exemption list.
## Fix
- **`campaign_manager.py`** — moved the "provide `report_name` or
`report_id`" and
"only one of them" checks from `__init__` to the start of `execute()`;
`__init__`
now only does plain `self.field = field` assignments.
- **`validate_operators_init_exemptions.txt`** — removed the
`GoogleCampaignManagerDeleteReportOperator` entry (required in the same
PR; the
hook fails on a stale exemption once the class is compliant).
- **`test_campaign_manager.py`** — added tests asserting both invalid cases
(both
provided / neither provided) now raise from `execute()`.
Was generative AI tooling used ?
- [X] Yes - Claude
Generated-by: Claude 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]