Skip to content
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

Honor the image flag to shell #361

Merged
merged 3 commits into from Mar 17, 2021
Merged

Honor the image flag to shell #361

merged 3 commits into from Mar 17, 2021

Conversation

mdaniel
Copy link
Contributor

@mdaniel mdaniel commented Mar 17, 2021

Because the default image for postgres is 11, and my database is 12, it is a hassle that kubectl schemahero shell my-db did not respect the --image flag provided to it (because using \dt from an 11 psql connected to a 12 database yields an error)

IJ pointed out the typos in the other shell.go while I was trying to figure out what was going on, so I fixed those, and it similarly advised that the error returned from viper.BindPFlags was going to /dev/null -- but those are in separate commits if you don't want them fixed

Previously, `--image` would be overwritten in the case of a mysql or postgres database, preventing one from supplying a version-relevant image to use when debugging

Signed-off-by: Matthew L Daniel <md@stoi.cc>
Signed-off-by: Matthew L Daniel <md@stoi.cc>
Signed-off-by: Matthew L Daniel <md@stoi.cc>
@marccampbell
Copy link
Contributor

@mdaniel thanks for the fix. This lgtm, @laverya will you give it a second review?

@marccampbell marccampbell merged commit 8673af9 into schemahero:main Mar 17, 2021
@mdaniel mdaniel deleted the shell-image branch March 17, 2021 17:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants