Skip to content

Fix setup round trips for dotted namespace levels - #5292

Open
mattfaltyn wants to merge 1 commit into
apache:mainfrom
mattfaltyn:fix-5291-setup-dotted-namespaces
Open

Fix setup round trips for dotted namespace levels#5292
mattfaltyn wants to merge 1 commit into
apache:mainfrom
mattfaltyn:fix-5291-setup-dotted-namespaces

Conversation

@mattfaltyn

Copy link
Copy Markdown
Contributor

Summary

polaris setup export flattened namespace paths with ".".join(...), while
setup apply reconstructed them with .split("."). That made a literal namespace level
such as ["finance.us"] indistinguishable from the nested namespace
["finance", "us"], affecting namespaces, policies, and namespace-scoped grants.

This change:

  • exports namespace paths as YAML lists of levels everywhere setup state refers to a namespace;
  • preserves tuple/list namespace identities internally while creating parents, policies, and grants;
  • continues accepting legacy dot-delimited setup configurations;
  • adds round-trip regression coverage for the colliding namespace, policy, and grant cases; and
  • updates the changelog, setup guide, and reference configuration, including the compatibility note.

Fixes #5291

Validation

  • make client-regenerate
  • make client-unit-test — 187 passed
  • make client-lint
  • make client-license-check
  • make client-build — sdist and wheel built successfully
  • JAVA_HOME=/opt/homebrew/opt/openjdk@21/libexec/openjdk.jdk/Contents/Home ./gradlew format compileAll
  • JAVA_HOME=/opt/homebrew/opt/openjdk@21/libexec/openjdk.jdk/Contents/Home DOCKER_HOST=unix:///Users/mattfaltyn/.colima/default/docker.sock TESTCONTAINERS_DOCKER_SOCKET_OVERRIDE=/var/run/docker.sock TESTCONTAINERS_HOST_OVERRIDE=127.0.0.1 TESTCONTAINERS_RYUK_DISABLED=true ./gradlew check
  • git diff --check

Compatibility

Existing dot-delimited setup files remain accepted. Because the new export schema uses lists for
namespace paths, older CLI versions cannot apply newly exported files; this is documented in the
changelog.

Checklist

  • 🛡️ No security issue is disclosed
  • 🔗 The rationale is explained and the related issue is linked: Fixes Python CLI setup round trip collapses dotted namespace levels #5291
  • 🧪 Tests cover namespace, policy, and namespace-grant round trips plus legacy input compatibility
  • 💡 No comments were added because the representation-preserving logic is direct and localized
  • 🧾 Updated CHANGELOG.md
  • 📚 Updated site/content/in-dev/unreleased and the reference setup configuration

AI assistance

This change was prepared with significant AI assistance. I reviewed the implementation end to end
and remain responsible for the contribution.

Represent namespace paths as lists of levels in setup exports while continuing to accept legacy dot-delimited input. Preserve exact paths for namespaces, policies, and namespace grants, with regression coverage and documentation.

Fixes apache#5291
@github-project-automation github-project-automation Bot moved this to PRs In Progress in Basic Kanban Board Aug 14, 2026
@mattfaltyn
mattfaltyn marked this pull request as ready for review August 14, 2026 11:04
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.

Python CLI setup round trip collapses dotted namespace levels

1 participant