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

[ResponseOps][Alerting] Add deprecation object to legacy rule endpoints #201550

Merged
merged 28 commits into from
Nov 28, 2024

Conversation

jcger
Copy link
Contributor

@jcger jcger commented Nov 25, 2024

Summary

Adds deprecation object in deprecated alerting routes

Closes #196556

Copy link
Contributor

A documentation preview will be available soon.

Request a new doc build by commenting
  • Rebuild this PR: run docs-build
  • Rebuild this PR and all Elastic docs: run docs-build rebuild

run docs-build is much faster than run docs-build rebuild. A rebuild should only be needed in rare situations.

If your PR continues to fail for an unknown reason, the doc build pipeline may be broken. Elastic employees can check the pipeline status here.

@jcger jcger added Feature:Alerting release_note:skip Skip the PR/issue when compiling release notes Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) v9.0.0 backport:prev-minor Backport to (9.0) the previous minor version (i.e. one version back from main) v8.18.0 labels Nov 25, 2024
@jcger jcger marked this pull request as ready for review November 25, 2024 13:43
@jcger jcger requested review from a team as code owners November 25, 2024 13:43
`POST /api/alerts/alert/{id}/_mute_all` has been replaced by `POST /api/alerting/rule/{id}/_mute_all`
`POST /api/alerts/alert/{id}/_unmute_all` has been replaced by `POST /api/alerting/rule/{id}/_unmute_all`
`POST /api/alerts/alert/{id}/_update_api_key` has been replaced by `POST /api/alerting/rule/{id}/_update_api_key`
`GET /api/alerts/{id}/_instance_summary` has been deprecated without replacement
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I couldn't find a replacement for this, therefore the deprecation note

`POST /api/alerts/alert/{id}/_unmute_all` has been replaced by `POST /api/alerting/rule/{id}/_unmute_all`
`POST /api/alerts/alert/{id}/_update_api_key` has been replaced by `POST /api/alerting/rule/{id}/_update_api_key`
`GET /api/alerts/{id}/_instance_summary` has been deprecated without replacement
`GET /api/alerts/{id}/state` has been deprecated without replacement
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I found this replacement route but it's internal and therefore the deprecation note. Wdyt?

Copy link
Member

Choose a reason for hiding this comment

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

Yes, we should not offer the internal APIs as alternatives.

@cnasikas cnasikas changed the title [Alerting] Add deprecation object to legacy rule endpoints [ResponseOps][Alerting] Add deprecation object to legacy rule endpoints Nov 26, 2024
Copy link
Member

@cnasikas cnasikas left a comment

Choose a reason for hiding this comment

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

