Preserve setup principal-role properties - #5281
Open
mattfaltyn wants to merge 3 commits into
Open
Conversation
|
|
||
| def _export_principal_roles(self, api: PolarisDefaultApi) -> List[str]: | ||
| """Export all principal role names.""" | ||
| def _export_principal_roles(self, api: PolarisDefaultApi) -> List[Any]: |
Contributor
There was a problem hiding this comment.
Should we change to List[Union[str, Dict[str, Any]]] instead?
Contributor
Author
There was a problem hiding this comment.
Good call — updated both annotations to List[Union[str, Dict[str, Any]]].
| @@ -308,6 +308,7 @@ def test_setup_export(self, mock_isfile: MagicMock, mock_file: MagicMock) -> Non | |||
|
|
|||
Contributor
There was a problem hiding this comment.
Should we add test case when no name is set?
Contributor
Author
There was a problem hiding this comment.
Thanks — added coverage confirming nameless role objects are skipped without creating a role.
| self.assertEqual(len(exported), 1) | ||
| self.assertEqual( | ||
| exported[0]["endpoint_internal"], "https://bucket.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com" | ||
| exported[0]["endpoint_internal"], |
Contributor
There was a problem hiding this comment.
NIT: this is not related to this PR.
Contributor
Author
There was a problem hiding this comment.
Agreed — removed the unrelated formatting change.
mattfaltyn
force-pushed
the
fix-5280-setup-principal-role-properties
branch
from
August 14, 2026 09:12
baeb45b to
d3a7264
Compare
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 exportcurrently serializes principal roles as names only, so applying an exported configuration silently recreates roles without their user-defined properties.This change:
nameandpropertieswhen properties are present;setup apply, preserving backward compatibility with existing setup files;Fixes #5280
Validation
make client-lintmake client-unit-test— 184 passedmake client-license-checkmake client-build— sdist and wheel built successfullycd site/it && uv run pytest— 27 passedJAVA_HOME=/opt/homebrew/opt/openjdk@21/libexec/openjdk.jdk/Contents/Home ./gradlew format compileAll— BUILD SUCCESSFULsite/content/guides/assets/polaris/reference-setup-config.yamlwithyaml.safe_loadgit diff --checkChecklist
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.