DBPW - Rename newdbplugin package to dbplugin/v5#10151
Merged
Merged
Conversation
tvoran
approved these changes
Oct 14, 2020
Member
tvoran
left a comment
There was a problem hiding this comment.
Looks good, except for one extraneous file?
calvn
reviewed
Oct 14, 2020
| MaxTTL time.Duration `json:"max_ttl"` | ||
| StaticAccount *staticAccount `json:"static_account" mapstructure:"static_account"` | ||
| DBName string `json:"db_name"` | ||
| Statements v4.Statements `json:"statements"` |
Contributor
There was a problem hiding this comment.
Not specific to this PR, but noticed that we're still using a v4 struct for storing the statements even though there are v5 equivalents of these. We'll probably have to handle upgrades if we wanted to fully migrate out of v4.
Contributor
Author
There was a problem hiding this comment.
We can certainly look into it, though I suspect we'll end up keeping the same or very similar struct definition for these since the list of statements hasn't changed and still needs to be stored.
calvn
approved these changes
Oct 15, 2020
tvoran
approved these changes
Oct 15, 2020
This was referenced Oct 15, 2020
pcman312
added a commit
that referenced
this pull request
Oct 20, 2020
This is part 1 of 4 for renaming the `newdbplugin` package. This copies the existing package to the new location but keeps the current one in place so we can migrate the existing references over more easily.
pcman312
added a commit
that referenced
this pull request
Oct 20, 2020
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.
Package renaming - Part 1/4
This is the first in a 4 part series of changes to rename the
sdk/database/newdbpluginpackage tosdk/database/dbplugin/v5.newdbpluginpackage todbplugin/v5so external/vendored DB plugins can reference it (and not break the current build)newdbpluginpackageOverview
newdbpluginpackage underdbpluginassdk/database/dbplugin/v5.sdk/database/dbplugin/v5/protoso it doesn't keep multiple copies of the same proto (which causes registry collisions)dbplugin/v5package.Description
The
sdk/database/newdbpluginpackage name was always intended to be a temporary name during development with the thought that it would replace the existingsdk/database/dbpluginpackage (with that package being renamed out of the way). That plan changed to movingnewdbpluginunder thesdk/database/dbpluginfolder.This keeps a copy of the original
newdbpluginpackage (with one exception) in place because the package is being referenced in at least one vendored DB plugin (couchbase) causing build errors. Keeping it in place allows us to migrate the external/vendored DB plugins over to the new package seamlessly. The one exception is theprotossub-package. This was moved fromnewdbplugintodbplugin/v5and a copy was not kept in the originalnewdbpluginpackage. This was done so the protobuf registry didn't see two copies of the same protos. All references to the proto have been updated to the new location.Testing
I tested this also against a set of bats scripts I have that are doing black box tests against Vault for: Cassandra, InfluxDB, MongoDB, MSSQL, PostgreSQL, and an external mock v4 database plugin.
PRs
Part 2:
hashicorp/vault-plugin-database-couchbase#12
hashicorp/vault-plugin-database-elasticsearch#21
hashicorp/vault-plugin-database-mongodbatlas#16
Part 3:
#10188
Part 4:
#10216