fixes list and workon for site names containing dashes#34
fixes list and workon for site names containing dashes#34tannerjfco merged 3 commits intoddev:masterfrom
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.
So glad you added these too.
beeradb
left a comment
There was a problem hiding this comment.
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
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 listin a cleaner way.This also updates the string parsing in
dev workonto more reliably separate site name and environment.Both fixes should allow ddev to handle sitenames containing dashes successfully.
The Test:
drud-d8 production.ddev listand 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