Skip to content

Commit a2102cd

Browse files
Merge branch '7.x' into backport/7.x/pr-96087
2 parents 7daaa34 + 671f91f commit a2102cd

151 files changed

Lines changed: 6103 additions & 6225 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/setup/settings.asciidoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ To reload the logging settings, send a SIGHUP signal to {kib}.
281281
|===
282282

283283
|[[logging-root]] `logging.root:`
284-
| The `root` logger has a dedicated configuration node since this context name is special and is pre-configured for logging by default.
284+
| The {kibana-ref}/logging-service.html#logging-service[`root` logger] has a dedicated configuration node since this context name is special and is pre-configured for logging by default.
285285
// TODO: add link to the advanced logging documentation.
286286

287287
|[[logging-root-appenders]] `logging.root.appenders:`
@@ -303,7 +303,7 @@ To reload the logging settings, send a SIGHUP signal to {kib}.
303303
| Specific appender format to apply for a particular logger context.
304304

305305
| `logging.appenders:`
306-
| Define how and where log messages are displayed (eg. *stdout* or console) and stored (eg. file on the disk).
306+
| {kibana-ref}/logging-service.html#logging-appenders[Appenders] define how and where log messages are displayed (eg. *stdout* or console) and stored (eg. file on the disk).
307307
// TODO: add link to the advanced logging documentation.
308308

309309
| `logging.appenders.console:`

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@
441441
"@bazel/ibazel": "^0.14.0",
442442
"@bazel/typescript": "^3.2.3",
443443
"@cypress/snapshot": "^2.1.7",
444-
"@cypress/webpack-preprocessor": "^5.5.0",
444+
"@cypress/webpack-preprocessor": "^5.6.0",
445445
"@elastic/apm-rum": "^5.6.1",
446446
"@elastic/apm-rum-react": "^1.2.5",
447447
"@elastic/eslint-config-kibana": "link:packages/elastic-eslint-config-kibana",
@@ -679,7 +679,7 @@
679679
"copy-webpack-plugin": "^6.0.2",
680680
"cpy": "^8.1.1",
681681
"css-loader": "^3.4.2",
682-
"cypress": "^6.2.1",
682+
"cypress": "^6.8.0",
683683
"cypress-cucumber-preprocessor": "^2.5.2",
684684
"cypress-multi-reporters": "^1.4.0",
685685
"cypress-pipe": "^2.0.0",

