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

Adding model versions for all remaining so types without model versions #195500

Merged
merged 7 commits into from
Oct 15, 2024

Conversation

ymao1
Copy link
Contributor

@ymao1 ymao1 commented Oct 8, 2024

Resolves #184618

Summary

Adds v1 schemas for all remaining Response Ops owned saved object types:

  • connector_token
  • api_key_pending_invalidation
  • maintenance-window
  • rules-settings

To Verify

  1. Run ES and Kibana on main and create saved objects for each of the above types:
    a. Create an OAuth ServiceNow ITOM connector to create a connector_token saved object
    b. Create a rule, let it run, and then delete the rule. This will create an api_key_pending_invalidation SO and 2 rules-settings SOs
    c. Create some maintenance windows, both with and without filters
  2. Keep ES running and switch to this branch and restart Kibana. Then verify you can read and modify the existing SOs with no errors
    a. Test the ServiceNow ITOM connector, which should read the connector_token SO
    b. Modify the rules settings and then run a rule to ensure they're loaded with no errors
    c. Load the maintenance window UI and edit a MW

@ymao1
Copy link
Contributor Author

ymao1 commented Oct 10, 2024

@elasticmachine merge upstream

@ymao1
Copy link
Contributor Author

ymao1 commented Oct 10, 2024

@elasticmachine merge upstream

@ymao1
Copy link
Contributor Author

ymao1 commented Oct 11, 2024

@elasticmachine merge upstream

@ymao1 ymao1 self-assigned this Oct 11, 2024
@ymao1 ymao1 added release_note:skip Skip the PR/issue when compiling release notes v9.0.0 backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) v8.16.0 Feature:Alerting Feature:Actions Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) labels Oct 11, 2024
@ymao1
Copy link
Contributor Author

ymao1 commented Oct 11, 2024

The latest build succeeded https://buildkite.com/elastic/kibana-pull-request/builds/241597, not sure why there was no update to the PR

@ymao1 ymao1 marked this pull request as ready for review October 11, 2024 14:48
@ymao1 ymao1 requested review from a team as code owners October 11, 2024 14:48
@elasticmachine
Copy link
Contributor

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

@ymao1 ymao1 requested review from pmuellr and guskovaue October 11, 2024 14:49
Copy link
Contributor

@jloleysens jloleysens left a comment

Choose a reason for hiding this comment

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

Nice work @ymao1 !

@elena-shostak elena-shostak self-requested a review October 14, 2024 12:23
Copy link
Contributor

@elena-shostak elena-shostak left a comment

Choose a reason for hiding this comment

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

LGTM!

@ymao1
Copy link
Contributor Author

ymao1 commented Oct 14, 2024

@elasticmachine merge upstream

Copy link
Member

@pmuellr pmuellr left a comment

Choose a reason for hiding this comment

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

LGTM.

Did all the tests listed, except for the SN ITOM one - I guess you can't just give it garbage? :-). Everything I tested ran fine ..., SO's now have a typeMigrationVersion of 10.1.0 - I can't remember why those numbers are the way they are, but I think that's right.

@ymao1
Copy link
Contributor Author

ymao1 commented Oct 15, 2024

@elasticmachine merge upstream

@ymao1
Copy link
Contributor Author

ymao1 commented Oct 15, 2024

@elasticmachine merge upstream

@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #18 / @ess @serverless SecuritySolution Saved Objects Note - Saved Objects get notes should retrieve considering page query parameter

Metrics [docs]

✅ unchanged

History

cc @ymao1

@ymao1 ymao1 merged commit d9cd17b into elastic:main Oct 15, 2024
52 checks passed
@ymao1 ymao1 deleted the model-versions branch October 15, 2024 22:22
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

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

@kibanamachine
Copy link
Contributor

💔 All backports failed

Status Branch Result
8.x Backport failed because of merge conflicts

Manual backport

To create the backport manually run:

node scripts/backport --pr 195500

Questions ?

Please refer to the Backport tool documentation

@ymao1
Copy link
Contributor Author

ymao1 commented Oct 15, 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

