Uh oh!
There was an error while loading. Please reload this page.
Validate Databricks Repos operators' template fields after rendering - #70341
Conversation
branch, tag and repo_path are template fields, rendered after __init__ runs. The Create, Update and Delete Repos operators enforced their mutual-exclusivity and presence combinations in the constructor, acting on the un-rendered Jinja expressions. Move those checks into execute(), preserving order; git_url/git_provider detection reads no template field and stays in __init__. related: apache#70296 Signed-off-by: 1fanwang <1fannnw@gmail.com>
shahar1
left a comment
There was a problem hiding this comment.
Could you please resolve conflicts?
…s-init Signed-off-by: 1fanwang <1fannnw@gmail.com> # Conflicts: # scripts/ci/prek/validate_operators_init_exemptions.txt
Signed-off-by: 1fanwang <1fannnw@gmail.com>
Uh oh!
There was an error while loading. Please reload this page.
Backport failed to create: v3-3-test. View the failure log Run detailsNote: As of Merging PRs targeted for Airflow 3.X In matter of doubt please ask in #release-management Slack channel.
You can attempt to backport this manually by running: cherry_picker 82a2c91 v3-3-testThis should apply the commit to the v3-3-test branch and leave the commit in conflict state marking After you have resolved the conflicts, you can continue the backport process by running: cherry_picker --continueIf you don't have cherry-picker installed, see the installation guide. |
…pache#70341) Validate Databricks Repos operators' template fields after rendering branch, tag and repo_path are template fields, rendered after __init__ runs. The Create, Update and Delete Repos operators enforced their mutual-exclusivity and presence combinations in the constructor, acting on the un-rendered Jinja expressions. Move those checks into execute(), preserving order; git_url/git_provider detection reads no template field and stays in __init__. related: apache#70296
branch,tagandrepo_pathare template fields, so they are rendered after__init__runs. The Create, Update and Delete Repos operators enforced their mutual-exclusivity and presence combinations in the constructor, acting on the un-rendered Jinja expressions — so a templatedbranch/tag/repo_pathcouldn't resolve before the check ran. Move those checks intoexecute(), preserving order. Thegit_url/git_providerdetection reads no template field and stays in__init__.related: #70296
Testing Done
Updated each operator's
test_init_exceptionto construct first, then assert theAirflowExceptionsurfaces fromexecute()(covering all combinations: branch+tag, neither; repo_id+repo_path, neither). All three fail on the pre-fix source (the constructor raises first) and pass after.test_databricks_repos.py: 11 passed.validate_operators_init.pyexits 0; theraise AirflowExceptioncount is unchanged.Was generative AI tooling used to co-author this PR?
Generated-by: GitHub Copilot CLI following the guidelines