-
-
Notifications
You must be signed in to change notification settings - Fork 594
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
fixes list and workon for site names containing dashes #34
Conversation
Just reading through this, it seems "OK", but do we actually need to parse our own container to figure out what it contains? Is there any other way we could do that? It seems like we ought to have a much easier way to figure out what it is we have. |
Could possibly achieve that via container labels. |
labels could work, and seems like a reasonable effort. I'll see where it goes. |
Please update the OP with the new strategy for resolving, explaining exactly the approach you've taken with labels and any implications of that. I've just taken a scan through the code, but will finish my review when the internet works again. Thanks! |
labels: | ||
com.drud.site-name: {{ .site_name }} | ||
com.drud.site-env: {{ .site_env }} | ||
com.drud.container-type: db |
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.
So glad you added these too.
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.
These changes work for me. Tests also pass. Code looks solid.
I'm 👍
Fixes breaking readthedocs builds due to removal of Python 2 support in setuptools 58. PR: tikitu/jsmin#34
Fixes breaking readthedocs builds due to removal of Python 2 support in setuptools 58. PR: tikitu/jsmin#34
The Problem:
#30 -
ProcessContainer()
processed the container name by splitting into a slice by dashes. This approach doesn't work if the site name contains a dash.The Fix:
This implements docker labels to provide the data we're after for
dev list
in a cleaner way.This also updates the string parsing in
dev workon
to more reliably separate site name and environment.Both fixes should allow ddev to handle sitenames containing dashes successfully.
The Test:
drud-d8 production
.ddev list
and see the site listed as expectedAutomation Overview:
I updated the primary test app to be
drud-d8
, one of the sites containing a dash in the name. That's really all that's needed to validate this fix.Related Issue Link(s):
#30
Release/Deployment notes:
Does this affect anything else, or are there ramifications for other code? Does anything have to be done on deployment?
This should address the remaining test issues currently in #24