Skip to content

[Fleet] Do not ignore coreMigrationVersion and typeMigrationVersion when importing saved object#161969

Merged
nchaulet merged 2 commits intoelastic:mainfrom
nchaulet:fix-fleet-kibana-migration-version
Jul 14, 2023
Merged

[Fleet] Do not ignore coreMigrationVersion and typeMigrationVersion when importing saved object#161969
nchaulet merged 2 commits intoelastic:mainfrom
nchaulet:fix-fleet-kibana-migration-version

Conversation

@nchaulet
Copy link
Copy Markdown
Member

@nchaulet nchaulet commented Jul 14, 2023

Description

To avoid running all migrations again we should import coreMigrationVersion and typeMigrationVersion

Tests

I tested this by installing the system integration from that PR that was failing elastic/integrations#6743

And I also run locally the node scripts/install_all_packages to install all package.

@nchaulet nchaulet added release_note:skip Skip the PR/issue when compiling release notes Team:Fleet Team label for Observability Data Collection Fleet team v8.10.0 labels Jul 14, 2023
@nchaulet nchaulet requested a review from a team as a code owner July 14, 2023 13:39
@nchaulet nchaulet self-assigned this Jul 14, 2023
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/fleet (Team:Fleet)

@ghost
Copy link
Copy Markdown

ghost commented Jul 14, 2023

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

  • /oblt-deploy : Deploy a Kibana instance using the Observability test environments.
  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

Copy link
Copy Markdown
Contributor

@juliaElastic juliaElastic left a comment

Choose a reason for hiding this comment

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

LGTM
Is there any automated test that could cover this fix?

@nchaulet
Copy link
Copy Markdown
Member Author

Is there any automated test that could cover this fix?

I think adding an automated test for that is probably too complex for the value it will provide, but if you have one in mind that make sense, I can try to add it.

@kibana-ci
Copy link
Copy Markdown

💚 Build Succeeded

Metrics [docs]

Unknown metric groups

ESLint disabled line counts

id before after diff
enterpriseSearch 14 16 +2
securitySolution 411 415 +4
total +6

References to deprecated APIs

id before after diff
fleet 58 63 +5

Total ESLint disabled count

id before after diff
enterpriseSearch 15 17 +2
securitySolution 490 494 +4
total +6

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

cc @nchaulet

