Validate Databricks Repos operators' template fields after rendering#70341
Merged
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>
1fanwang
requested review from
amoghrajesh,
ashb,
bugraoz93,
gopidesupavan,
jason810496,
jscheffl and
potiuk
as code owners
July 23, 2026 22:23
1fanwang
marked this pull request as draft
July 24, 2026 05:47
1fanwang
marked this pull request as ready for review
July 24, 2026 06:23
shahar1
reviewed
Jul 24, 2026
shahar1
left a comment
Contributor
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>
shahar1
approved these changes
Jul 24, 2026
Contributor
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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