ymao1 added a commit to ymao1/kibana that referenced this pull request Oct 15, 2024
…ns (elastic#195500)

Resolves elastic#184618

## Summary

Adds v1 schemas for all remaining Response Ops owned saved object types:
* `connector_token`
* `api_key_pending_invalidation`
* `maintenance-window`
* `rules-settings`

## To Verify

1. Run ES and Kibana on `main` and create saved objects for each of the
above types:
a. Create an OAuth ServiceNow ITOM connector to create a
`connector_token` saved object
b. Create a rule, let it run, and then delete the rule. This will create
an `api_key_pending_invalidation` SO and 2 `rules-settings` SOs
  c. Create some maintenance windows, both with and without filters
2. Keep ES running and switch to this branch and restart Kibana. Then
verify you can read and modify the existing SOs with no errors
a. Test the ServiceNow ITOM connector, which should read the
`connector_token` SO
b. Modify the rules settings and then run a rule to ensure they're
loaded with no errors
  c. Load the maintenance window UI and edit a MW

Co-authored-by: Elastic Machine <[email protected]>
(cherry picked from commit d9cd17b)

# Conflicts:
#	src/core/server/integration_tests/ci_checks/saved_objects/check_registered_types.test.ts
ymao1 added a commit that referenced this pull request Oct 16, 2024
…versions (#195500) (#196457)

# Backport

This will backport the following commits from `main` to `8.x`:
- [Adding model versions for all remaining so types without model
versions (#195500)](#195500)

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

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

<!--BACKPORT [{"author":{"name":"Ying
Mao","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-15T22:22:46Z","message":"Adding
model versions for all remaining so types without model versions
(#195500)\n\nResolves
https://github.com/elastic/kibana/issues/184618\r\n\r\n##
Summary\r\n\r\nAdds v1 schemas for all remaining Response Ops owned
saved object types:\r\n* `connector_token`\r\n*
`api_key_pending_invalidation`\r\n* `maintenance-window`\r\n*
`rules-settings`\r\n\r\n## To Verify\r\n\r\n1. Run ES and Kibana on
`main` and create saved objects for each of the\r\nabove types:\r\na.
Create an OAuth ServiceNow ITOM connector to create
a\r\n`connector_token` saved object\r\nb. Create a rule, let it run, and
then delete the rule. This will create\r\nan
`api_key_pending_invalidation` SO and 2 `rules-settings` SOs\r\n c.
Create some maintenance windows, both with and without filters\r\n2.
Keep ES running and switch to this branch and restart Kibana.
Then\r\nverify you can read and modify the existing SOs with no
errors\r\na. Test the ServiceNow ITOM connector, which should read
the\r\n`connector_token` SO\r\nb. Modify the rules settings and then run
a rule to ensure they're\r\nloaded with no errors\r\n c. Load the
maintenance window UI and edit a MW\r\n\r\nCo-authored-by: Elastic
Machine
<[email protected]>","sha":"d9cd17bdbd47d66968bd5fda6fb32a08134fbc2d","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:Alerting","release_note:skip","Feature:Actions","Team:ResponseOps","v9.0.0","backport:prev-minor","v8.16.0"],"number":195500,"url":"https://github.com/elastic/kibana/pull/195500","mergeCommit":{"message":"Adding
model versions for all remaining so types without model versions
(#195500)\n\nResolves
https://github.com/elastic/kibana/issues/184618\r\n\r\n##
Summary\r\n\r\nAdds v1 schemas for all remaining Response Ops owned
saved object types:\r\n* `connector_token`\r\n*
`api_key_pending_invalidation`\r\n* `maintenance-window`\r\n*
`rules-settings`\r\n\r\n## To Verify\r\n\r\n1. Run ES and Kibana on
`main` and create saved objects for each of the\r\nabove types:\r\na.
Create an OAuth ServiceNow ITOM connector to create
a\r\n`connector_token` saved object\r\nb. Create a rule, let it run, and
then delete the rule. This will create\r\nan
`api_key_pending_invalidation` SO and 2 `rules-settings` SOs\r\n c.
Create some maintenance windows, both with and without filters\r\n2.
Keep ES running and switch to this branch and restart Kibana.
Then\r\nverify you can read and modify the existing SOs with no
errors\r\na. Test the ServiceNow ITOM connector, which should read
the\r\n`connector_token` SO\r\nb. Modify the rules settings and then run
a rule to ensure they're\r\nloaded with no errors\r\n c. Load the
maintenance window UI and edit a MW\r\n\r\nCo-authored-by: Elastic
Machine
<[email protected]>","sha":"d9cd17bdbd47d66968bd5fda6fb32a08134fbc2d"}},"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/195500","number":195500,"mergeCommit":{"message":"Adding
model versions for all remaining so types without model versions
(#195500)\n\nResolves
https://github.com/elastic/kibana/issues/184618\r\n\r\n##
Summary\r\n\r\nAdds v1 schemas for all remaining Response Ops owned
saved object types:\r\n* `connector_token`\r\n*
`api_key_pending_invalidation`\r\n* `maintenance-window`\r\n*
`rules-settings`\r\n\r\n## To Verify\r\n\r\n1. Run ES and Kibana on
`main` and create saved objects for each of the\r\nabove types:\r\na.
Create an OAuth ServiceNow ITOM connector to create
a\r\n`connector_token` saved object\r\nb. Create a rule, let it run, and
then delete the rule. This will create\r\nan
`api_key_pending_invalidation` SO and 2 `rules-settings` SOs\r\n c.
Create some maintenance windows, both with and without filters\r\n2.
Keep ES running and switch to this branch and restart Kibana.
Then\r\nverify you can read and modify the existing SOs with no
errors\r\na. Test the ServiceNow ITOM connector, which should read
the\r\n`connector_token` SO\r\nb. Modify the rules settings and then run
a rule to ensure they're\r\nloaded with no errors\r\n c. Load the
maintenance window UI and edit a MW\r\n\r\nCo-authored-by: Elastic
Machine
<[email protected]>","sha":"d9cd17bdbd47d66968bd5fda6fb32a08134fbc2d"}},{"branch":"8.x","label":"v8.16.0","labelRegex":"^v8.16.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) Feature:Actions Feature:Alerting 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 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Model Versions for all the saved objects in task_manager, alerting and actions plugins
6 participants