@nchaulet nchaulet merged commit 2d7311a into elastic:main Jul 14, 2023
@kibanamachine kibanamachine added the backport:skip This PR does not require backporting label Jul 14, 2023
@nchaulet nchaulet deleted the fix-fleet-kibana-migration-version branch July 14, 2023 15:17
juliaElastic added a commit that referenced this pull request Aug 22, 2023
…ation version setting (#164456)

## Summary

Closes #164243
Added a `typeMigrationVersion: '8.0.0'` to index patterns until
#164454 is fixed.

Related to #161969
Feedback from kibana core team, we should always set the migration
version fields, even if `migrationVersion` is not set.

It would be good to backport this to 8.9 too.

How to test locally:

- create a test space
- install system integration in test space
- restart kibana
- verify that the index patterns `logs-*`, `metrics-*` are still in test
space in Data Views UI

### Checklist

- [ ] [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
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Aug 22, 2023
…ation version setting (elastic#164456)

## Summary

Closes elastic#164243
Added a `typeMigrationVersion: '8.0.0'` to index patterns until
elastic#164454 is fixed.

Related to elastic#161969
Feedback from kibana core team, we should always set the migration
version fields, even if `migrationVersion` is not set.

It would be good to backport this to 8.9 too.

How to test locally:

- create a test space
- install system integration in test space
- restart kibana
- verify that the index patterns `logs-*`, `metrics-*` are still in test
space in Data Views UI

### Checklist

- [ ] [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

(cherry picked from commit 433d4f2)
kibanamachine referenced this pull request Aug 22, 2023
…ix migration version setting (#164456) (#164484)

# Backport

This will backport the following commits from `main` to `8.10`:
- [[Fleet] Fix index patterns being recreated in default space, fix
migration version setting
(#164456)](#164456)

<!--- Backport version: 8.9.7 -->

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

<!--BACKPORT [{"author":{"name":"Julia
Bardi","email":"90178898+juliaElastic@users.noreply.github.com"},"sourceCommit":{"committedDate":"2023-08-22T16:55:17Z","message":"[Fleet]
Fix index patterns being recreated in default space, fix migration
version setting (#164456)\n\n## Summary\r\n\r\nCloses
https://github.com/elastic/kibana/issues/164243\r\nAdded a
`typeMigrationVersion: '8.0.0'` to index patterns
until\r\nhttps://github.com//issues/164454 is
fixed.\r\n\r\nRelated to
https://github.com/elastic/kibana/pull/161969\r\nFeedback from kibana
core team, we should always set the migration\r\nversion fields, even if
`migrationVersion` is not set.\r\n\r\nIt would be good to backport this
to 8.9 too.\r\n\r\nHow to test locally:\r\n\r\n- create a test
space\r\n- install system integration in test space\r\n- restart
kibana\r\n- verify that the index patterns `logs-*`, `metrics-*` are
still in test\r\nspace in Data Views UI\r\n\r\n### Checklist\r\n\r\n- [
] [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","sha":"433d4f21c39fa7c364e3275443f673360dda5d18","branchLabelMapping":{"^v8.11.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Fleet","v8.10.0","v8.11.0","v8.9.2"],"number":164456,"url":"https://github.com/elastic/kibana/pull/164456","mergeCommit":{"message":"[Fleet]
Fix index patterns being recreated in default space, fix migration
version setting (#164456)\n\n## Summary\r\n\r\nCloses
https://github.com/elastic/kibana/issues/164243\r\nAdded a
`typeMigrationVersion: '8.0.0'` to index patterns
until\r\nhttps://github.com//issues/164454 is
fixed.\r\n\r\nRelated to
https://github.com/elastic/kibana/pull/161969\r\nFeedback from kibana
core team, we should always set the migration\r\nversion fields, even if
`migrationVersion` is not set.\r\n\r\nIt would be good to backport this
to 8.9 too.\r\n\r\nHow to test locally:\r\n\r\n- create a test
space\r\n- install system integration in test space\r\n- restart
kibana\r\n- verify that the index patterns `logs-*`, `metrics-*` are
still in test\r\nspace in Data Views UI\r\n\r\n### Checklist\r\n\r\n- [
] [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","sha":"433d4f21c39fa7c364e3275443f673360dda5d18"}},"sourceBranch":"main","suggestedTargetBranches":["8.10","8.9"],"targetPullRequestStates":[{"branch":"8.10","label":"v8.10.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.11.0","labelRegex":"^v8.11.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/164456","number":164456,"mergeCommit":{"message":"[Fleet]
Fix index patterns being recreated in default space, fix migration
version setting (#164456)\n\n## Summary\r\n\r\nCloses
https://github.com/elastic/kibana/issues/164243\r\nAdded a
`typeMigrationVersion: '8.0.0'` to index patterns
until\r\nhttps://github.com//issues/164454 is
fixed.\r\n\r\nRelated to
https://github.com/elastic/kibana/pull/161969\r\nFeedback from kibana
core team, we should always set the migration\r\nversion fields, even if
`migrationVersion` is not set.\r\n\r\nIt would be good to backport this
to 8.9 too.\r\n\r\nHow to test locally:\r\n\r\n- create a test
space\r\n- install system integration in test space\r\n- restart
kibana\r\n- verify that the index patterns `logs-*`, `metrics-*` are
still in test\r\nspace in Data Views UI\r\n\r\n### Checklist\r\n\r\n- [
] [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","sha":"433d4f21c39fa7c364e3275443f673360dda5d18"}},{"branch":"8.9","label":"v8.9.2","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Julia Bardi <90178898+juliaElastic@users.noreply.github.com>
juliaElastic added a commit to juliaElastic/kibana that referenced this pull request Aug 23, 2023
…ation version setting (elastic#164456)

Closes elastic#164243
Added a `typeMigrationVersion: '8.0.0'` to index patterns until
elastic#164454 is fixed.

Related to elastic#161969
Feedback from kibana core team, we should always set the migration
version fields, even if `migrationVersion` is not set.

It would be good to backport this to 8.9 too.

How to test locally:

- create a test space
- install system integration in test space
- restart kibana
- verify that the index patterns `logs-*`, `metrics-*` are still in test
space in Data Views UI

- [ ] [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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting release_note:skip Skip the PR/issue when compiling release notes Team:Fleet Team label for Observability Data Collection Fleet team v8.10.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants