Prevent future convertToMultiNamespaceType migrations#147369
Conversation
|
Pinging @elastic/kibana-core (Team:Core) |
|
|
||
| // ensure plugins don't try to convert SO namespaceTypes after 8.0.0 | ||
| // see https://github.com/elastic/kibana/issues/147344 | ||
| const ALLOWED_CONVERT_VERSION = '8.0.0'; |
There was a problem hiding this comment.
I'll defer to @rudolf, but are we sure we don't want to allow type owners to migrate to shareable until some versions to come? This PR basically hard block any type from being converted as soon as merged. I want to make sure we're fine with the consequences.
There was a problem hiding this comment.
if I understood correctly, this is a pre-requisite to only migrate an index if necessary.
There was a problem hiding this comment.
FWIW I just saw #147198, but it is converting from "agnostic".
There was a problem hiding this comment.
My 2cents are: as claimed in #147344, if we are not reindexing when there are no mapping updates (or, at least, no breaking changes), we cannot support any further version unless we change the current logic to identify that we need reindex anyway because a conversion must happen.
WDYT?
There was a problem hiding this comment.
yeah if someone REALLY REALLY REALLY needs this we'll need to re-enable and detect this to ensure we reindex (which again will introduce downtime).
Re #147198 this is sort of a unique case because it's a new saved object type, there aren't any files saved objects in users clusters.
afharo
left a comment
There was a problem hiding this comment.
Should we update the docs accordingly?
- Deprecate the option:
- The documentation page Sharing saved objects
pgayvallet
left a comment
There was a problem hiding this comment.
I think this is what we want 😅 . LGTM
| ); | ||
| } | ||
| if (convertToMultiNamespaceTypeVersion) { | ||
| // CHECKPOINT 1 |
| `Invalid convertToMultiNamespaceTypeVersion for type ${type}. Expected value to be a semver, but got '${convertToMultiNamespaceTypeVersion}'.` | ||
| ); | ||
| } else if (Semver.lt(convertToMultiNamespaceTypeVersion, minimumConvertVersion)) { | ||
| } else if (convertVersion && Semver.neq(convertToMultiNamespaceTypeVersion, convertVersion)) { |
There was a problem hiding this comment.
My gut feeling would have been to keep 8.0.0 as the minimum version and introduces a new maximumConvertVersion that we would set either to 8.0.0 or the current version like 8.6.0. But I'm probably overthinking this.
There was a problem hiding this comment.
That could we useful if in the future we wish to unfreeze the functionality.
But at that point, we will probably have to rollback future changes in migration logic as well, otherwise we would have unexpected results.
…amespace-type-migrations
| This guide describes the "Sharing saved objects" effort, and the breaking changes that plugin developers need to be aware of for the planned | ||
| 8.0 release of {kib}. It also describes how developers can take advantage of this feature. | ||
|
|
||
| `From *8.7.0*, as a step towards Zero-Down-Time upgrades, plugins are no longer allowed to switch to shareable saved objects.` |
💚 Build Succeeded
Metrics [docs]Unknown metric groupsESLint disabled in files
ESLint disabled line counts
References to deprecated APIs
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: |
💔 All backports failed
Manual backportTo create the backport manually run: Questions ?Please refer to the Backport tool documentation |

Addresses #147344