-
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
[data / data views] Disable rollup functionality when rollup plugin is disabled #162674
[data / data views] Disable rollup functionality when rollup plugin is disabled #162674
Conversation
remove comment
…ibana into disable_rollups_on_serverless
…ibana into disable_rollups_on_serverless
…ibana into disable_rollups_on_serverless
…ibana into disable_rollups_on_serverless
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.
Thanks for addressing this issue, @mattkime!
I have created a rollup index and a data view for it with a stateful Kibana, exported the saved object for the data view and imported it into a serverless Kibana. Are those steps correct to reproduce the situation? Or should I also import the "rollup" index into serverless? Because otherwise the index pattern doesn't match anything.
Also, I'd prefer to keep #152708 open. With this PR merged, we still have risks associated with the usage of rollups api by the data view plugin.
Do you know if there are any api integration tests for data view plugin that checks the rollups api?
As best I know thats not possible.
I was under the impression that the common use case for rollup data is to view it along side non rollup data. Even if thats not true, I think there's value in being able to import the assets so that they can be modified or replaced.
Can you be more specific? I'm not aware of any such risks.
No, I should do that. I guess the best route would be to see if a rollup data view could load its fields. It should error if it tries to hit a rollup endpoint. |
@mattkime I think when an api endpoint is used by a different plugin, especially if our team doesn't own this other plugin, we might accidentally cause a regression for this other plugin. The dependency between plugins is an implicit one, our team didn't know about the data view plugin until recently. There are no TS types to rely on either. |
There are functional tests for rollup data view functionality - https://github.com/elastic/kibana/blob/main/x-pack/test/api_integration/apis/management/rollup/index_patterns_extensions.js and https://github.com/elastic/kibana/blob/main/x-pack/test/functional/apps/rollup_job/hybrid_index_pattern.js Since rollups are a deprecated feature, I'd prefer to do as little work on them as possible. |
I agree about rollups being deprecated and low priority at the moment. Just to be on the safe side, I'll add a comment to the rollup endpoint linking to #152708 |
…ibana into disable_rollups_on_serverless
mockApiCaller.mockResolvedValueOnce(mockRollupResponse); | ||
mockSubmitCaller.mockResolvedValueOnce(mockAsyncResponse); | ||
|
||
const params = { index: 'foo-程', body: { query: {} } }; |
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.
out of curiosity, 程 means journey? right?
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.
Seems to, it was duplicated from the previous test.
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 👍 Thx for taking care of this and handling rollups gracefully. Tested in server & serverless and worked as expeced. Also thx for adding serverless tests. Can be merged in once they're green
💚 Build Succeeded
Metrics [docs]Public APIs missing comments
Unknown metric groupsAPI count
ESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: cc @mattkime |
## Summary Adds a comment that the API endpoint /rollup/indices is used by the data view plugin. With #162674 merged, the issue #152708 has been closed. The Data Discovery team is not planning any further work around rollup api use due to the feature being deprecated. I think adding a comment to the API code directly will help us remember this dependency for when we are going to edit or remove the endpoint.
@mattkime should we assign |
…s disabled (elastic#162674) ## Summary Rollup functionality will be disabled on serverless instances. The `rollup` plugin will be disabled. While it won't be possible to create rollups on serverless, it will be possible to import data view saved objects which may be configured for use with rollups. We will make a 'best effort' to improve functionality as to help users transition away from rollups. - In classic environments, the `rollup` plugin will enable `dataViews` and `data` plugin rollup functionality. - The data plugin will run an async search instead of a rollup search. - The data views plugin will fetch normal fields, omitting a query for rollup fields - which would fail anyway. Closes elastic#152708 --------- Co-authored-by: kibanamachine <[email protected]>
…#163432) ## Summary Adds a comment that the API endpoint /rollup/indices is used by the data view plugin. With elastic#162674 merged, the issue elastic#152708 has been closed. The Data Discovery team is not planning any further work around rollup api use due to the feature being deprecated. I think adding a comment to the API code directly will help us remember this dependency for when we are going to edit or remove the endpoint.
…#184765) ## Summary Previously we were checking the `/api/rollup/indices` endpoint when the data view editor was loaded. If rollups were disabled, it would harmlessly handle a 404 error. Still, people justifiably wonder whether something is wrong. This PR skips checking the endpoint as one would expect. A unit test has been added. I also manually verified the behavior is as expected. Follow up to #162674 --------- Co-authored-by: Lukas Olson <[email protected]>
Summary
Rollup functionality will be disabled on serverless instances. The
rollup
plugin will be disabled. While it won't be possible to create rollups on serverless, it will be possible to import data view saved objects which may be configured for use with rollups. We will make a 'best effort' to improve functionality as to help users transition away from rollups.rollup
plugin will enabledataViews
anddata
plugin rollup functionality.Closes #152708