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
base: main
Are you sure you want to change the base?
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.
@@ -37,6 +37,7 @@ public class HaGatewayConfiguration | |||
private List<String> extraWhitelistPaths = new ArrayList<>(); | |||
private OAuth2GatewayCookieConfiguration oauth2GatewayCookieConfiguration = new OAuth2GatewayCookieConfiguration(); | |||
private GatewayCookieConfiguration gatewayCookieConfiguration = new GatewayCookieConfiguration(); | |||
private List<String> customStatementPaths = new ArrayList<>(); |
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 it would be better to have a statementPaths setup and it defaults to v1/statement
.. and users can override or expand to multiple paths
|
||
import com.codahale.metrics.Meter; | ||
import io.airlift.stats.CounterStat; | ||
import io.dropwizard.core.setup.Environment; |
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.
lets not add new Dropwizard dependencies in new PRs
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.
Sorry - I should have explained that this is a refactor of existing code to allow for testing.
This class was ProxyHandlerStats
, which was a pain to use in unit tests because of the Dropwizard setup. So I made ProxyHandlerStats
into an interface, made this class an implementation of it, and added the TestingProxyHandlerStats
implementation.
|
||
import static java.util.Objects.requireNonNull; | ||
|
||
public final class DropWizardProxyHandlerStats |
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.
rename to Jetty or airlift .. depending on how you change
It is not, the Insights IDE feature that exposes the non-standard statement endpoint requires a license |
cf72670
to
ac1c19e
Compare
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