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] Move Rule Form code into @kbn/response-ops-rule-form #198725

Merged
merged 76 commits into from
Dec 3, 2024

Conversation

Zacqary
Copy link
Contributor

@Zacqary Zacqary commented Nov 1, 2024

Summary

Part of #195211

Moves Rule Form code out of @kbn/alerts-ui-shared and into a new package called @kbn/response-ops-rule-form.

Some types and hooks that are used by multiple features or solutions are still in @kbn/alerts-ui-shared and have been rerouted. The bulk of Rule Form-specific code is in this new package.

Checklist

@Zacqary Zacqary added Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) Feature:Alerting/RulesManagement Issues related to the Rules Management UX backport:version Backport to applied version labels v9.0.0 v8.17.0 labels Nov 1, 2024
…ckage

# Conflicts:
#	packages/response-ops/rule_form/src/rule_actions/rule_actions_system_actions_item.tsx
#	x-pack/plugins/observability_solution/observability/tsconfig.json
#	x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/system_action_type_form.tsx
@kibanamachine
Copy link
Contributor

Flaky Test Runner Stats

🟠 Some tests failed. - kibana-flaky-test-suite-runner#7515

[❌] x-pack/test/observability_functional/with_rac_write.config.ts: 0/10 tests passed.

see run history

@Zacqary Zacqary enabled auto-merge (squash) November 27, 2024 21:09
@Zacqary
Copy link
Contributor Author

Zacqary commented Dec 2, 2024

Mystery solved, the test that was failing in CI but not locally was because these key names for useQuery hooks were getting transpiled in the production build with the same name: 78d1445

This is because the changes to alerts-ui-shared for some unknowable reason made Webpack decide to use the same function names for fetchAlertsFields and fetchAlertsIndexNames, making the explicit function name no longer suitable for producing a unique key.

Let's avoid using Function.name in useQuery queryKey arguments in the future

Copy link
Contributor

@benakansara benakansara left a comment

Choose a reason for hiding this comment

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

obs-ux-management changes LGTM

…ckage

# Conflicts:
#	packages/kbn-alerts-ui-shared/src/common/hooks/index.ts
#	packages/kbn-alerts-ui-shared/src/common/hooks/use_fetch_alerts_fields_query.ts
#	packages/response-ops/rule_form/src/rule_actions/rule_actions_alerts_filter.tsx
#	x-pack/plugins/triggers_actions_ui/public/types.ts
@elasticmachine
Copy link
Contributor

⏳ Build in-progress

  • Buildkite Build
  • Commit: c5208b1
  • Kibana Serverless Image: docker.elastic.co/kibana-ci/kibana-serverless:pr-198725-c5208b14ce4b

Failed CI Steps

History

@Zacqary Zacqary merged commit 8f267fd into elastic:main Dec 3, 2024
8 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.17

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

@kibanamachine
Copy link
Contributor

💔 All backports failed

Status Branch Result
8.17 Backport failed because of merge conflicts

Manual backport

To create the backport manually run:

node scripts/backport --pr 198725

Questions ?

Please refer to the Backport tool documentation

@Zacqary
Copy link
Contributor Author

Zacqary commented Dec 4, 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

