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

[PR] fix: Filter null entities in listPrincipals and listPrincipalRoles to prevent NPE [polaris]

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

   ## Summary
   Similar to listCatalogs fix, these methods are non-atomic and can cause NPE when entities are deleted between listEntities and loadEntity calls. Added  .filter(Objects::nonNull) to safely handle race conditions.
   
   Similar to:  https://github.com/apache/polaris/pull/1949
   
   Tagging reviewers from previous pr:
   @eric-maynard 
   @dimas-b 
   @andrew4699 
   
   ## Tests
   Added tests to verify null filtering behavior when entities are deleted  after being listed but before being loaded.
   ✅ `./gradlew build` succeeds
   ✅ Added unit tests
   
   <!--
       Possible security vulnerabilities: STOP here and contact security@apache.org instead!
   
       Please update the title of the PR with a meaningful message - do not leave it "empty" or "generated"
       Please update this summary field:
   
       The summary should cover these topics, if applicable:
       * the motivation for the change
       * a description of the status quo, for example the current behavior
       * the desired behavior
       * etc
   
       PR checklist:
       - Do a self-review of your code before opening a pull request
       - Make sure that there's good test coverage for the changes included in this PR
       - Run tests locally before pushing a PR (./gradlew check)
       - Code should have comments where applicable. Particularly hard-to-understand
         areas deserve good in-line documentation.
       - Include changes and enhancements to the documentation (in site/content/in-dev/unreleased)
       - For Work In Progress Pull Requests, please use the Draft PR feature.
   
       Make sure to add the information BELOW this comment.
       Everything in this comment will NOT be added to the PR description.
   -->
   


-- 
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: Filter null entities in listPrincipals and listPrincipalRoles to prevent NPE [polaris]

Posted by "HotSushi (via GitHub)" <gi...@apache.org>.
HotSushi closed pull request #2258: fix: Filter null entities in listPrincipals and listPrincipalRoles to prevent NPE
URL: https://github.com/apache/polaris/pull/2258


-- 
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: Filter null entities in listPrincipals and listPrincipalRoles to prevent NPE [polaris]

Posted by "HotSushi (via GitHub)" <gi...@apache.org>.
HotSushi commented on PR #2258:
URL: https://github.com/apache/polaris/pull/2258#issuecomment-3155836628

   Thanks @XN137, agree if there's a better place for the fix to be checked in. Thank you for jumping in. 
   
   After that fix, I do not think tests would serve additional benefit. Do use them verbatim if you like them in your PR.


-- 
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: Filter null entities in listPrincipals and listPrincipalRoles to prevent NPE [polaris]

Posted by "snazy (via GitHub)" <gi...@apache.org>.
snazy commented on PR #2258:
URL: https://github.com/apache/polaris/pull/2258#issuecomment-3155855509

   Fixing the root cause sounds like the better path forwards. Provided a possible option in https://github.com/apache/polaris/pull/2261#pullrequestreview-3088951142


-- 
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: Filter null entities in listPrincipals and listPrincipalRoles to prevent NPE [polaris]

Posted by "XN137 (via GitHub)" <gi...@apache.org>.
XN137 commented on PR #2258:
URL: https://github.com/apache/polaris/pull/2258#issuecomment-3162787688

   since the other PR has been merged i'd suggest to close this PR now


-- 
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