[Security Solution] Show deprecated bulk endpoints in Upgrade Assistant: some clean-up (#209545)

**Addresses:** https://github.com/elastic/kibana/issues/193184
**Is a follow-up to:** https://github.com/elastic/kibana/pull/207091,
https://github.com/elastic/kibana/pull/208090,
https://github.com/elastic/kibana/pull/207906

## Summary

This PR follows after our recent changes made to the Upgrade Assistant
and does some minor cleanup:

- The doc link is renamed to `legacyRuleManagementBulkApiDeprecations`
for the sake of being more specific.
- The deprecation level is changed to `warning` in accordance to what we
have in `8.x` and `8.18`.
This commit is contained in:
Georgii Gorbachev 2025-02-14 20:18:41 +01:00 committed by GitHub
parent e21c5d0e91
commit 262969d15d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 22 additions and 12 deletions

View file

@ -454,7 +454,7 @@ export const getDocLinks = ({ kibanaBranch, buildFlavor }: GetDocLinkOptions): D
aiAssistant: `${SECURITY_SOLUTION_DOCS}security-assistant.html`,
signalsMigrationApi: `${SECURITY_SOLUTION_DOCS}signals-migration-api.html`,
legacyEndpointManagementApiDeprecations: `${KIBANA_DOCS}breaking-changes-summary.html#breaking-199598`,
legacyBulkApiDeprecations: `${KIBANA_DOCS}breaking-changes-summary.html#breaking-207091`,
legacyRuleManagementBulkApiDeprecations: `${KIBANA_DOCS}breaking-changes-summary.html#breaking-207091`,
},
query: {
eql: `${ELASTICSEARCH_DOCS}eql.html`,

View file

@ -319,7 +319,7 @@ export interface DocLinks {
readonly detectionEngineOverview: string;
readonly signalsMigrationApi: string;
readonly legacyEndpointManagementApiDeprecations: string;
readonly legacyBulkApiDeprecations: string;
readonly legacyRuleManagementBulkApiDeprecations: string;
};
readonly query: {
readonly eql: string;

View file

@ -42,6 +42,8 @@ export const bulkCreateRulesRoute = (
logger: Logger,
docLinks: DocLinksServiceSetup
) => {
const securityDocLinks = docLinks.links.securitySolution;
router.versioned
.post({
access: 'public',
@ -67,8 +69,8 @@ export const bulkCreateRulesRoute = (
},
options: {
deprecated: {
documentationUrl: docLinks.links.securitySolution.legacyBulkApiDeprecations,
severity: 'critical',
documentationUrl: securityDocLinks.legacyRuleManagementBulkApiDeprecations,
severity: 'warning',
reason: {
type: 'migrate',
newApiMethod: 'POST',

View file

@ -132,6 +132,9 @@ export const bulkDeleteRulesRoute = (
authz: { requiredPrivileges: ['securitySolution'] },
},
};
const securityDocLinks = docLinks.links.securitySolution;
router.versioned.delete(routeConfig).addVersion(
{
version: '2023-10-31',
@ -142,8 +145,8 @@ export const bulkDeleteRulesRoute = (
},
options: {
deprecated: {
documentationUrl: docLinks.links.securitySolution.legacyBulkApiDeprecations,
severity: 'critical',
documentationUrl: securityDocLinks.legacyRuleManagementBulkApiDeprecations,
severity: 'warning',
reason: {
type: 'migrate',
newApiMethod: 'POST',
@ -154,6 +157,7 @@ export const bulkDeleteRulesRoute = (
},
handler
);
router.versioned.post(routeConfig).addVersion(
{
version: '2023-10-31',
@ -164,8 +168,8 @@ export const bulkDeleteRulesRoute = (
},
options: {
deprecated: {
documentationUrl: docLinks.links.securitySolution.legacyBulkApiDeprecations,
severity: 'critical',
documentationUrl: securityDocLinks.legacyRuleManagementBulkApiDeprecations,
severity: 'warning',
reason: {
type: 'migrate',
newApiMethod: 'POST',

View file

@ -36,6 +36,8 @@ export const bulkPatchRulesRoute = (
logger: Logger,
docLinks: DocLinksServiceSetup
) => {
const securityDocLinks = docLinks.links.securitySolution;
router.versioned
.patch({
access: 'public',
@ -61,8 +63,8 @@ export const bulkPatchRulesRoute = (
},
options: {
deprecated: {
documentationUrl: docLinks.links.securitySolution.legacyBulkApiDeprecations,
severity: 'critical',
documentationUrl: securityDocLinks.legacyRuleManagementBulkApiDeprecations,
severity: 'warning',
reason: {
type: 'migrate',
newApiMethod: 'POST',

View file

@ -40,6 +40,8 @@ export const bulkUpdateRulesRoute = (
logger: Logger,
docLinks: DocLinksServiceSetup
) => {
const securityDocLinks = docLinks.links.securitySolution;
router.versioned
.put({
access: 'public',
@ -65,8 +67,8 @@ export const bulkUpdateRulesRoute = (
},
options: {
deprecated: {
documentationUrl: docLinks.links.securitySolution.legacyBulkApiDeprecations,
severity: 'critical',
documentationUrl: securityDocLinks.legacyRuleManagementBulkApiDeprecations,
severity: 'warning',
reason: {
type: 'migrate',
newApiMethod: 'POST',