cnasikas added a commit that referenced this pull request Dec 4, 2024
…-rule-form (#198725) (#202907)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[ResponseOps][Rules] Move Rule Form code into
@kbn/response-ops-rule-form
(#198725)](#198725)

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

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

<!--BACKPORT [{"author":{"name":"Zacqary Adam
Xeper","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-12-03T18:40:48Z","message":"[ResponseOps][Rules]
Move Rule Form code into @kbn/response-ops-rule-form (#198725)\n\n##
Summary\r\n\r\nPart of #195211\r\n\r\nMoves Rule Form code out of
`@kbn/alerts-ui-shared` and into a new\r\npackage called
`@kbn/response-ops-rule-form`.\r\n\r\nSome types and hooks that are used
by multiple features or solutions are\r\nstill in
`@kbn/alerts-ui-shared` and have been rerouted. The bulk of\r\nRule
Form-specific code is in this new package.\r\n\r\n\r\n###
Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine
<[email protected]>\r\nCo-authored-by:
Kevin Delemme
<[email protected]>","sha":"8f267fd83c05c3c7c97a07e7abb671c35fc7a617","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:ResponseOps","Team:Fleet","v9.0.0","Feature:Alerting/RulesManagement","ci:project-deploy-observability","Team:obs-ux-management","backport:version","v8.18.0"],"number":198725,"url":"https://github.com/elastic/kibana/pull/198725","mergeCommit":{"message":"[ResponseOps][Rules]
Move Rule Form code into @kbn/response-ops-rule-form (#198725)\n\n##
Summary\r\n\r\nPart of #195211\r\n\r\nMoves Rule Form code out of
`@kbn/alerts-ui-shared` and into a new\r\npackage called
`@kbn/response-ops-rule-form`.\r\n\r\nSome types and hooks that are used
by multiple features or solutions are\r\nstill in
`@kbn/alerts-ui-shared` and have been rerouted. The bulk of\r\nRule
Form-specific code is in this new package.\r\n\r\n\r\n###
Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine
<[email protected]>\r\nCo-authored-by:
Kevin Delemme
<[email protected]>","sha":"8f267fd83c05c3c7c97a07e7abb671c35fc7a617"}},"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/198725","number":198725,"mergeCommit":{"message":"[ResponseOps][Rules]
Move Rule Form code into @kbn/response-ops-rule-form (#198725)\n\n##
Summary\r\n\r\nPart of #195211\r\n\r\nMoves Rule Form code out of
`@kbn/alerts-ui-shared` and into a new\r\npackage called
`@kbn/response-ops-rule-form`.\r\n\r\nSome types and hooks that are used
by multiple features or solutions are\r\nstill in
`@kbn/alerts-ui-shared` and have been rerouted. The bulk of\r\nRule
Form-specific code is in this new package.\r\n\r\n\r\n###
Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine
<[email protected]>\r\nCo-authored-by:
Kevin Delemme
<[email protected]>","sha":"8f267fd83c05c3c7c97a07e7abb671c35fc7a617"}},{"branch":"8.x","label":"v8.18.0","labelRegex":"^v8.18.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Christos Nasikas <[email protected]>
hop-dev pushed a commit to hop-dev/kibana that referenced this pull request Dec 5, 2024
…form (elastic#198725)

## Summary

Part of elastic#195211

Moves Rule Form code out of `@kbn/alerts-ui-shared` and into a new
package called `@kbn/response-ops-rule-form`.

Some types and hooks that are used by multiple features or solutions are
still in `@kbn/alerts-ui-shared` and have been rerouted. The bulk of
Rule Form-specific code is in this new package.


### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

---------

Co-authored-by: kibanamachine <[email protected]>
Co-authored-by: Kevin Delemme <[email protected]>
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Dec 9, 2024
…form (elastic#198725)

## Summary

Part of elastic#195211

Moves Rule Form code out of `@kbn/alerts-ui-shared` and into a new
package called `@kbn/response-ops-rule-form`.

Some types and hooks that are used by multiple features or solutions are
still in `@kbn/alerts-ui-shared` and have been rerouted. The bulk of
Rule Form-specific code is in this new package.


### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

---------

Co-authored-by: kibanamachine <[email protected]>
Co-authored-by: Kevin Delemme <[email protected]>
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Dec 12, 2024
…form (elastic#198725)

## Summary

Part of elastic#195211

Moves Rule Form code out of `@kbn/alerts-ui-shared` and into a new
package called `@kbn/response-ops-rule-form`.

Some types and hooks that are used by multiple features or solutions are
still in `@kbn/alerts-ui-shared` and have been rerouted. The bulk of
Rule Form-specific code is in this new package.


### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

---------

Co-authored-by: kibanamachine <[email protected]>
Co-authored-by: Kevin Delemme <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:version Backport to applied version labels ci:project-deploy-observability Create an Observability project Feature:Alerting/RulesManagement Issues related to the Rules Management UX release_note:skip Skip the PR/issue when compiling release notes Team:Fleet Team label for Observability Data Collection Fleet team Team:obs-ux-management Observability Management User Experience Team 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.

10 participants