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

Remove browser-side SavedObjectsClientContract #197216

Open
rudolf opened this issue Oct 22, 2024 · 2 comments · Fixed by #200629
Open

Remove browser-side SavedObjectsClientContract #197216

rudolf opened this issue Oct 22, 2024 · 2 comments · Fixed by #200629
Assignees
Labels
blocked Feature:Saved Objects good first issue low hanging fruit Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc v9.0.0

Comments

@rudolf
Copy link
Contributor

rudolf commented Oct 22, 2024

In #149098 we deprecated this client and ensured that all teams move away from it. Since we no longer have any known dependencies on it we should remove this code. This class is exported to plugins here https://github.com/elastic/kibana/blob/main/src/core/public/index.ts#L173

Note that this class is still used from src/plugins/saved_objects/public but the functions that consume this class are themselves no longer used. So we can begin our cleanup with e.g. removing saveWithConfirmation checkForDuplicateTitle etc https://github.com/elastic/kibana/blob/main/src/plugins/saved_objects/public/saved_object/index.ts#L10-L11. Note that some plugins rely on functions with the exact same name but these functions have since been adjusted to use the content management client not the savedobjectsclient. So we should not rely on text search to find dependencies but rather use the IDE's "find references" and/or delete code and run node scripts/type_check.

@rudolf rudolf added Feature:Saved Objects Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc v9.0.0 labels Oct 22, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-core (Team:Core)

@afharo afharo added the good first issue low hanging fruit label Oct 22, 2024
@jesuswr jesuswr self-assigned this Nov 14, 2024
jesuswr added a commit to jesuswr/kibana that referenced this issue Nov 20, 2024
…elastic#200629)

## Summary

Resolves: elastic#197216

Removed all code that wasn't being used in
https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public.
Didn't remove the actual client since it's still being used here:
https://github.com/elastic/kibana/blob/dbab2214e9451d3a262007660cc0b7cdcea5307c/src/plugins/home/public/application/kibana_services.ts#L46-L48

Checked everything with `node scripts/type_check`

### Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

- [ ] The PR description includes the appropriate Release Notes section,
and the correct `release_node:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

---------

Co-authored-by: kibanamachine <[email protected]>
(cherry picked from commit d900299)

# Conflicts:
#	x-pack/plugins/translations/translations/zh-CN.json
paulinashakirova pushed a commit to paulinashakirova/kibana that referenced this issue Nov 26, 2024
…elastic#200629)

## Summary

Resolves: elastic#197216

Removed all code that wasn't being used in
https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public.
Didn't remove the actual client since it's still being used here:
https://github.com/elastic/kibana/blob/dbab2214e9451d3a262007660cc0b7cdcea5307c/src/plugins/home/public/application/kibana_services.ts#L46-L48

Checked everything with `node scripts/type_check`

### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [ ] The PR description includes the appropriate Release Notes section,
and the correct `release_node:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

---------

Co-authored-by: kibanamachine <[email protected]>
@rudolf
Copy link
Contributor Author

rudolf commented Nov 28, 2024

Reopening since in #200629 we found one remaining usage of the client on the browser. SharedUX has indicated that they will remove the last remaining usage so this is blocked on #200781

@rudolf rudolf reopened this Nov 28, 2024
@rudolf rudolf added the blocked label Nov 28, 2024
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this issue Dec 12, 2024
…elastic#200629)

## Summary

Resolves: elastic#197216

Removed all code that wasn't being used in
https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public.
Didn't remove the actual client since it's still being used here:
https://github.com/elastic/kibana/blob/dbab2214e9451d3a262007660cc0b7cdcea5307c/src/plugins/home/public/application/kibana_services.ts#L46-L48

Checked everything with `node scripts/type_check`

### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [ ] The PR description includes the appropriate Release Notes section,
and the correct `release_node:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

---------

Co-authored-by: kibanamachine <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked Feature:Saved Objects good first issue low hanging fruit Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc v9.0.0
Projects
None yet
4 participants