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

Clean code related to savedObjectClientContrat that wasn't being used #200629

Merged

Conversation

jesuswr
Copy link
Contributor

@jesuswr jesuswr commented Nov 18, 2024

Summary

Resolves: #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:

http: HttpStart;
savedObjectsClient: SavedObjectsClientContract;
toastNotifications: NotificationsSetup['toasts'];

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

@jesuswr jesuswr added Feature:Saved Objects release_note:skip Skip the PR/issue when compiling release notes backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) labels Nov 18, 2024
@jesuswr jesuswr requested a review from a team November 18, 2024 18:15
@jesuswr jesuswr requested a review from a team as a code owner November 18, 2024 18:15
@jesuswr jesuswr self-assigned this Nov 18, 2024
Copy link
Contributor

@TinaHeiligers TinaHeiligers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work! Thanks for cleaning up unused code.
LGTM

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
savedObjects 43 37 -6

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
savedObjects 109 96 -13

Public APIs missing exports

Total count of every type that is part of your API that should be exported but is not. This will cause broken links in the API documentation system. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats exports for more detailed information.

id before after diff
savedObjects 5 3 -2

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
savedObjects 19.8KB 17.8KB -2.0KB
Unknown metric groups

API count

id before after diff
savedObjects 114 97 -17

References to deprecated APIs

id before after diff
savedObjects 62 11 -51

cc @jesuswr

@jesuswr jesuswr added the Team:SharedUX Team label for AppEx-SharedUX (formerly Global Experience) label Nov 19, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/appex-sharedux (Team:SharedUX)

Copy link
Contributor

@Dosant Dosant left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thanks!

@jesuswr jesuswr merged commit d900299 into elastic:main Nov 19, 2024
23 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

https://github.com/elastic/kibana/actions/runs/11911408070

@jesuswr jesuswr deleted the remove-not-used-code-saved-object-client-contract branch November 19, 2024 10:46
@kibanamachine
Copy link
Contributor

💔 All backports failed

Status Branch Result
8.x Backport failed because of merge conflicts

You might need to backport the following PRs to 8.x:
- [Inventory] Remove open in Discover button (#200574)

Manual backport

To create the backport manually run:

node scripts/backport --pr 200629

Questions ?

Please refer to the Backport tool documentation

@jesuswr jesuswr removed the backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) label Nov 19, 2024
@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label Nov 19, 2024
@jesuswr jesuswr added backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) and removed backport:skip This commit does not require backporting labels Nov 19, 2024
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

https://github.com/elastic/kibana/actions/runs/11917156176

@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

https://github.com/elastic/kibana/actions/runs/11917156169

@kibanamachine
Copy link
Contributor

💔 All backports failed

Status Branch Result
8.x Backport failed because of merge conflicts

Manual backport

To create the backport manually run:

node scripts/backport --pr 200629

Questions ?

Please refer to the Backport tool documentation

@jesuswr jesuswr removed the backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) label Nov 19, 2024
@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label Nov 19, 2024
@jesuswr jesuswr removed the backport:skip This commit does not require backporting label Nov 19, 2024
@jesuswr jesuswr added the backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) label Nov 19, 2024
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

https://github.com/elastic/kibana/actions/runs/11917306887

@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

https://github.com/elastic/kibana/actions/runs/11917306793

@kibanamachine
Copy link
Contributor

💔 All backports failed

Status Branch Result
8.x Backport failed because of merge conflicts

Manual backport

To create the backport manually run:

node scripts/backport --pr 200629

Questions ?

Please refer to the Backport tool documentation

1 similar comment
@kibanamachine
Copy link
Contributor

💔 All backports failed

Status Branch Result
8.x Backport failed because of merge conflicts

Manual backport

To create the backport manually run:

node scripts/backport --pr 200629

Questions ?

Please refer to the Backport tool documentation

@jesuswr
Copy link
Contributor Author

jesuswr commented Nov 20, 2024

💚 All backports created successfully

Status Branch Result
8.x

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

