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][Rules] Version enable rule route #188645

Merged
merged 9 commits into from
Jul 24, 2024

Conversation

adcoelho
Copy link
Contributor

Summary

Parent Issue: #187572

Versions the POST /rule/{id}/_enable endpoint.

Checklist

@adcoelho adcoelho added release_note:skip Skip the PR/issue when compiling release notes Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) Feature:Alerting/RulesFramework Issues related to the Alerting Rules Framework v8.16.0 labels Jul 18, 2024
@adcoelho adcoelho self-assigned this Jul 18, 2024
@adcoelho adcoelho requested a review from a team as a code owner July 18, 2024 12:35
@elasticmachine
Copy link
Contributor

Pinging @elastic/response-ops (Team:ResponseOps)

@adcoelho adcoelho changed the title [ResponseOps][Rules] Version enable roule route [ResponseOps][Rules] Version enable rule route Jul 18, 2024
@adcoelho adcoelho requested a review from JiaweiWu July 18, 2024 14:09
Copy link
Contributor

@js-jankisalvi js-jankisalvi 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. 👍
Are you going to handle adding description to schema for OAS in a separate PR?

@adcoelho
Copy link
Contributor Author

@js-jankisalvi i will I only learned how to do the oas changes after reviewing your PR and when I did that I had already finished versioning this :D

@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Metrics [docs]

✅ unchanged

History

cc @adcoelho

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.

Works as expected, LGTM!

image

test('throws an error if API params do not match the schema', async () => {
await expect(
// @ts-ignore: this is what we are testing
async () => await rulesClient.enable({ id: 1 })
Copy link
Member

Choose a reason for hiding this comment

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

nit: async/await could likely be omitted here

Copy link
Contributor

@JiaweiWu JiaweiWu left a comment

Choose a reason for hiding this comment

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

LGTM just 1 comment

try {
await rulesClient.enable({ id });
await rulesClient.enable(params);
Copy link
Contributor

Choose a reason for hiding this comment

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

let's follow the pattern and rename this rulesClient.enableRule so enable.ts -> enable_rule.ts

@adcoelho adcoelho requested a review from a team as a code owner July 24, 2024 07:57
Copy link
Contributor

@nikitaindik nikitaindik left a comment

Choose a reason for hiding this comment

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

Detection Rules Management changes LGTM

@adcoelho adcoelho enabled auto-merge (squash) July 24, 2024 11:52
@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @adcoelho

@adcoelho adcoelho merged commit f5d9b9d into elastic:main Jul 24, 2024
40 checks passed
@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label Jul 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting Feature:Alerting/RulesFramework Issues related to the Alerting Rules Framework 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.16.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants