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

[UA][Core][API Deprecations] Add deprecate type and update copy #198800

Merged
merged 10 commits into from
Nov 6, 2024

Conversation

Bamieh
Copy link
Member

@Bamieh Bamieh commented Nov 4, 2024

Summary

  • Add deprecate Type to the API Deprecations reasons.
  • Add a message optional field that is surfaced in the UA
  • Add IDE documentation in the autocomplete for all deprecation fields.
  • Updated README and example plugin for the deprecate type
  • Update copy for deprecate.

Closes #197721

Testing

Run kibana locally with the test example plugin that has deprecated routes

yarn start --plugin-path=examples/routing_example --plugin-path=examples/developer_examples

The following comprehensive deprecated routes examples are registered inside the folder: examples/routing_example/server/routes/deprecated_routes

Run them in the dev console to trigger the deprecation condition so they show up in the UA:

GET kbn:/api/routing_example/d/deprecated_route
image

@Bamieh Bamieh added release_note:skip Skip the PR/issue when compiling release notes v9.0.0 v8.17.0 labels Nov 4, 2024
@Bamieh Bamieh requested a review from a team as a code owner November 4, 2024 14:40
@Bamieh Bamieh requested a review from a team as a code owner November 4, 2024 14:41
Copy link
Contributor

@florent-leborgne florent-leborgne left a comment

Choose a reason for hiding this comment

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

Nice! Copy LGTM 🚗

@Bamieh Bamieh added the auto-backport Deprecated - use backport:version if exact versions are needed label Nov 4, 2024
@Bamieh
Copy link
Member Author

Bamieh commented Nov 4, 2024

@elasticmachine merge upstream

@Bamieh Bamieh added the backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) label Nov 4, 2024
@Bamieh Bamieh requested a review from TinaHeiligers November 4, 2024 19:47
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.

Code looks good and works as expected. Nicely done!

@Bamieh
Copy link
Member Author

Bamieh commented Nov 5, 2024

@elasticmachine merge upstream

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

Copy link
Contributor

@mattkime mattkime left a comment

Choose a reason for hiding this comment

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

Changes look good and work well!

@Bamieh Bamieh merged commit 665cf98 into elastic:main Nov 6, 2024
22 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

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

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Nov 6, 2024
…tic#198800)

## Summary

- [x] Add `deprecate` Type to the API Deprecations reasons.
- [x] Add a `message` optional field that is surfaced in the UA
- [x] Add IDE documentation in the autocomplete for all deprecation
fields.
- [x] Updated README and example plugin for the `deprecate` type
- [x] Update copy for `deprecate`.

Closes elastic#197721

## Testing

Run kibana locally with the test example plugin that has deprecated
routes
```
yarn start --plugin-path=examples/routing_example --plugin-path=examples/developer_examples
```

The following comprehensive deprecated routes examples are registered
inside the folder:
`examples/routing_example/server/routes/deprecated_routes`

Run them in the dev console to trigger the deprecation condition so they
show up in the UA:

```
GET kbn:/api/routing_example/d/deprecated_route
```

<img width="628" alt="image"
src="https://github.com/user-attachments/assets/3c0e1829-9a07-49bd-94a3-398514f448e2">

---------

Co-authored-by: kibanamachine <[email protected]>
Co-authored-by: Elastic Machine <[email protected]>
Co-authored-by: florent-leborgne <[email protected]>
(cherry picked from commit 665cf98)
@kibanamachine
Copy link
Contributor

💚 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

