mitre88 opened a new pull request, #70529:
URL: https://github.com/apache/airflow/pull/70529

   Part of the template-field validation burn-down tracked in #70296.
   
   `CloudDataTransferServiceCreateJobOperator` lists `body` in 
`template_fields` but deep-copies and validates it in `__init__`. With a fully 
templated `body` (a Jinja expression or XComArg), the validator ran against the 
un-rendered expression, so `TransferJobValidator`'s checks — the AWS-credential 
restriction and the single-data-source rule — were silently bypassed. The deep 
copy and validation now run at the start of `execute()`, against the rendered 
value, right before `TransferJobPreprocessor` mutates the body.
   
   Added a test constructing the operator with a templated `body` that renders 
to a body embedding AWS credentials — with the previous implementation the 
credential check never fires and the job is created; now it raises before 
calling the hook. The class is removed from the exemption list and the 
`validate-operators-init` check passes locally.
   
   Per the discussion in #70505 this is a genuine value read (validation of the 
rendered dict), not an argument-provision check.
   
   ---
   
   ##### 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]

Reply via email to