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

   Supersedes #70794, which went stale. The original commit is preserved as-is 
with its
   author; this branch rebases it onto current `main` and adds the test coverage
   issue #70296 asks for.
   
   `CloudBuildCreateBuildOperator` kept a second copy of the templated `build` 
argument in
   `build_raw` so `prepare_template()` could read the un-rendered path. 
`prepare_template()`
   now reads `self.build` and holds the path in a local while it loads the JSON 
or YAML body,
   so the constructor only assigns its arguments to their matching fields and 
the class drops
   out of `validate_operators_init_exemptions.txt`.
   
   The operator leaves `template_ext` empty, so `resolve_template_files()` 
cannot replace
   `self.build` with file contents before `prepare_template()` runs — 
template-loading
   behaviour is unchanged. The second commit covers the two behaviour changes: 
the
   constructor no longer snapshots `build`, and a second `prepare_template()` 
call now
   short-circuits on the already-parsed dict instead of re-reading the file.
   
   related: #70296
   
   ### Validation
   
   * `uv run --project providers/google pytest 
providers/google/tests/unit/google/cloud/operators/test_cloud_build.py -q` — 38 
passed
   * Both new tests confirmed to fail against the pre-change operator 
(`FileNotFoundError` on the second `prepare_template()` call)
   * `prek run validate-operators-init --all-files` — passed (and confirmed the 
hook flags the pre-change code, so the exemption removal is load-bearing)
   * `prek run --from-ref upstream/main --stage pre-commit` — passed
   * `prek run mypy-providers` on both changed files — passed
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes — Claude Code (Opus 5)
   
   Generated-by: Claude Code (Opus 5) following [the 
guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


-- 
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