kibanamachine added a commit that referenced this pull request Nov 6, 2024
…#198800) (#199079)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[UA][Core][API Deprecations] Add deprecate type and update copy
(#198800)](#198800)

<!--- Backport version: 9.4.3 -->

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

<!--BACKPORT [{"author":{"name":"Ahmad
Bamieh","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-06T05:43:56Z","message":"[UA][Core][API
Deprecations] Add deprecate type and update copy (#198800)\n\n##
Summary\r\n\r\n- [x] Add `deprecate` Type to the API Deprecations
reasons.\r\n- [x] Add a `message` optional field that is surfaced in the
UA\r\n- [x] Add IDE documentation in the autocomplete for all
deprecation\r\nfields.\r\n- [x] Updated README and example plugin for
the `deprecate` type\r\n- [x] Update copy for
`deprecate`.\r\n\r\n\r\nCloses
https://github.com/elastic/kibana/issues/197721\r\n\r\n##
Testing\r\n\r\nRun kibana locally with the test example plugin that has
deprecated\r\nroutes\r\n```\r\nyarn start
--plugin-path=examples/routing_example
--plugin-path=examples/developer_examples\r\n```\r\n\r\nThe following
comprehensive deprecated routes examples are registered\r\ninside the
folder:\r\n`examples/routing_example/server/routes/deprecated_routes`\r\n\r\nRun
them in the dev console to trigger the deprecation condition so
they\r\nshow up in the UA:\r\n\r\n```\r\nGET
kbn:/api/routing_example/d/deprecated_route\r\n```\r\n\r\n<img
width=\"628\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/3c0e1829-9a07-49bd-94a3-398514f448e2\">\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<[email protected]>\r\nCo-authored-by:
Elastic Machine
<[email protected]>\r\nCo-authored-by:
florent-leborgne
<[email protected]>","sha":"665cf98067b6fbd8850866c75e189c937e1c2dbd","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","auto-backport","backport:prev-minor","v8.17.0"],"title":"[UA][Core][API
Deprecations] Add deprecate type and update
copy","number":198800,"url":"https://github.com/elastic/kibana/pull/198800","mergeCommit":{"message":"[UA][Core][API
Deprecations] Add deprecate type and update copy (#198800)\n\n##
Summary\r\n\r\n- [x] Add `deprecate` Type to the API Deprecations
reasons.\r\n- [x] Add a `message` optional field that is surfaced in the
UA\r\n- [x] Add IDE documentation in the autocomplete for all
deprecation\r\nfields.\r\n- [x] Updated README and example plugin for
the `deprecate` type\r\n- [x] Update copy for
`deprecate`.\r\n\r\n\r\nCloses
https://github.com/elastic/kibana/issues/197721\r\n\r\n##
Testing\r\n\r\nRun kibana locally with the test example plugin that has
deprecated\r\nroutes\r\n```\r\nyarn start
--plugin-path=examples/routing_example
--plugin-path=examples/developer_examples\r\n```\r\n\r\nThe following
comprehensive deprecated routes examples are registered\r\ninside the
folder:\r\n`examples/routing_example/server/routes/deprecated_routes`\r\n\r\nRun
them in the dev console to trigger the deprecation condition so
they\r\nshow up in the UA:\r\n\r\n```\r\nGET
kbn:/api/routing_example/d/deprecated_route\r\n```\r\n\r\n<img
width=\"628\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/3c0e1829-9a07-49bd-94a3-398514f448e2\">\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<[email protected]>\r\nCo-authored-by:
Elastic Machine
<[email protected]>\r\nCo-authored-by:
florent-leborgne
<[email protected]>","sha":"665cf98067b6fbd8850866c75e189c937e1c2dbd"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/198800","number":198800,"mergeCommit":{"message":"[UA][Core][API
Deprecations] Add deprecate type and update copy (#198800)\n\n##
Summary\r\n\r\n- [x] Add `deprecate` Type to the API Deprecations
reasons.\r\n- [x] Add a `message` optional field that is surfaced in the
UA\r\n- [x] Add IDE documentation in the autocomplete for all
deprecation\r\nfields.\r\n- [x] Updated README and example plugin for
the `deprecate` type\r\n- [x] Update copy for
`deprecate`.\r\n\r\n\r\nCloses
https://github.com/elastic/kibana/issues/197721\r\n\r\n##
Testing\r\n\r\nRun kibana locally with the test example plugin that has
deprecated\r\nroutes\r\n```\r\nyarn start
--plugin-path=examples/routing_example
--plugin-path=examples/developer_examples\r\n```\r\n\r\nThe following
comprehensive deprecated routes examples are registered\r\ninside the
folder:\r\n`examples/routing_example/server/routes/deprecated_routes`\r\n\r\nRun
them in the dev console to trigger the deprecation condition so
they\r\nshow up in the UA:\r\n\r\n```\r\nGET
kbn:/api/routing_example/d/deprecated_route\r\n```\r\n\r\n<img
width=\"628\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/3c0e1829-9a07-49bd-94a3-398514f448e2\">\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<[email protected]>\r\nCo-authored-by:
Elastic Machine
<[email protected]>\r\nCo-authored-by:
florent-leborgne
<[email protected]>","sha":"665cf98067b6fbd8850866c75e189c937e1c2dbd"}},{"branch":"8.x","label":"v8.17.0","branchLabelMappingKey":"^v8.17.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Ahmad Bamieh <[email protected]>
@Bamieh Bamieh deleted the core/api_deprecations/deprecated_type branch November 6, 2024 12:39
mgadewoll pushed a commit to mgadewoll/kibana that referenced this pull request Nov 7, 2024
…tic#198800)

## Summary

- [x] Add `deprecate` Type to the API Deprecations reasons.
- [x] Add a `message` optional field that is surfaced in the UA
- [x] Add IDE documentation in the autocomplete for all deprecation
fields.
- [x] Updated README and example plugin for the `deprecate` type
- [x] Update copy for `deprecate`.


Closes elastic#197721

## Testing

Run kibana locally with the test example plugin that has deprecated
routes
```
yarn start --plugin-path=examples/routing_example --plugin-path=examples/developer_examples
```

The following comprehensive deprecated routes examples are registered
inside the folder:
`examples/routing_example/server/routes/deprecated_routes`

Run them in the dev console to trigger the deprecation condition so they
show up in the UA:

```
GET kbn:/api/routing_example/d/deprecated_route
```

<img width="628" alt="image"
src="https://github.com/user-attachments/assets/3c0e1829-9a07-49bd-94a3-398514f448e2">

---------

Co-authored-by: kibanamachine <[email protected]>
Co-authored-by: Elastic Machine <[email protected]>
Co-authored-by: florent-leborgne <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Deprecated - use backport:version if exact versions are needed backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) release_note:skip Skip the PR/issue when compiling release notes v8.17.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Core] Upgrade Assistant warns the global SO HTTP APIs are deprecated
6 participants