jesuswr added a commit to jesuswr/kibana that referenced this pull request 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
jesuswr added a commit that referenced this pull request Nov 20, 2024
…g used (#200629) (#200859)

# Backport

This will backport the following commits from `main` to `8.x`:
- [Clean code related to savedObjectClientContrat that wasn't being used
(#200629)](#200629)

<!--- Backport version: 8.9.8 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Jesus
Wahrman","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-19T10:46:18Z","message":"Clean
code related to savedObjectClientContrat that wasn't being used
(#200629)\n\n## Summary\r\n\r\nResolves:
https://github.com/elastic/kibana/issues/197216\r\n\r\nRemoved all code
that wasn't being used
in\r\nhttps://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public.\r\nDidn't
remove the actual client since it's still being used
here:\r\nhttps://github.com/elastic/kibana/blob/dbab2214e9451d3a262007660cc0b7cdcea5307c/src/plugins/home/public/application/kibana_services.ts#L46-L48\r\n\r\nChecked
everything with `node scripts/type_check`\r\n\r\n###
Checklist\r\n\r\nCheck the PR satisfies following conditions.
\r\n\r\nReviewers should verify this PR satisfies this list as
well.\r\n\r\n- [ ] The PR description includes the appropriate Release
Notes section,\r\nand the correct `release_node:*` label is applied per
the\r\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<[email protected]>","sha":"d900299e731fccaca5c70889371a2760da794da1","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:Saved
Objects","release_note:skip","v9.0.0","Team:SharedUX","backport:prev-minor"],"number":200629,"url":"https://github.com/elastic/kibana/pull/200629","mergeCommit":{"message":"Clean
code related to savedObjectClientContrat that wasn't being used
(#200629)\n\n## Summary\r\n\r\nResolves:
https://github.com/elastic/kibana/issues/197216\r\n\r\nRemoved all code
that wasn't being used
in\r\nhttps://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public.\r\nDidn't
remove the actual client since it's still being used
here:\r\nhttps://github.com/elastic/kibana/blob/dbab2214e9451d3a262007660cc0b7cdcea5307c/src/plugins/home/public/application/kibana_services.ts#L46-L48\r\n\r\nChecked
everything with `node scripts/type_check`\r\n\r\n###
Checklist\r\n\r\nCheck the PR satisfies following conditions.
\r\n\r\nReviewers should verify this PR satisfies this list as
well.\r\n\r\n- [ ] The PR description includes the appropriate Release
Notes section,\r\nand the correct `release_node:*` label is applied per
the\r\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<[email protected]>","sha":"d900299e731fccaca5c70889371a2760da794da1"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/200629","number":200629,"mergeCommit":{"message":"Clean
code related to savedObjectClientContrat that wasn't being used
(#200629)\n\n## Summary\r\n\r\nResolves:
https://github.com/elastic/kibana/issues/197216\r\n\r\nRemoved all code
that wasn't being used
in\r\nhttps://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public.\r\nDidn't
remove the actual client since it's still being used
here:\r\nhttps://github.com/elastic/kibana/blob/dbab2214e9451d3a262007660cc0b7cdcea5307c/src/plugins/home/public/application/kibana_services.ts#L46-L48\r\n\r\nChecked
everything with `node scripts/type_check`\r\n\r\n###
Checklist\r\n\r\nCheck the PR satisfies following conditions.
\r\n\r\nReviewers should verify this PR satisfies this list as
well.\r\n\r\n- [ ] The PR description includes the appropriate Release
Notes section,\r\nand the correct `release_node:*` label is applied per
the\r\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<[email protected]>","sha":"d900299e731fccaca5c70889371a2760da794da1"}}]}]
BACKPORT-->
paulinashakirova pushed a commit to paulinashakirova/kibana that referenced this pull request 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]>
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request 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
backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) Feature:Saved Objects release_note:skip Skip the PR/issue when compiling release notes Team:SharedUX Team label for AppEx-SharedUX (formerly Global Experience) v8.17.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove browser-side SavedObjectsClientContract
5 participants