FrancescoCastaldi commented on PR #45895:
URL: https://github.com/apache/superset/pull/45895#issuecomment-6550642315

   ### Review Feedback Resolution: Stable User Partitioning via `principal_id`
   
   In response to review feedback from @EnxDev (thread 
[#4431282083](https://github.com/apache/superset/pull/45895#discussion_r4431282083)),
 commit `5b2e270487` switches user cache key partitioning in 
`SemanticView.get_extra_cache_keys()` from `exec_context.identity_digest` to 
`exec_context.principal_id`:
   
   - **Decoupled from `SECRET_KEY`**: Keying on `principal_id` (the 
authenticated user ID string) ensures that rolling `SECRET_KEY` rotations do 
not bust every user's cache keys, preventing web and worker nodes from missing 
each other's cached query results mid-rotation.
   - **Contract & Alias Preservation**: Preserves the invariant tested by 
`test_metadata_aliases_share_result_cache` where cached results remain readable 
across configuration secret changes.
   - **Fail-Safe & Guest Semantics Preserved**: Unauthenticated/guest users 
continue to share cache keys without per-user partitioning, and context 
resolution failures still fail closed with distinct nonces 
(`"semantic-user-unresolved"`).
   - **Test Coverage**: Added test assertions in 
`tests/unit_tests/semantic_layers/models_test.py` validating that dynamic 
rotation of `current_app.config["SECRET_KEY"]` leaves the user's cache keys 
identical and stable.
   
   @EnxDev, the update is pushed and ready for your re-review whenever 
convenient. Thank you!


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

  • [PR] fix(se... via GitHub
    • Re: [P... via GitHub
    • Re: [P... via GitHub
    • Re: [P... via GitHub
    • Re: [P... via GitHub
    • Re: [P... codeant-ai-for-open-source[bot] (via GitHub) via notifications
    • Re: [P... FrancescoCastaldi (via GitHub) via notifications
    • Re: [P... netlify[bot] (via GitHub) via notifications
    • Re: [P... FrancescoCastaldi (via GitHub) via notifications
    • Re: [P... FrancescoCastaldi (via GitHub) via notifications
    • Re: [P... FrancescoCastaldi (via GitHub) via notifications
    • Re: [P... codeant-ai-for-open-source[bot] (via GitHub) via notifications
    • Re: [P... codeant-ai-for-open-source[bot] (via GitHub) via notifications
    • Re: [P... EnxDev (via GitHub) via notifications
    • Re: [P... codeant-ai-for-open-source[bot] (via GitHub) via notifications

Reply via email to