src/core/server/bootstrap.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,11 @@ export async function bootstrap({ configs, cliArgs, applyConfigOverrides }: Boot
8383
try {
8484
await root.setup();
8585
await root.start();
86+
87+
// notify parent process know when we are ready for dev mode.
88+
if (process.send) {
89+
process.send(['SERVER_LISTENING']);
90+
}
8691
} catch (err) {
8792
await shutdown(err);
8893
}

src/core/server/saved_objects/migrations/kibana/kibana_migrator.mock.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,14 @@ const createMigrator = (
3535
) => {
3636
const mockMigrator: jest.Mocked<IKibanaMigrator> = {
3737
kibanaVersion: '8.0.0-testing',
38-
savedObjectsConfig: {
38+
soMigrationsConfig: {
3939
batchSize: 100,
4040
scrollDuration: '15m',
4141
pollInterval: 1500,
4242
skip: false,
43-
// TODO migrationsV2: remove/deprecate once we release migrations v2
43+
// TODO migrationsV2: remove/deprecate once we remove migrations v1
4444
enableV2: false,
45+
retryAttempts: 10,
4546
},
4647
runMigrations: jest.fn(),
4748
getActiveMappings: jest.fn(),

src/core/server/saved_objects/migrations/kibana/kibana_migrator.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -414,12 +414,13 @@ const mockOptions = ({ enableV2 }: { enableV2: boolean } = { enableV2: false })
414414
enabled: true,
415415
index: '.my-index',
416416
} as KibanaMigratorOptions['kibanaConfig'],
417-
savedObjectsConfig: {
417+
soMigrationsConfig: {
418418
batchSize: 20,
419419
pollInterval: 20000,
420420
scrollDuration: '10m',
421421
skip: false,
422422
enableV2,
423+
retryAttempts: 20,
423424
},
424425
client: elasticsearchClientMock.createElasticsearchClient(),
425426
};

src/core/server/saved_objects/migrations/kibana/kibana_migrator.ts

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ import { MigrationLogger } from '../core/migration_logger';
4141
export interface KibanaMigratorOptions {
4242
client: ElasticsearchClient;
4343
typeRegistry: ISavedObjectTypeRegistry;
44-
savedObjectsConfig: SavedObjectsMigrationConfigType;
44+
soMigrationsConfig: SavedObjectsMigrationConfigType;
4545
kibanaConfig: KibanaConfigType;
4646
kibanaVersion: string;
4747
logger: Logger;
@@ -72,10 +72,10 @@ export class KibanaMigrator {
7272
});
7373
private readonly activeMappings: IndexMapping;
7474
private migrationsRetryDelay?: number;
75-
// TODO migrationsV2: make private once we release migrations v2
76-
public kibanaVersion: string;
77-
// TODO migrationsV2: make private once we release migrations v2
78-
public readonly savedObjectsConfig: SavedObjectsMigrationConfigType;
75+
// TODO migrationsV2: make private once we remove migrations v1
76+
public readonly kibanaVersion: string;
77+
// TODO migrationsV2: make private once we remove migrations v1
78+
public readonly soMigrationsConfig: SavedObjectsMigrationConfigType;
7979

8080
/**
8181
* Creates an instance of KibanaMigrator.
@@ -84,14 +84,14 @@ export class KibanaMigrator {
8484
client,
8585
typeRegistry,
8686
kibanaConfig,
87-
savedObjectsConfig,
87+
soMigrationsConfig,
8888
kibanaVersion,
8989
logger,
9090
migrationsRetryDelay,
9191
}: KibanaMigratorOptions) {
9292
this.client = client;
9393
this.kibanaConfig = kibanaConfig;
94-
this.savedObjectsConfig = savedObjectsConfig;
94+
this.soMigrationsConfig = soMigrationsConfig;
9595
this.typeRegistry = typeRegistry;
9696
this.serializer = new SavedObjectsSerializer(this.typeRegistry);
9797
this.mappingProperties = mergeTypes(this.typeRegistry.getAllTypes());
@@ -175,7 +175,7 @@ export class KibanaMigrator {
175175

176176
const migrators = Object.keys(indexMap).map((index) => {
177177
// TODO migrationsV2: remove old migrations algorithm
178-
if (this.savedObjectsConfig.enableV2) {
178+
if (this.soMigrationsConfig.enableV2) {
179179
return {
180180
migrate: (): Promise<MigrationResult> => {
181181
return runResilientMigrator({
@@ -193,20 +193,21 @@ export class KibanaMigrator {
193193
),
194194
migrationVersionPerType: this.documentMigrator.migrationVersion,
195195
indexPrefix: index,
196+
migrationsConfig: this.soMigrationsConfig,
196197
});
197198
},
198199
};
199200
} else {
200201
return new IndexMigrator({
201-
batchSize: this.savedObjectsConfig.batchSize,
202+
batchSize: this.soMigrationsConfig.batchSize,
202203
client: createMigrationEsClient(this.client, this.log, this.migrationsRetryDelay),
203204
documentMigrator: this.documentMigrator,
204205
index,
205206
kibanaVersion: this.kibanaVersion,
206207
log: this.log,
207208
mappingProperties: indexMap[index].typeMappings,
208-
pollInterval: this.savedObjectsConfig.pollInterval,
209-
scrollDuration: this.savedObjectsConfig.scrollDuration,
209+
pollInterval: this.soMigrationsConfig.pollInterval,
210+
scrollDuration: this.soMigrationsConfig.scrollDuration,
210211
serializer: this.serializer,
211212
// Only necessary for the migrator of the kibana index.
212213
obsoleteIndexTemplatePattern:

0 commit comments

Comments
 (0)