fix(namespace): allow create_branch bootstrap on managed tables#7415
Open
geruh wants to merge 2 commits into
Open
fix(namespace): allow create_branch bootstrap on managed tables#7415geruh wants to merge 2 commits into
geruh wants to merge 2 commits into
Conversation
create_table_version resolves a branch via resolve_branch_for_commit: a branch chain accepts a commit when the BranchContents ref already exists or when the chain has no committed versions yet (the create_branch bootstrap, whose first commit precedes its ref). A chain with versions but no ref is a zombie and stays rejected. Adds test_create_branch_on_managed_dataset_succeeds; managed zombie rejection through create_table_version is already covered by test_branch_ops_reject_zombie_branch. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
dantasse
approved these changes
Jun 23, 2026
dantasse
left a comment
There was a problem hiding this comment.
Cool, looks like a good solution to me!
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.
This PR picks up on the work in #7403 by @dantasse.
create_branchon managed tables callscreate_table_versionbefore_refs/branches/<branch>.jsonexists, andresolve_branch_locationrequires that ref. Bootstrap commit fails.create_table_versionnow goes throughresolve_branch_for_commitinstead check the ref first, and if it's missing only allow the commit when the branch chain has no versions yet. Versions without a ref still get rejected (zombie).create_branch("exp")used to fail on the first commit becausecreate_table_versionlooked for_refs/branches/exp.jsonbefore phase 2 wrote it.Testing
test_create_branch_on_managed_dataset_succeeds.test_branch_ops_reject_zombie_branch.