Skip to content
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 view editor plugin uses Rollup Jobs internal API endpoint #152708

Closed
yuliacech opened this issue Mar 6, 2023 · 10 comments · Fixed by #162674
Closed

Data view editor plugin uses Rollup Jobs internal API endpoint #152708

yuliacech opened this issue Mar 6, 2023 · 10 comments · Fixed by #162674
Assignees
Labels
Feature:Data Views Data Views code and UI - index patterns before 8.0 Feature:Rollups impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. loe:medium Medium Level of Effort Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more technical debt Improvement of the software architecture and operational architecture

Comments

@yuliacech
Copy link
Contributor

The Data view editor plugin relies on an internal API endpoint of the Rollup Jobs plugin (see here).

 private getRollupIndexCaps = async () => {
    let rollupIndicesCaps: RollupIndicesCapsResponse = {};
    try {
      rollupIndicesCaps = await this.http.get<RollupIndicesCapsResponse>('/api/rollup/indices');
    } catch (e) {
      // Silently swallow failure responses such as expired trials
    }
    this.updateState({ rollupIndicesCaps });
    return rollupIndicesCaps;
  };

The API endpoint /api/rollup/indices is only intended for internal use by the Rollup jobs plugin's client-side. Since the dependency via API usage is not explicit, any changes to the API endpoint might not be immediately propagated to the dependent plugins. The plugin is also planned to be disabled for serverless.

@yuliacech yuliacech added Feature:Data Views Data Views code and UI - index patterns before 8.0 Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more Feature:Rollups Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. labels Mar 6, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/platform-deployment-management (Team:Deployment Management)

@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-data-discovery (Team:DataDiscovery)

@davismcphee davismcphee added loe:needs-research This issue requires some research before it can be worked on or estimated technical debt Improvement of the software architecture and operational architecture impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. labels Mar 6, 2023
@mattkime
Copy link
Contributor

@yuliacech I could use your advice figuring out how to move forward on this. Data views code needs a way to get a list of rollup indices. Perhaps the rollup jobs plugin should make such functionality available on its plugin contract.

I also need to do a deeper inventory of data view related code to see where we're we have rollup specific code.

Has anything been said about how rollup data might be migrated? I guess I'm not really expecting an answer on that, but I do need to think of how I might handle data views defined on a rollup index.

@yuliacech
Copy link
Contributor Author

Hi @mattkime, thanks a lot for looking into this.
We are currently not actively working on the rollup jobs plugin (because downsampling seems to be the better alternative to rollups), so I'm not sure if we will be able to add the list functionality to the plugins contract. So instead to get a list of rollup indices you could directly call the ES API for rollup index caps (see here) in the data views plugin.
What did you mean by "how rollup data might be migrated"?

@mattkime
Copy link
Contributor

@yuliacech

What did you mean by "how rollup data might be migrated"?

Whats the user story regarding migration to the cloud? What happens if they attempt to migrate rollup data and saved objects? What happens if someone individually exports a rollup data view and imports it in an environment without rollup support?

@kertal
Copy link
Member

kertal commented Apr 17, 2023

@mattkime @yuliacech could you follow up here so we can identify if there's stuff to do for 8.9. For me the main question is, what happens if a user imports a rollup data view in an environment without rollup support? This could be already tested, by disabling the rollup plugin

@mattkime
Copy link
Contributor

@kertal We need to investigate this and define what we would like to happen. No thought has been put into user experience.

@yuliacech
Copy link
Contributor Author

what happens if a user imports a rollup data view in an environment without rollup support?

@shubhaat could you please help answer this question?

@shubhaat
Copy link

shubhaat commented May 3, 2023

@yuliacech
Copy link
Contributor Author

I think there is also a section in Advanced setting related to this
Screenshot 2023-05-10 at 11 12 28

@mattkime mattkime added loe:medium Medium Level of Effort and removed loe:needs-research This issue requires some research before it can be worked on or estimated labels Jun 15, 2023
mattkime added a commit that referenced this issue Aug 8, 2023
…s disabled (#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 #152708

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
yuliacech added a commit that referenced this issue Aug 8, 2023
## 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.
bryce-b pushed a commit to bryce-b/kibana that referenced this issue Aug 9, 2023
…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 <42973632+kibanamachine@users.noreply.github.com>
bryce-b pushed a commit to bryce-b/kibana that referenced this issue Aug 9, 2023
…#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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Data Views Data Views code and UI - index patterns before 8.0 Feature:Rollups impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. loe:medium Medium Level of Effort Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more technical debt Improvement of the software architecture and operational architecture
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants