Repository navigation
Conversation
|
Download the artifacts for this pull request:
See Testing a PR. |
01efd41 to
6936196
Compare
6936196 to
e3e9ebf
Compare
rfay
left a comment
There was a problem hiding this comment.
I know you're not done with this yet, but I think it should be using ComposeCmd() to do its work.
|
I saw #7085 after this, so I'll likely rework this to cover that as well. |
|
I'm not entirely sure this idea doesn't already solve #7085 since you're using |
|
This draft doesn't yet, it's currently still the same image list as before. But yeah, using the docker compose file instead would be the goal. |
|
Thank you, I didn't know you could use a buffer for this. This is cool, but it's a little confusing to see errors (or warnings, as they don't stop the |
|
Hmmm... alright, I had not considered the behaviour when offline. Testing this, the current version handles this better, although the debug log claim isn't quite right either, claiming that the images got pulled. Properly handling this, we'd either need to detect what images are already present and not pull them at all (what about updates for moving targets like busybox:stable then?), or maybe detect if the user is currently offline, and provide a separate error message for that case. Or suppress all direct output and instead parse the results? That would look like it's hanging though, without some alternate output, like during the image build process. There is a |
We don't have this behavior right now, because we check for the existing image, and pull nothing if it exists (but I would like it to do an actual pull, so this is good.)
Good idea, and we have a |
|
I'm not sure how often busybox changes, but there's any reason to actually use |
… pull all base images
|
Changed the logic to pull in all project images if there's a valid project context, and otherwise falls back to the base list (minus MariaDB). |
rfay
left a comment
There was a problem hiding this comment.
I don't understand why this doesn't just use existing ComposeCmd (with pull instead of exec, just like here:
Line 1088 in 9bb78d5
That should be super trivial, with the code already written. That would pull all images in the "full" yaml
|
Try to run a pull on the full yaml in the shell. Example: |
|
Additionally, even if we would take the full YAML and manipulate it the same way that FindAllImages does, we'd only be pulling 2 images by default, the one for web, and the one for the db, missing all the images that are required outside the project's full YAML:
Which is why I'm building a YAML based on FindAllImages, to get all of them together. |
|
IMO it would be better to do the one-off images separately, super easy, already done that way. There's also the issue of things like codespaces/gitpod, where the router and probably ddev-ssh-agent don't need to be pulled. IMO ddev-utilities doesn't actually ever need to be pulled until needed. (Now that I think about it, we could use ddev-utilities everywhere we use busybox and drop busybox) |
|
The one-off images are pulled in a separate function in the current release version, true, but that's also happening at every
|
rfay
left a comment
There was a problem hiding this comment.
Please use the .ddev/.ddev-docker-compose-full.yaml using ComposeCmd, and then an extra pull for the one-off's.
Thanks! Sorry I didn't give more guidance on this to start with.
| func PullBaseContainerImages() error { | ||
| images := []string{ddevImages.GetWebImage(), versionconstants.BusyboxImage, versionconstants.UtilitiesImage} | ||
| images = append(images, FindNotOmittedImages(nil)...) | ||
| // Create docker-compose.yaml file |
There was a problem hiding this comment.
Sorry, I object to this, don't want another random file being created, and certainly not one with a generic name like this.
There was a problem hiding this comment.
A pull on docker-compose-full doesn't work, as demonstrated further up. There is a --ignore-buildable flag for compose, but that would not leave much to be pulled, as that just skips right over the web and db services.
There was a problem hiding this comment.
The temporary YAML gets put into a temp directory: tmpDir, err := os.MkdirTemp("", "ddev-pull-images-"). I'd prefer to work completely in-memory, like an in earlier version of this PR, but dockerutil.ComposeCmd, which contains logic we do want to use here, requires a file.
|
Just a note here on why we use
|
The Issue
DDEV currently preloads all required images via individual docker pull commands.
How This PR Solves The Issue
This PR replaces this with a docker compose call, enabling parallel download of multiple images.
Manual Testing Instructions
Remove DDEV images from local Docker
Run ddev debug download-images
Automated Testing Overview
Release/Deployment Notes