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

[RAM][Maintenance Window] MW scoped query schema and API changes #171597

Merged
merged 4 commits into from
Nov 22, 2023

Conversation

JiaweiWu
Copy link
Contributor

Summary

Partially Resolves: #164255

This pull request is part 1/3 to add scoped queries to maintenance windows. More specifically, this PR adds the new scoped_query field to the maintenanceWindow type and schema. Also adds the scoped_query field to create/update maintenance window APIs.

This PR only contains the schema and API component. All changes should be backwards compatible since the scoped_query field is optional. So this PR can be merged without any dependencies.

The 2 PRs that comes after will be:

  • Frontend changes
  • Task runner changes

Checklist

@JiaweiWu JiaweiWu 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/RulesManagement Issues related to the Rules Management UX v8.12.0 labels Nov 21, 2023
@JiaweiWu JiaweiWu requested a review from a team as a code owner November 21, 2023 06:57
@elasticmachine
Copy link
Contributor

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

@JiaweiWu
Copy link
Contributor Author

@elasticmachine merge upstream

@JiaweiWu
Copy link
Contributor Author

@elasticmachine merge upstream

@JiaweiWu
Copy link
Contributor Author

@elasticmachine merge upstream

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

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
alerting 779 780 +1

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
alerting 50 51 +1
Unknown metric groups

API count

id before after diff
alerting 810 811 +1

References to deprecated APIs

id before after diff
triggersActionsUi 29 50 +21

Unreferenced deprecated APIs

id before after diff
alerting 1 3 +2

History

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

@@ -14,6 +14,13 @@ export enum MaintenanceWindowStatus {
Archived = 'archived',
}

export const filterStateStore = {
APP_STATE: 'appState',
GLOBAL_STATE: 'globalState',
Copy link
Contributor

Choose a reason for hiding this comment

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

I still hate to see globalState

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok fine i will create an issue

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@@ -489,7 +489,7 @@ async function updateRuleAttributesAndParamsInMemory<Params extends RuleParams>(
context,
operations,
rule: ruleDomain,
ruleActions,
ruleActions: ruleActions as RuleDomain['actions'], // TODO (http-versioning) Remove this cast once we fix injectReferencesIntoActions
Copy link
Contributor

Choose a reason for hiding this comment

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

I though that bulkEdit was part of the versioning!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The method isn't versioned but the route IOs are all versioned.

Also I can remove this cast

@JiaweiWu JiaweiWu merged commit 92bc2a0 into elastic:main Nov 22, 2023
27 checks passed
@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label Nov 22, 2023
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/RulesManagement Issues related to the Rules Management UX 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.12.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Maintenance Windows] Support "filtering" what Rules/Alerts Maintenance Windows affect
5 participants