Fix setup round trips for dotted namespace levels - #5292
Open
mattfaltyn wants to merge 1 commit into
Open
Conversation
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
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
polaris setup exportflattened namespace paths with".".join(...), whilesetup applyreconstructed them with.split("."). That made a literal namespace levelsuch as
["finance.us"]indistinguishable from the nested namespace["finance", "us"], affecting namespaces, policies, and namespace-scoped grants.This change:
Fixes #5291
Validation
make client-regeneratemake client-unit-test— 187 passedmake client-lintmake client-license-checkmake client-build— sdist and wheel built successfullyJAVA_HOME=/opt/homebrew/opt/openjdk@21/libexec/openjdk.jdk/Contents/Home ./gradlew format compileAllJAVA_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 checkgit diff --checkCompatibility
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
CHANGELOG.mdsite/content/in-dev/unreleasedand the reference setup configurationAI assistance
This change was prepared with significant AI assistance. I reviewed the implementation end to end
and remain responsible for the contribution.