You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Track ddev sites without just using docker labels, to track all sites created #524
Currently, we are completely dependent on docker labels for site metadata. So when we need to know what sites exist, we ask Docker. That's a pretty big problem, because in a normal workflow devs may create sites, then rm them (no container any more), and have lots of sites out there, but ddev (and ddev-ui) have no way to know about them. But we'd like for the user to know about all the sites they're working with. In a best-case scenario, ddev list would show all valid sites (configured with a .ddev), not just the ones that have containers.
This is super-important if ddev-ui is to show all sites a user might be working with.
What you expected to happen:
How to reproduce this:
Version: Please include the output of ddev version, docker version and the project's .ddev/config.yaml.
I've tagged this with milestone v1.3 because this will definitely start impacting people that toggle between the UI and the CLI as it pertains to if users prefer stop versus remove. The remove flag is more appropriate when workign with a large number of sites because there are memory considerations. Also, ddev list relying on containers being available may require UI users to constantly re-add manually. There is more to discuss here, but this is simply to bump this up the priority list.
This is being discussed more explicitly in #642, which has an explicit proposal (inventory ddev projects with a sqlite or yaml db). It seems to have been lost in this issue, which didn't have an explicit proposal, but #642 has the explicit proposal. Many of the issues were discussed in google doc but no final proposal. I'd say we should close this one and move forward with #642.
Hi @rfay. Thanks for uncovering this issue in the queue! I need to do a better job of pruning. That said I fully agree that the new issue #642 has a more robust, explicit proposal that can supersede this issue, which I'll close as per your suggestion. And the google doc linked here did capture the very conversation that I was referring to. I want to pull the pros/cons lists into this thread (posted below) just so it's more easily detectable when searching GitHub itself.
And based on discussions, it looks like we're ready to evolve from the docker labels approach into the metadata approach because the filesystem strategy simply has too many assumptions and issues to consider it a viable path forward IMHO.
1. Listing Apps/Sites
There are at least 3 different places we can key off of to determine ddev capable repos.
A. Docker labels (current method)
B. Metadata
C. Filesystem scanning
Reviewing each to surface pros/cons.
A. Docker Labels
Pros
It already exists and works in our codebase.
It prevents having to create, track, and maintain a separate system.
It only shows projects that are active (running or paused state).
Cons
If someone modifies that docker-compose file, we could be assuming something that is not true.
The GUI will be unaware of other code repos with an existing ddev config. Users will have to “add” and then locate it within the file system.
If GUI users use “stop” to avoid having to re-add, then docker images will likely go stale versus encouraging users to delete/replace.
B. Metadata
Pros
This would allow ddev CLI/GUI to be aware of configured repos that already exists and yet don’t have active/paused containers around.
This would allow for global targeting of apps/sites anywhere on the command line.
This would allow for a single source of truth for the GUI to read from regardless of states of containers or file systems.
Cons
This is yet another data storage to create, track, and maintain.
This can be fragile. A user may delete the repo and we need the metadata to detect and adjust as a result of that change.
C. Filesystem scanning
Pros
This doesn’t rely on docker container states or another storage system.
Users can specify the folder by a preference setting.
GUI could easily detect and be aware of projects configured, to be configured for ddev.
Cons
It’s not safe to assume users will want to use a single folder location.
It’s not safe to assume users will not store non-repo folders in this main folder.
The GUI would have to note non-configured sites.
Moving the folder via preferences would immediately cause the GUI to lose track of them all.
Activity
rickmanelius commentedon Nov 2, 2017
Capturing a discussion today https://docs.google.com/document/d/1Xy0ag25AA9NqmH6MhLIph5abcp9i_YD5mG7F5RS14jQ/edit
rickmanelius commentedon Nov 2, 2017
Related #484
rickmanelius commentedon Dec 26, 2017
@andrew-c-tran
rickmanelius commentedon Dec 26, 2017
I've tagged this with milestone v1.3 because this will definitely start impacting people that toggle between the UI and the CLI as it pertains to if users prefer stop versus remove. The remove flag is more appropriate when workign with a large number of sites because there are memory considerations. Also,
ddev listrelying on containers being available may require UI users to constantly re-add manually. There is more to discuss here, but this is simply to bump this up the priority list.rfay commentedon Feb 7, 2018
This is being discussed more explicitly in #642, which has an explicit proposal (inventory ddev projects with a sqlite or yaml db). It seems to have been lost in this issue, which didn't have an explicit proposal, but #642 has the explicit proposal. Many of the issues were discussed in google doc but no final proposal. I'd say we should close this one and move forward with #642.
rickmanelius commentedon Feb 7, 2018
Hi @rfay. Thanks for uncovering this issue in the queue! I need to do a better job of pruning. That said I fully agree that the new issue #642 has a more robust, explicit proposal that can supersede this issue, which I'll close as per your suggestion. And the google doc linked here did capture the very conversation that I was referring to. I want to pull the pros/cons lists into this thread (posted below) just so it's more easily detectable when searching GitHub itself.
And based on discussions, it looks like we're ready to evolve from the docker labels approach into the metadata approach because the filesystem strategy simply has too many assumptions and issues to consider it a viable path forward IMHO.
1. Listing Apps/Sites
There are at least 3 different places we can key off of to determine ddev capable repos.
A. Docker labels (current method)
B. Metadata
C. Filesystem scanning
Reviewing each to surface pros/cons.
A. Docker Labels
Pros
Cons
B. Metadata
Pros
Cons
C. Filesystem scanning
Pros
Cons