Skip to content

Add support for listing all branches of a namespace that is a git root#1915

Merged
shangyian merged 4 commits intoDataJunction:mainfrom
shangyian:namespace-branches
Mar 25, 2026
Merged

Add support for listing all branches of a namespace that is a git root#1915
shangyian merged 4 commits intoDataJunction:mainfrom
shangyian:namespace-branches

Conversation

@shangyian
Copy link
Copy Markdown
Collaborator

@shangyian shangyian commented Mar 25, 2026

Summary

This PR adds a new endpoint (GET /namespaces/{namespace}/branches) that lists all branch namespaces under a git root namespace, returning per-branch health metadata like node count, invalid node count, git-only flag, and the last successful deployment timestamp.

The default branch (e.g. something.main) is always sorted first regardless of parent_namespace convention, which handles namespaces predating the parent_namespace field. All counts are computed in a single query via correlated subqueries.

Test Plan

  • PR has an associated issue: #
  • make check passes
  • make test shows 100% unit test coverage

Deployment Plan

@netlify
Copy link
Copy Markdown

netlify bot commented Mar 25, 2026

Deploy Preview for thriving-cassata-78ae72 canceled.

Name Link
🔨 Latest commit a43b426
🔍 Latest deploy log https://app.netlify.com/projects/thriving-cassata-78ae72/deploys/69c35d3755c1eb0008fb49a6

@shangyian shangyian force-pushed the namespace-branches branch from 1765dc9 to 8c02fb4 Compare March 25, 2026 01:57
@shangyian shangyian changed the title Add support for listing all branches of a namespace that is a git roo… Add support for listing all branches of a namespace that is a git root Mar 25, 2026
@shangyian shangyian marked this pull request as ready for review March 25, 2026 04:45
@shangyian shangyian merged commit dbd8e4b into DataJunction:main Mar 25, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant