You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by "matvj250 (via GitHub)" <gi...@apache.org> on 2025/05/30 21:53:09 UTC

[PR] Moved server, broker, and controller AccessControl interfaces to pinot-spi for compatibility gating [pinot]

matvj250 opened a new pull request, #15954:
URL: https://github.com/apache/pinot/pull/15954

   This is a continuation of this PR: https://github.com/apache/pinot/pull/15868.
   
   We want to migrate certain API files to pinot-spi for compatibility gating. broker.api.AccessControl, server.access.AccessControl, and controller.api.access.AccessControl can all be migrated to pinot-spi by migrating their necessary files - ex. common.request.BrokerRequest - and updating the pinot-spi pom with the io.netty, javax.ws.rs, javax.annotation and thrift dependencies. In addition, I disabled the checkstyle checks for the thrift-generated files that were migrated. These files were moved to pinot-spi/auth, with specific subfolders for broker and server, controller, core, and request (originally from common.request) files. 
   
   To summarize, the changes made in this PR are the migration of the files, making additions to the pinot-spi pom, updating suppressions.xml for the moved thrift-generated files, and changing the import paths in other files accordingly (using mvn spotless:apply to fix any ordering discrepancies).
   
   This is a full list of packages that were migrated:
   - broker.api.RequesterIdentity
   
   - common.request.BrokerRequest
   - common.request.DataSource
   - common.request.Expression
   - common.request.ExpressionType
   - common.request.Function
   - common.request.Identifier
   - common.request.JoinType
   - common.request.Join
   - common.request.Literal
   - common.request.PinotQuery
   - common.request.QuerySource
   
   - controller.api.access.AccessControl
   - controller.api.access.AccessType
   
   - core.auth.FineGrainedAccessControl
   - core.auth.TargetType
   
   - server.access.AccessControl
   


-- 
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: commits-unsubscribe@pinot.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


