Skip to content

Commit

Permalink
add code comment
Browse files Browse the repository at this point in the history
  • Loading branch information
alisonelizabeth committed Jan 26, 2022
1 parent 6d29e10 commit 84260c5
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ export type Credential = Record<string, any>;

// Generates a stable hash for the reindex operation's current state.
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 }))
Expand Down

0 comments on commit 84260c5

Please sign in to comment.