You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@polaris.apache.org by "mattfaltyn (via GitHub)" <gi...@apache.org> on 2026/07/30 08:27:05 UTC

[PR] Fix setup policy content round trips [polaris]

mattfaltyn opened a new pull request, #5190:
URL: https://github.com/apache/polaris/pull/5190

   ## Summary
   
   - Preserve JSON policy strings emitted by `setup export` when `setup apply` recreates policies.
   - Continue serializing mapping-style policy content from handwritten setup files.
   - Cover the real export โ†’ YAML โ†’ apply path with a regression test.
   
   ## Current and expected behavior
   
   `setup export` writes the policy API's JSON string as a YAML scalar. `setup apply`
   previously passed that scalar through `json.dumps`, turning the policy document into
   a JSON string literal rather than restoring the original JSON document.
   
   `setup apply` now passes string content through unchanged and only serializes
   structured content. This restores exported policies exactly while preserving the
   documented mapping-style setup format.
   
   Fixes #5189
   
   ## Validation
   
   - `uv run pytest tests/test_setup_command.py -q`
   - `uv run pre-commit run --files apache_polaris/cli/command/setup.py tests/test_setup_command.py`
   - `uv run pytest tests/`
   - `./gradlew format compileAll`
   
   ## Checklist
   
   - [x] ๐Ÿ›ก๏ธ Don't disclose security issues! (contact security@apache.org)
   - [x] ๐Ÿ”— Clearly explained why the changes are needed, or linked related issues: Fixes #5189
   - [x] ๐Ÿงช Added/updated tests with good coverage, or manually tested (and explained how)
   - [x] ๐Ÿ’ก Added comments for complex logic
   - [x] ๐Ÿงพ Updated `CHANGELOG.md` (if needed)
   - [x] ๐Ÿ“š Updated documentation in `site/content/in-dev/unreleased` (if needed)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@polaris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Fix setup policy content round trips [polaris]

Posted by "MonkeyCanCode (via GitHub)" <gi...@apache.org>.
MonkeyCanCode merged PR #5190:
URL: https://github.com/apache/polaris/pull/5190


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@polaris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org