shahar1 commented on PR #70531:
URL: https://github.com/apache/airflow/pull/70531#issuecomment-5783712495
**Edit:** two corrections I made after review (drafted by Claude Code).
- The `AttributeError` claim above is wrong. A fully templated `body` did
not crash — it failed
silently. `ZipPathPreprocessor` runs `x in self.body` membership checks,
which degrade to
substring tests when `body` is still a Jinja string, so all three return
`False`,
`upload_function` stays `False`, the zip is never uploaded and
`sourceUploadUrl` is never
populated. A wrong result, not a parse-time error. The same pre-render trap
applies to
`api_version`: an un-rendered `"{{ ... }}"` matches no `api_version`-gated
validation spec,
so version-specific fields such as `sourceRepositoryUrl` were skipped
entirely.
- The test list is also stale. `test_templated_body_deploys_after_rendering`
passed against
unmodified `main` and was replaced by three tests that each fail without
this change:
`test_templated_body_with_zip_path_uploads_after_rendering`,
`test_templated_location_rendered_empty_raises` and
`test_templated_api_version_validates_after_rendering` — one per templated
field.
--
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]