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

[Lens] Switch to SavedObjectClient.resolve #105808

Closed
timroes opened this issue Jul 15, 2021 · 5 comments · Fixed by #110059 or #111403
Closed

[Lens] Switch to SavedObjectClient.resolve #105808

timroes opened this issue Jul 15, 2021 · 5 comments · Fixed by #110059 or #111403
Assignees
Labels
blocker Feature:Lens Team:Visualizations Visualization editors, elastic-charts and infrastructure v8.0.0

Comments

@timroes
Copy link
Contributor

timroes commented Jul 15, 2021

We need to switch over to SavedObjectClient.resolve instead of .get in the 8.0 release. This issue tracks work for the lens and lens-ui-telemetry saved object loading.

This issue will also track progress for making Lens Saved Object share-capable. It has currently nameSpaceType: single.
It should be updated to multiple_isolated.

We could still consider switching over the lens telemetry to the (not so) new ui metric system which would help us get rid of the lens-ui-telemetry saved object instead.

For more details see #100489

UPDATE about telemetry object: We never access this lens-ui-telemetry via saved object client (only write it that way), and always load it through ES client directly against the .kibana index and aggregate over those saved objects. It will eventually be fully removed along with the whole Lens telemetry system and replaced with uiMetrics system. After talking to @jportner: as we plan to remove it eventually, so let's leave it as it is for now. It won't generate aliases anyway and it won't cause any problems.

@timroes timroes added blocker Team:Visualizations Visualization editors, elastic-charts and infrastructure v8.0.0 Feature:Lens labels Jul 15, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app (Team:KibanaApp)

@jportner
Copy link
Contributor

Maybe a silly question: is there any reason that lens-ui-telemetry is not a space-agnostic saved object (namespaceType: 'agnostic')?

@timroes
Copy link
Contributor Author

timroes commented Jul 22, 2021

There was no logical reason. This type is already rather old, most likely we didn't have the agnostic option around that time (or were not aware of them) and on introduction of the type it was simply moved to the wrong type. Given that we should anyway use the proper uiMetrics system nowadays, I think we should not change that anymore, instead of getting just rid of it :)

@jportner
Copy link
Contributor

In case anyone is following this issue but not the linked meta-issue (#100489):

I published the Sharing Saved Objects developer guide, please take a look before proceeding with the implementation. And of course, please reach out if you run into any problems!

Note that there are a few more steps than just switching to use resolve(), there are some server side changes too, see the dev guide for more details. I think you only need to be concerned about Steps 2-4 but it would be good for someone on your team to verify 👍

@mbondyra
Copy link
Contributor

mbondyra commented Sep 7, 2021

There's this tiny PR that should be included in this task so I'll reopen this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocker Feature:Lens Team:Visualizations Visualization editors, elastic-charts and infrastructure v8.0.0
Projects
None yet
4 participants