LGMT! I think we should put in the upgrade notes a link to our documentation (https://www.elastic.co/docs/api/doc/kibana/v8/group/endpoint-alerting) if users want to learn about the new routes in more detail.

documentationUrl: docLinks.links.alerting.legacyRuleApiDeprecations,
severity: 'warning',
reason: {
type: 'deprecate',
Copy link
Member

Choose a reason for hiding this comment

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

I think this should be remove as the API will be removed in 9.0.

documentationUrl: docLinks.links.alerting.legacyRuleApiDeprecations,
severity: 'warning',
reason: {
type: 'deprecate',
Copy link
Member

Choose a reason for hiding this comment

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

I think this should be remove as the API will be removed in 9.0.

`POST /api/alerts/alert/{id}/_unmute_all` has been replaced by `POST /api/alerting/rule/{id}/_unmute_all`
`POST /api/alerts/alert/{id}/_update_api_key` has been replaced by `POST /api/alerting/rule/{id}/_update_api_key`
`GET /api/alerts/{id}/_instance_summary` has been deprecated without replacement
`GET /api/alerts/{id}/state` has been deprecated without replacement
Copy link
Member

Choose a reason for hiding this comment

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

Yes, we should not offer the internal APIs as alternatives.

@cnasikas
Copy link
Member

Btw, I checked the docs and noticed that the routes are shown in one big line/paragraph.

Screenshot 2024-11-26 at 12 05 07 PM

Also. the Kibana 9.0 section does not include the new changes

Screenshot 2024-11-26 at 12 05 19 PM

@jcger
Copy link
Contributor Author

jcger commented Nov 26, 2024

Btw, I checked the docs and noticed that the routes are shown in one big line/paragraph.

Yes, I've tried already with a list but didn't work, it's gonna be html so I'm trying with empty lines in between now. I would like to avoid adding <br /> tags as this issue should be solved in the renderer that inserts our notes. It's happening for all the others too.

add doc link to new api
use reason.type remove instead oof deprecate for apis we will remove
@cnasikas
Copy link
Member

Btw, I checked the docs and noticed that the routes are shown in one big line/paragraph.

Yes, I've tried already with a list but didn't work, it's gonna be html so I'm trying with empty lines in between now. I would like to avoid adding <br /> tags as this issue should be solved in the renderer that inserts our notes. It's happening for all the others too.

Ok! Maybe someone from the docs team can help with this. cc @lcawl

@cnasikas cnasikas requested a review from lcawl November 27, 2024 08:06
Copy link
Member

@umbopepato umbopepato left a comment

Choose a reason for hiding this comment

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

LGTM!

@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #9 / management Index patterns on aliases discover verify hits should be able to discover and verify no of hits for alias2
  • [job] [logs] FTR Configs #103 / Rules Management - Prebuilt Rules - Prebuilt Rules Management @ess @serverless @skipInServerlessMKI Prebuilt Rules status get_prebuilt_rules_status - legacy rule package with historical versions should return available rule updates when previous historical versions unavailable

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
aiAssistantManagementSelection 92.9KB 93.0KB +78.0B
lists 145.3KB 145.4KB +78.0B
total +156.0B

Page load bundle

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

id before after diff
core 454.4KB 454.5KB +78.0B

History

@lcawl
Copy link
Contributor

lcawl commented Nov 27, 2024

Btw, I checked the docs and noticed that the routes are shown in one big line/paragraph.

Yes, I've tried already with a list but didn't work, it's gonna be html so I'm trying with empty lines in between now. I would like to avoid adding <br /> tags as this issue should be solved in the renderer that inserts our notes. It's happening for all the others too.

I've added bulleted lists in b07b47e

@lcawl
Copy link
Contributor

lcawl commented Nov 27, 2024

Also. the Kibana 9.0 section does not include the new changes

I've copied the content so it appears in both places and edited the subtitle to align with the other breaking changes via ad0e7cc

Copy link
Contributor

@lcawl lcawl left a comment

Choose a reason for hiding this comment

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

Docs LGTM!
Note we'll also need to clean up the API docs, so I've left a comment in #196556

@jcger jcger merged commit 93b67fb into elastic:main Nov 28, 2024
8 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

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

@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 201550

Questions ?

Please refer to the Backport tool documentation

@jcger
Copy link
Contributor Author

jcger commented Nov 28, 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

jcger added a commit to jcger/kibana that referenced this pull request Nov 28, 2024
…ts (elastic#201550)

## Summary

Adds deprecation object in deprecated alerting routes

Closes elastic#196556

---------

Co-authored-by: lcawl <lcawley@elastic.co>
(cherry picked from commit 93b67fb)

# Conflicts:
#	docs/CHANGELOG.asciidoc
jcger added a commit that referenced this pull request Nov 28, 2024
…ndpoints (#201550) (#202165)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[ResponseOps][Alerting] Add deprecation object to legacy rule
endpoints (#201550)](#201550)

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

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

<!--BACKPORT [{"author":{"name":"Julian
Gernun","email":"17549662+jcger@users.noreply.github.com"},"sourceCommit":{"committedDate":"2024-11-28T07:45:11Z","message":"[ResponseOps][Alerting]
Add deprecation object to legacy rule endpoints (#201550)\n\n##
Summary\r\n\r\nAdds deprecation object in deprecated alerting
routes\r\n\r\nCloses
https://github.com/elastic/kibana/issues/196556\r\n\r\n---------\r\n\r\nCo-authored-by:
lcawl
<lcawley@elastic.co>","sha":"93b67fb1a37b397284c92309e3ca864580b9fcfc","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:Alerting","release_note:skip","Team:ResponseOps","v9.0.0","backport:prev-minor","v8.18.0"],"number":201550,"url":"https://github.com/elastic/kibana/pull/201550","mergeCommit":{"message":"[ResponseOps][Alerting]
Add deprecation object to legacy rule endpoints (#201550)\n\n##
Summary\r\n\r\nAdds deprecation object in deprecated alerting
routes\r\n\r\nCloses
https://github.com/elastic/kibana/issues/196556\r\n\r\n---------\r\n\r\nCo-authored-by:
lcawl
<lcawley@elastic.co>","sha":"93b67fb1a37b397284c92309e3ca864580b9fcfc"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/201550","number":201550,"mergeCommit":{"message":"[ResponseOps][Alerting]
Add deprecation object to legacy rule endpoints (#201550)\n\n##
Summary\r\n\r\nAdds deprecation object in deprecated alerting
routes\r\n\r\nCloses
https://github.com/elastic/kibana/issues/196556\r\n\r\n---------\r\n\r\nCo-authored-by:
lcawl
<lcawley@elastic.co>","sha":"93b67fb1a37b397284c92309e3ca864580b9fcfc"}},{"branch":"8.x","label":"v8.18.0","labelRegex":"^v8.18.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Dec 12, 2024
…ts (elastic#201550)

## Summary

Adds deprecation object in deprecated alerting routes

Closes elastic#196556

---------

Co-authored-by: lcawl <lcawley@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-minor Backport to (9.0) the previous minor version (i.e. one version back from main) Feature:Alerting release_note:skip Skip the PR/issue when compiling release notes Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) v8.18.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ResponseOps][Rules] Add deprecation object to deprecated endpoints
6 participants