Re: [PR] Moved server, broker, and controller AccessControl interfaces to pinot-spi for compatibility gating [pinot]

Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #15954:
URL: https://github.com/apache/pinot/pull/15954#issuecomment-2923659700

   ## [Codecov](https://app.codecov.io/gh/apache/pinot/pull/15954?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   Attention: Patch coverage is `84.12698%` with `10 lines` in your changes missing coverage. Please review.
   > Project coverage is 55.68%. Comparing base [(`1a476de`)](https://app.codecov.io/gh/apache/pinot/commit/1a476dea72ebf1c15e14ded28ae60c385f71b2c3?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) to head [(`d95fe25`)](https://app.codecov.io/gh/apache/pinot/commit/d95fe25c516ad8d6433082eed894128dfa642324?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   > Report is 175 commits behind head on master.
   
   | [Files with missing lines](https://app.codecov.io/gh/apache/pinot/pull/15954?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
   |---|---|---|
   | [...g/apache/pinot/spi/auth/request/BrokerRequest.java](https://app.codecov.io/gh/apache/pinot/pull/15954?src=pr&el=tree&filepath=pinot-spi%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fpinot%2Fspi%2Fauth%2Frequest%2FBrokerRequest.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cGlub3Qtc3BpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9waW5vdC9zcGkvYXV0aC9yZXF1ZXN0L0Jyb2tlclJlcXVlc3QuamF2YQ==) | 57.14% | [3 Missing :warning: ](https://app.codecov.io/gh/apache/pinot/pull/15954?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [...n/java/org/apache/pinot/spi/auth/request/Join.java](https://app.codecov.io/gh/apache/pinot/pull/15954?src=pr&el=tree&filepath=pinot-spi%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fpinot%2Fspi%2Fauth%2Frequest%2FJoin.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cGlub3Qtc3BpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9waW5vdC9zcGkvYXV0aC9yZXF1ZXN0L0pvaW4uamF2YQ==) | 57.14% | [3 Missing :warning: ](https://app.codecov.io/gh/apache/pinot/pull/15954?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [.../org/apache/pinot/spi/auth/request/PinotQuery.java](https://app.codecov.io/gh/apache/pinot/pull/15954?src=pr&el=tree&filepath=pinot-spi%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fpinot%2Fspi%2Fauth%2Frequest%2FPinotQuery.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cGlub3Qtc3BpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9waW5vdC9zcGkvYXV0aC9yZXF1ZXN0L1Bpbm90UXVlcnkuamF2YQ==) | 86.66% | [2 Missing :warning: ](https://app.codecov.io/gh/apache/pinot/pull/15954?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [.../org/apache/pinot/spi/auth/request/Expression.java](https://app.codecov.io/gh/apache/pinot/pull/15954?src=pr&el=tree&filepath=pinot-spi%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fpinot%2Fspi%2Fauth%2Frequest%2FExpression.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cGlub3Qtc3BpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9waW5vdC9zcGkvYXV0aC9yZXF1ZXN0L0V4cHJlc3Npb24uamF2YQ==) | 85.71% | [1 Missing :warning: ](https://app.codecov.io/gh/apache/pinot/pull/15954?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [...va/org/apache/pinot/spi/auth/request/Function.java](https://app.codecov.io/gh/apache/pinot/pull/15954?src=pr&el=tree&filepath=pinot-spi%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fpinot%2Fspi%2Fauth%2Frequest%2FFunction.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cGlub3Qtc3BpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9waW5vdC9zcGkvYXV0aC9yZXF1ZXN0L0Z1bmN0aW9uLmphdmE=) | 66.66% | [1 Missing :warning: ](https://app.codecov.io/gh/apache/pinot/pull/15954?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   
   > :exclamation:  There is a different number of reports uploaded between BASE (1a476de) and HEAD (d95fe25). Click for more details.
   > 
   > <details><summary>HEAD has 68 uploads less than BASE</summary>
   >
   >| Flag | BASE (1a476de) | HEAD (d95fe25) |
   >|------|------|------|
   >|java-21|10|1|
   >|unittests|6|1|
   >|unittests1|3|1|
   >|skip-bytebuffers-true|4|0|
   >|temurin|15|1|
   >|unittests2|3|0|
   >|skip-bytebuffers-false|8|0|
   >|java-11|5|0|
   >|integration|9|0|
   >|integration2|3|0|
   >|integration1|3|0|
   >|custom-integration1|3|0|
   ></details>
   
   <details><summary>Additional details and impacted files</summary>
   
   
   ```diff
   @@             Coverage Diff              @@
   ##             master   #15954      +/-   ##
   ============================================
   - Coverage     62.90%   55.68%   -7.22%     
   + Complexity     1386      690     -696     
   ============================================
     Files          2867     2284     -583     
     Lines        163354   127564   -35790     
     Branches      24952    20425    -4527     
   ============================================
   - Hits         102755    71040   -31715     
   + Misses        52847    50474    -2373     
   + Partials       7752     6050    -1702     
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/pinot/pull/15954/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [custom-integration1](https://app.codecov.io/gh/apache/pinot/pull/15954/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [integration](https://app.codecov.io/gh/apache/pinot/pull/15954/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [integration1](https://app.codecov.io/gh/apache/pinot/pull/15954/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [integration2](https://app.codecov.io/gh/apache/pinot/pull/15954/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [java-11](https://app.codecov.io/gh/apache/pinot/pull/15954/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [java-21](https://app.codecov.io/gh/apache/pinot/pull/15954/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `55.68% <84.12%> (-7.14%)` | :arrow_down: |
   | [skip-bytebuffers-false](https://app.codecov.io/gh/apache/pinot/pull/15954/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [skip-bytebuffers-true](https://app.codecov.io/gh/apache/pinot/pull/15954/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [temurin](https://app.codecov.io/gh/apache/pinot/pull/15954/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `55.68% <84.12%> (-7.22%)` | :arrow_down: |
   | [unittests](https://app.codecov.io/gh/apache/pinot/pull/15954/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `55.68% <84.12%> (-7.21%)` | :arrow_down: |
   | [unittests1](https://app.codecov.io/gh/apache/pinot/pull/15954/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `55.68% <84.12%> (-0.14%)` | :arrow_down: |
   | [unittests2](https://app.codecov.io/gh/apache/pinot/pull/15954/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   </details>
   
   [:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/pinot/pull/15954?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).   
   :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
   </details>


-- 
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: commits-unsubscribe@pinot.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


Re: [PR] Moved server, broker, and controller AccessControl interfaces to pinot-spi for compatibility gating [pinot]

Posted by "UOETianleZhang (via GitHub)" <gi...@apache.org>.
UOETianleZhang commented on code in PR #15954:
URL: https://github.com/apache/pinot/pull/15954#discussion_r2132488291


##########
pinot-controller/src/main/java/org/apache/pinot/controller/recommender/io/InputManager.java:
##########
@@ -53,6 +51,8 @@
 import org.apache.pinot.core.query.request.context.QueryContext;
 import org.apache.pinot.core.query.request.context.utils.QueryContextConverterUtils;
 import org.apache.pinot.segment.local.utils.SchemaUtils;
+import org.apache.pinot.spi.auth.request.BrokerRequest;

Review Comment:
   Let's put `BrokerRequest` to `org.apache.pinot.spi.request.BrokerRequest` as it is not necessarily related to auth



##########
pinot-core/src/main/java/org/apache/pinot/core/operator/transform/function/TimeSeriesBucketTransformFunction.java:
##########
@@ -25,13 +25,13 @@
 import java.util.Map;
 import java.util.concurrent.TimeUnit;
 import org.apache.pinot.common.function.TransformFunctionType;
-import org.apache.pinot.common.request.Literal;
 import org.apache.pinot.common.request.context.ExpressionContext;
 import org.apache.pinot.common.request.context.FunctionContext;
 import org.apache.pinot.common.request.context.RequestContextUtils;
 import org.apache.pinot.core.operator.ColumnContext;
 import org.apache.pinot.core.operator.blocks.ValueBlock;
 import org.apache.pinot.core.operator.transform.TransformResultMetadata;
+import org.apache.pinot.spi.auth.request.Literal;

Review Comment:
   Same here. For all the thrift-generated classes we can put them into `org.apache.pinot.spi.request`



##########
pinot-controller/src/main/java/org/apache/pinot/controller/recommender/io/InputManager.java:
##########
@@ -53,6 +51,8 @@
 import org.apache.pinot.core.query.request.context.QueryContext;
 import org.apache.pinot.core.query.request.context.utils.QueryContextConverterUtils;
 import org.apache.pinot.segment.local.utils.SchemaUtils;
+import org.apache.pinot.spi.auth.request.BrokerRequest;
+import org.apache.pinot.spi.auth.request.PinotQuery;

Review Comment:
   Same, we can put it into `org.apache.pinot.spi.request`



-- 
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: commits-unsubscribe@pinot.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


Re: [PR] Moved server, broker, and controller AccessControl interfaces to pinot-spi for compatibility gating [pinot]

Posted by "matvj250 (via GitHub)" <gi...@apache.org>.
matvj250 commented on code in PR #15954:
URL: https://github.com/apache/pinot/pull/15954#discussion_r2151041906


##########
pinot-controller/src/main/java/org/apache/pinot/controller/recommender/io/InputManager.java:
##########
@@ -53,6 +51,8 @@
 import org.apache.pinot.core.query.request.context.QueryContext;
 import org.apache.pinot.core.query.request.context.utils.QueryContextConverterUtils;
 import org.apache.pinot.segment.local.utils.SchemaUtils;
+import org.apache.pinot.spi.auth.request.BrokerRequest;

Review Comment:
   Acknowledged (along with the other similar comments)



-- 
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: commits-unsubscribe@pinot.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org