-
Notifications
You must be signed in to change notification settings - Fork 8.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
[ML] File upload serverless compatibility #165337
[ML] File upload serverless compatibility #165337
Conversation
…wdyelastic/kibana into file-upload-serverless-compatibility
Pinging @elastic/ml-ui (:ml) |
I have a question about adding |
I've changed the code to use |
Butting in here because I saw this come across my github notifications, but the generally accepted method is to add config flags to enable/disable/modify features, rather than try to infer whether Kibana is running in Serverless mode. Those flags are then set in I'm also not sure if |
This is how I have been instructed to in past PRs, see #162354 (comment) for details.
@azasypkin Can you add any context here. We are getting mixed signals about how to signal if kibana is running in serverless. |
@@ -86,12 +85,14 @@ export class ImportView extends Component { | |||
|
|||
componentDidMount() { | |||
this.loadDataViewNames(); | |||
this.loadDefaultIndexSettings(); |
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.
What was the reasoning behind moving this to a REST call? Seems like it complicates the UI and adds extra http traffic.
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.
because of the way the File Data Visualizer is embedded as a component in ML and Home, this seemed to be the simplest way for the plugin to determine which settings to use. This was based on my original implementation where the serverless plugins called the file upload plugin on the server side.
However, I was also unaware of being able to use buildFlavor
which also works client side. So it looks like this PR can can simplified even more and this endpoint removed.
That's an interesting discussion that would be well-served by a larger audience, IMO. Basically, the more centralized communication around Serverless development has focused on using config flags as the preferred method. I don't disagree with @azasypkin that a Serverless flag might be useful, but if there was any communication about that other than within teams and in Github PR comments I must have missed it. Regardless, I won't hold up this PR whichever way you want to go. Just wanted to flag the (as far as I know) generally accepted way of handling this :) |
Closing this PR as the approach of using |
💚 Build Succeeded
Metrics [docs]Async chunks
Page load bundle
To update your PR or re-run it, just comment with: |
Sorry for any confusion here. The perspective I outlined in #162354 (comment) is what we've been discussing in our team (Kibana Security). While it still holds true for us, and I believe that "fake" feature flags aren't a panacea, it's not something that has been widely discussed. I believe we've learned a lot since the initial proposal to use config feature flags for everything that needs to be disabled or change behavior in the Serverless offering. We've discovered different use cases we hadn't initially anticipated and introduced different APIs to deal with them. Unless I missed the existing guidance, I think it's a good time to summarize the options we have today (real/fake feature flags gated with |
Does that mean we can remove the fake feature flags and replace them with a single global flag? That would be nice. In hindsight (and hindsight is tricky!) I wish we could have taken this route earlier as proposed by solution teams. I wonder if there is a larger learning here about choosing the simple approach before enforcing the complex one. |
closes #165366 closes #165367 close #165697 replaces #165337 Serverless elasticsearch does not support index setting `number_of_shards` PR resolves issue be removing `number_of_shards`. When `number_of_shards` was introduced way back when, the default value was 5. Now the default value is one. Therefore there is no point providing the setting since its the same as the default. Just removing so code works across both serverless and traditional deployments PR also cleans up some types that are duplicative of elasticsearch types --------- Co-authored-by: kibanamachine <[email protected]> Co-authored-by: Tiago Costa <[email protected]>
Fixes problem with the file data visualizer using
"number_of_shards": 1
in the default index settings which is not compatible with serverless.This PR adds a new
default_index_settings
endpoint to the file upload plugin which will not return{ "number_of_shards": 1 }
when running in serverless.Serverless
Non serverless