@@ -707,6 +707,9 @@ export const createInitialState = ({
707707 migrationVersionPerType : SavedObjectsMigrationVersion ;
708708 indexPrefix : string ;
709709} ) : InitState => {
710+ // Convert the kibanaVersion to lower case so that it's valid for using in an
711+ // index name. This is necessary for pre-release builds like `8.0.0-SNAPSHOT`
712+ const kibanaVersionLc = kibanaVersion . toLowerCase ( ) ;
710713 const outdatedDocumentsQuery = {
711714 bool : {
712715 should : Object . entries ( migrationVersionPerType ) . map ( ( [ type , latestVersion ] ) => ( {
@@ -736,10 +739,10 @@ export const createInitialState = ({
736739 indexPrefix,
737740 legacyIndex : indexPrefix ,
738741 currentAlias : indexPrefix ,
739- versionAlias : `${ indexPrefix } _${ kibanaVersion } ` ,
740- versionIndex : `${ indexPrefix } _${ kibanaVersion } _001` ,
741- tempIndex : `${ indexPrefix } _${ kibanaVersion } _reindex_temp` ,
742- kibanaVersion,
742+ versionAlias : `${ indexPrefix } _${ kibanaVersionLc } ` ,
743+ versionIndex : `${ indexPrefix } _${ kibanaVersionLc } _001` ,
744+ tempIndex : `${ indexPrefix } _${ kibanaVersionLc } _reindex_temp` ,
745+ kibanaVersion : kibanaVersionLc ,
743746 preMigrationScript : Option . fromNullable ( preMigrationScript ) ,
744747 targetIndexMappings : targetMappings ,
745748 tempIndexMappings : reindexTargetMappings ,
0 commit comments