diff --git a/x-pack/plugins/upgrade_assistant/server/lib/reindexing/credential_store.ts b/x-pack/plugins/upgrade_assistant/server/lib/reindexing/credential_store.ts index 66885a23cf96b6..b3d4d5e165a138 100644 --- a/x-pack/plugins/upgrade_assistant/server/lib/reindexing/credential_store.ts +++ b/x-pack/plugins/upgrade_assistant/server/lib/reindexing/credential_store.ts @@ -16,10 +16,14 @@ import { ReindexSavedObject, ReindexStatus } from '../../../common/types'; export type Credential = Record; // Generates a stable hash for the reindex operation's current state. -const getHash = (reindexOp: ReindexSavedObject) => - createHash('sha256') - .update(stringify({ id: reindexOp.id, ...reindexOp.attributes })) +const getHash = (reindexOp: ReindexSavedObject) => { + // Remove reindexOptions from the SO attributes as it creates an unstable hash + // This needs further investigation, see: https://github.com/elastic/kibana/issues/123752 + const { reindexOptions, ...attributes } = reindexOp.attributes; + return createHash('sha256') + .update(stringify({ id: reindexOp.id, ...attributes })) .digest('base64'); +}; // Returns a base64-encoded API key string or undefined const getApiKey = async ({