-
Notifications
You must be signed in to change notification settings - Fork 552
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
rpk profile double pointer fixes #17170
Conversation
When we made an auth current, we reordered the underlying auth slice which is _not_ pointer based. Any changes to the pointer fields _after_ reodering were changes to an old slice that would no longer be saved. Now, we MakeAuthCurrent with two pointer indirects -- The underlying pointer to the slice element is used for the invariant check, did we find this auth. We now update the pointer-to-the-pointer so that if we update any fields _after_ MakeAuthCurrent, they're mirrored into the new slice.
For the same reasons as the prior commit. Only `rpk profile create` actually modify the profile fields after the move, and only in `rpk profile create --from-cloud`.
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.
This is technically correct stuff, but double pointers? Not a fan.
We were updating the virtual yaml, but not the actual yaml. We want to update the actual so that when a save happens, the version is bumped.
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:
- with old profile vrsion
- with new profile, outdated token
- new profile, no token
- new profile, unexpored token
- expired token, when ^Cing out rather than picking a cluster
Bypassing test suite due to extensive local testing, and existing tests don't cover changes here (which is definitely something to work on as a follow up) |
/backport v23.3.x |
ducktape was retried in https://buildkite.com/redpanda/redpanda/builds/46381#018e52f7-1322-4fad-a851-6ecda6e0b30b ducktape was retried in https://buildkite.com/redpanda/redpanda/builds/46381#018e52f7-131f-48a8-8170-b4ec06bc945b |
Backports Required
Release Notes