-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #14844 +/- ##
============================================
+ Coverage 61.75% 63.69% +1.94%
- Complexity 207 1482 +1275
============================================
Files 2436 2729 +293
Lines 133233 152590 +19357
Branches 20636 23565 +2929
============================================
+ Hits 82274 97189 +14915
- Misses 44911 48089 +3178
- Partials 6048 7312 +1264
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
I think the checks are disabled by default. Can you create a doc on various configurations supported by Pinot? |
d7077e8
to
93dc362
Compare
Github issue link: #14995 |
@soumitra-st I have created a github issue and linked the document. Please review it. Thank you. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Please add the new config in the PR description, and call out a) where does it need to be set (server/minion/controller conf or cluster config) b) is restart required when it's changed |
Nice! Is this another attempt of #14197? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this is static analysis, we should apply the analysis in 2 places:
- When table config gets created/updated, we want to validate the groovy transforms configured
- When broker gets a query, we want to validate the groovy transform within it
Take a look at where we block groovy functions right now. We can integrate this logic at the same place.
The analysis applied at both the suggested places.
|
93dc362
to
9812e00
Compare
...-local/src/main/java/org/apache/pinot/segment/local/function/GroovyConfigChangeListener.java
Show resolved
Hide resolved
9812e00
to
5f19543
Compare
Github Issue: #14995
Google Doc: https://docs.google.com/document/d/10-j1hevpwOWzaU8q0ndqv3toRBWTiPfOWy6xHojoiL4
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.
A groovy listener to update the configuration on the server nodes.
Testing