-
Notifications
You must be signed in to change notification settings - Fork 60
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
Add option for custom v1/statement-like paths #326
Add option for custom v1/statement-like paths #326
Conversation
The runtime changes introduced here are limited. However, |
2d93a73
to
377be60
Compare
Is it possible to test the feature with https://hub.docker.com/r/starburstdata/starburst-enterprise? |
377be60
to
cf72670
Compare
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.
Just some initial feedback after taking a glance.
gateway-ha/src/main/java/io/trino/gateway/ha/config/HaGatewayConfiguration.java
Outdated
Show resolved
Hide resolved
gateway-ha/src/main/java/io/trino/gateway/ha/handler/DropWizardProxyHandlerStats.java
Outdated
Show resolved
Hide resolved
gateway-ha/src/main/java/io/trino/gateway/ha/handler/DropWizardProxyHandlerStats.java
Outdated
Show resolved
Hide resolved
It is not, the Insights IDE feature that exposes the non-standard statement endpoint requires a license |
cf72670
to
ac1c19e
Compare
Also we dont want to start testing with various distributions - that is something the distributors should do in their own CI setup. |
Lets discuss in the dev sync tomorrow.. I think we should merge this after adding docs .. or get the airlift removal done first and refactor this after. |
Another one to rebase and then merge @willmostly ;-) |
5481be9
to
3387e96
Compare
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.
I think the PR looks mostly good, however I think we need to add tests and potentially make the code more robust. I think we should allow something like the following as well
v1/statement
somerandomcontext/v1/statement
Or alternatively require the root /
symbol and verify for it.
And with multiple also allows mixing like
/v1/statement
,v1/statement
,blabla/v2/statement
,some/custom/path
Does that make sense?
Also.. we are not verifying at all if v1/statement
is in the list and I think that is fine .. however do we want to log a warning about that? Or do we want to require is thinking that if that URL is not used its not a valid trino cluster or so .. I think thats wrong but feel free to convince me otherwise.
gateway-ha/src/main/java/io/trino/gateway/ha/config/HaGatewayConfiguration.java
Outdated
Show resolved
Hide resolved
6464921
to
ac76176
Compare
I have
in |
ac76176
to
4ff272d
Compare
No need for a mock test imho. Renaming to addtionalStatementPaths might be good .. under the assumption that we agree that the v1/statement path has to always be there .. which I am not 100% sure of |
Let me know when you refactoring the variable name @willmostly .. assuming thats what we are going with. |
4ff272d
to
11bcc4f
Compare
@mosabua updated and added short doc section |
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.
Looks good to me now. Please check on the build failure though..
I should have saved the error message, but the build failed because it downloaded a dependency and the archive file was corrupted. It succeeded on re-run |
gateway-ha/src/main/java/io/trino/gateway/ha/config/HaGatewayConfiguration.java
Outdated
Show resolved
Hide resolved
11bcc4f
to
5c14b7f
Compare
I think we should merge this .. any objections @willmostly @vishalya @Chaho12 @oneonestar ? |
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
@@ -138,6 +138,23 @@ extraWhitelistPaths: | |||
- '/ext/faster' | |||
``` | |||
|
|||
### Configure additional v1/statement-like paths | |||
|
|||
The Trino client protocol specifies that queries are initiated by a POST to `v1/statement`. |
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.
The Trino client protocol specifies that queries are initiated by a POST to `v1/statement`. | |
The Trino client protocol specifies that queries are initiated by a POST to `/v1/statement`. |
Might be good to say that path should start with /
as it will give an error anyway
@mosabua no objections, lets do it! |
Description
Add an option to configure additional custom paths that should be treated like
/v1/statement
. This is required to support some features of Starburst Trino.Additional context and related issues
The trino gateway checks if a request path starts with
/v1/statement
to decide if it should use query processing logic.Release notes
( ) This is not user-visible or is docs only, and no release notes are required.
( ) Release notes are required. Please propose a release note for me.
( x) Release notes are required, with the following suggested text:
Add option for custom v1/statement-like paths