Skip to content

[ResponseOps][Rules] Move Rule Form code into @kbn/response-ops-rule-form#198725

Merged
Zacqary merged 76 commits intoelastic:mainfrom
Zacqary:195211-rule-form-package
Dec 3, 2024
Merged

[ResponseOps][Rules] Move Rule Form code into @kbn/response-ops-rule-form#198725
Zacqary merged 76 commits intoelastic:mainfrom
Zacqary:195211-rule-form-package

Conversation

@Zacqary
Copy link
Copy Markdown
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 Platform ResponseOps team (formerly the Cases and Alerting teams) t// 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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
@kibanamachine
Copy link
Copy Markdown
Contributor

Starting backport for target branches: 8.17

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

@kibanamachine
Copy link
Copy Markdown
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
Copy Markdown
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":"Zacqary@users.noreply.github.com"},"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
<42973632+kibanamachine@users.noreply.github.com>\r\nCo-authored-by:
Kevin Delemme
<kevin.delemme@elastic.co>","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
<42973632+kibanamachine@users.noreply.github.com>\r\nCo-authored-by:
Kevin Delemme
<kevin.delemme@elastic.co>","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
<42973632+kibanamachine@users.noreply.github.com>\r\nCo-authored-by:
Kevin Delemme
<kevin.delemme@elastic.co>","sha":"8f267fd83c05c3c7c97a07e7abb671c35fc7a617"}},{"branch":"8.x","label":"v8.18.0","labelRegex":"^v8.18.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Christos Nasikas <christos.nasikas@elastic.co>
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 <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Kevin Delemme <kevin.delemme@elastic.co>
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:actionable-obs Formerly "obs-ux-management", responsible for SLO, o11y alerting, significant events, & synthetics. Team:Fleet Team label for Observability Data Collection Fleet team Team:ResponseOps Platform ResponseOps team (formerly the Cases and Alerting teams) t// v8.18.0 v9.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants