Merged
Conversation
tomhjp
commented
Jan 26, 2024
| return logical.ErrorResponse("missing plugin version"), nil | ||
| } | ||
| if builtin { | ||
| return logical.ErrorResponse("cannot pin a builtin plugin: %q", pluginVersion), nil |
Contributor
Author
There was a problem hiding this comment.
I'd like to support pinning to builtin versions, but it requires a bit of extra thought and logic because of the fact we don't want to store builtin versions in storage (they disappear/change as Vault gets updated), so I've deferred this for now.
tomhjp
commented
Jan 26, 2024
| }, nil | ||
| resp := &logical.Response{} | ||
| if dbi, err := b.GetConnection(ctx, req.Storage, name); err == nil { | ||
| config.RunningPluginVersion = dbi.runningPluginVersion |
Contributor
Author
There was a problem hiding this comment.
It would be good to add running SHA256 as well like we have for secrets/auth plugins, but this requires a bit of refactoring in the sdk package, so to be pragmatic (and safe) I've left it as just the plugin version for now.
|
Build Results: |
|
CI Results: |
Contributor
Author
|
Thanks! |
Monkeychip
pushed a commit
that referenced
this pull request
Jan 30, 2024
Monkeychip
pushed a commit
that referenced
this pull request
Feb 7, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds the HTTP API for pinning plugin versions, building on #24960. This lets users in the root namespace safely upgrade plugin versions for the cluster without having to enumerate through child namespaces.
Also:
running_plugin_versionfield to the response when reading a database connection config so that users can see when their configured plugin version is being overridden by a pinvault/httpand operate on the API like a normal clientGiven the size of this already, I've deferred API docs to the next PR.