-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[HTTP] Switch default handler resolution based on Kibana config #155142
[HTTP] Switch default handler resolution based on Kibana config #155142
Conversation
bba7810
to
26a7dab
Compare
…ding from environment
26a7dab
to
06b1a88
Compare
@@ -194,7 +194,7 @@ describe('Versioned route', () => { | |||
); | |||
|
|||
const kibanaResponse = await handler!( | |||
{ core: { env: { mode: { dev: true } } } } as any, | |||
{} as any, |
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.
Unrelated to this PR, just cleaning up some unnecessary mock data
Pinging @elastic/kibana-core (Team:Core) |
💚 Build Succeeded
Metrics [docs]Unknown metric groupsESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: cc @jloleysens |
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
@@ -142,7 +144,7 @@ export class Router<Context extends RequestHandlerContextBase = RequestHandlerCo | |||
public readonly routerPath: string, | |||
private readonly log: Logger, | |||
private readonly enhanceWithContext: ContextEnhancer<any, any, any, any, any>, | |||
private readonly options: RouterOptions = { isDev: false } | |||
private readonly options: RouterOptions = { isDev: false, isServerless: false } |
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.
We could read the default from a pseudo-config file somewhere. Defaults set within a package are sometimes hard to track down.
Summary
When launching Kibana in serverless mode (i.e., with the
--serverless=...
flag we need to by default resolve to the newest request handlers, otherwise to the oldest request handler.The approach taken in this PR is the same as with #154907.
Checklist