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

   Three Google provider operators — 
`CloudSpeechToTextRecognizeSpeechOperator`, 
`CloudTextToSpeechSynthesizeOperator`, and 
`CloudFirestoreExportDatabaseOperator` — validate their template fields 
(`audio`, `config`, `input_data`, `voice`, `audio_config`, 
`target_bucket_name`, `target_filename`, `body`) inside a `_validate_inputs()` 
helper called from `__init__`.
   
   Because the helper reads the fields through a method call, the 
`validate-operators-init` check cannot see these reads (same blind spot as the 
AppFlow subclasses fixed in #70440), but the bug is the same one tracked in 
#70296: the emptiness checks run against un-rendered Jinja expressions, which 
are always non-empty, so a templated value rendering to an empty string is 
never caught. The `_validate_inputs()` call is moved to the start of 
`execute()` in all three operators.
   
   While relocating them, the `raise AirflowException` usages are narrowed to 
`ValueError` per the ongoing exception clean-up (`known_airflow_exceptions.txt` 
entries for the three files drop to 0), following the pattern of #66279.
   
   Tests: converted the text-to-speech missing-argument test to the new 
exception type (it already exercised `execute`), and added execute-time tests 
for the speech-to-text and Firestore operators that construct with a templated 
value and validate the rendered value — both fail against the previous 
implementation.
   
   ---
   
   ##### 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