-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Upgrade Assistant] Minimize reindex attributes used to create credential hash #123727
[Upgrade Assistant] Minimize reindex attributes used to create credential hash #123727
Conversation
Pinging @elastic/platform-deployment-management (Team:Deployment Management) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested locally and works as expected! 👍
I did find though another issue while testing but not a blocker on this fix. I created #123816 for it.
createHash('sha256') | ||
.update(stringify({ id: reindexOp.id, ...reindexOp.attributes })) | ||
const getHash = (reindexOp: ReindexSavedObject) => { | ||
const { reindexOptions, ...attributes } = reindexOp.attributes; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add a comment to mention that we exclude the reindexOptions
for now as it creates an unstable hash. This needs to be investigated (with link to #123752)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 thanks for the reminder! Meant to do this and forgot to push it up.
@elasticmachine merge upstream |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code changes lgtm, tested locally 🚀
💚 Build Succeeded
Metrics [docs]
History
To update your PR or re-run it, just comment with: |
…tial hash (elastic#123727) (elastic#123864) (cherry picked from commit 94e64e4)
Fixes #123616
It was determined that the reindexOp SO attributes were changing from the time the credentials are initially set to when the reindex worker requests them.
The diff was caused by the addition of the
openAndClose
parameter. I believe this is related to changes made in #59890 (originally implemented via #58890).For now, I am excluding the
reindexOptions
from the credential hash. This seems like the least obtrusive change given the time constraints. I've opened #123752 as a follow-up issue to continue investigating and potentially consider updating the credential store with the updated reindexOptions as an alternative.How to test
Steps to reproduce are listed in #123616. Note that Kibana must be stopped/restarted on the third step of the reindexing process - "Reindex documents" - in order to reproduce.
With this change, you should be able to click "Resume reindexing" and the reindexing process will finish successfully.
There are some existing functional tests that run through the reindexing flow, as well as jest tests for the credential store. I'm not sure if there's a good way to test this specific scenario by restarting Kibana.