Conversation
Branch namespaces carry their own `github_repo_path`, so resolution stopped at the branch row and read `default_branch` from a row that never has one. `is_default_branch` came back false for the very namespace that tracks the repo's default branch, and the delete guard in `api/namespaces.py` let a git-backed default-branch namespace be hard-deleted. `default_branch` now comes from the first ancestor that has one, in the same most-specific-first order the repo path and the git branch already use, and that order includes the FK parent a branch namespace points at when it sits outside the string hierarchy. A branch deploy that suppresses a coverage backfill now says so in the deploy report instead of leaving the author to work out why nothing ran.
is_default_branch treated any namespace with no git_branch anywhere in its ancestor chain as the default branch, even when that namespace was just a plain child sitting under a git root (e.g. a branch namespace created without git_branch ever set on its own row). That falsely marked such children as the protected default-branch namespace, making them permanently undeletable. Now the "no branch" case only counts when the namespace resolves as its own git root.
✅ Deploy Preview for thriving-cassata-78ae72 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
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.
Summary
Test Plan
make checkpassesmake testshows 100% unit test coverageDeployment Plan