-
-
Notifications
You must be signed in to change notification settings - Fork 585
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
add DDEV_DATABASE_FAMILY
variable, fixes #4954
#4991
add DDEV_DATABASE_FAMILY
variable, fixes #4954
#4991
Conversation
Look at you go! |
Sorry for the noise. Finally added a "GO" addon to VScode for proper syntax highlighting etc. |
Download the artifacts for this pull request:
See Testing a PR |
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!
- Still needs to be added to docs (custom_commands.md) If you find other things missing there, OK to add.
- Still needs to be added to test, TestEnvironmentVariables (you may find that some other things like DDEV_DATABASE are missing from test, OK to add.
ba40e3c
to
1d0378c
Compare
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! Mainly only a minor naming issue.
And you have to add the new variable to the docker-composer template pkg/ddevapp/app_compose_template.yaml
.
OK. That was the piece I was missing. |
Not sure why the golint test is failing. |
You just miss two spaces at the mentioned line. |
DDEV_DATABASE_PROTOCOL
variableDDEV_DATABASE_FAMILY
variable
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.
Looks good. Restarted the failing test which should become green too...
DDEV_DATABASE_FAMILY
variableDDEV_DATABASE_FAMILY
variable for #4954
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.
Looks great to me, thanks! Manually tested fine.
Resolve "Error: File is not gofmt-ed with -s (gofmt)" Co-authored-by: Gilbertsoft <25326036+gilbertsoft@users.noreply.github.com>
0203dcc
to
cdc58ff
Compare
Rebase |
DDEV_DATABASE_FAMILY
variable for #4954DDEV_DATABASE_FAMILY
variable, fixes #4954
Congratulations and thanks! |
The Issue
I want to generate database resource URLs for use in code and DDEV addons.
Currently, DDEV exposes
DDEV_DATABASE
which isapp.Database.Type + ":" + app.Database.Version,
.This is difficult to use because it must be parsed, and converted (MariaDB uses
mysql
protocol).How This PR Solves The Issue
This PR adds a new environmental variable:
DDEV_DATABASE_FAMILY
mysql
postgres
if database ispostgres
Manual Testing Instructions
ddev exec set | grep DDEV_DATABASE
to check currently set database variablesAutomated Testing Overview
Related Issue Link(s)
Fixes #4954
Release/Deployment Notes