Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for groovy static analysis for groovy scripts #14844

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

abhishekbafna
Copy link

@abhishekbafna abhishekbafna commented Jan 20, 2025

It adds the support for static analysis for the groovy functions. Users can configure the allowed receivers, allowed imports, allowed static imports, disallowed method names, toggle method definition allowed in the groovy scripts.

  • REST APIs for getting the default/sample groovy configuration, update/create groovy configuration and get the current groovy configurations.
  • The AST analysis covers for query, ingestion and table config updates via controller.

@codecov-commenter
Copy link

codecov-commenter commented Jan 20, 2025

Codecov Report

Attention: Patch coverage is 62.41135% with 53 lines in your changes missing coverage. Please review.

Project coverage is 63.71%. Comparing base (59551e4) to head (93dc362).
Report is 1643 commits behind head on master.

Files with missing lines Patch % Lines
.../controller/api/resources/PinotClusterConfigs.java 0.00% 25 Missing ⚠️
...egment/local/function/GroovyFunctionEvaluator.java 71.87% 17 Missing and 1 partial ⚠️
...ent/local/function/GroovyStaticAnalyzerConfig.java 87.17% 5 Missing ⚠️
.../pinot/server/starter/helix/BaseServerStarter.java 0.00% 3 Missing ⚠️
...ava/org/apache/pinot/minion/BaseMinionStarter.java 0.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master   #14844      +/-   ##
============================================
+ Coverage     61.75%   63.71%   +1.95%     
- Complexity      207     1472    +1265     
============================================
  Files          2436     2710     +274     
  Lines        133233   152014   +18781     
  Branches      20636    23458    +2822     
============================================
+ Hits          82274    96851   +14577     
- Misses        44911    47895    +2984     
- Partials       6048     7268    +1220     
Flag Coverage Δ
custom-integration1 100.00% <ø> (+99.99%) ⬆️
integration 100.00% <ø> (+99.99%) ⬆️
integration1 100.00% <ø> (+99.99%) ⬆️
integration2 0.00% <ø> (ø)
java-11 63.67% <62.41%> (+1.97%) ⬆️
java-21 63.59% <62.41%> (+1.96%) ⬆️
skip-bytebuffers-false 63.69% <62.41%> (+1.95%) ⬆️
skip-bytebuffers-true 63.56% <62.41%> (+35.83%) ⬆️
temurin 63.71% <62.41%> (+1.95%) ⬆️
unittests 63.70% <62.41%> (+1.96%) ⬆️
unittests1 56.24% <71.29%> (+9.35%) ⬆️
unittests2 34.01% <15.60%> (+6.28%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@soumitra-st
Copy link
Contributor

I think the checks are disabled by default. Can you create a doc on various configurations supported by Pinot?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants