Skip to content
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

Bump docker-compose to v2.18.1 #4917

Merged
merged 4 commits into from
May 20, 2023
Merged

Conversation

rfay
Copy link
Member

@rfay rfay commented May 16, 2023

The Issue

Time to catch up to current docker-compose version

How This PR Solves The Issue

Bump to composer 2.18.1

See also

Manual Testing Instructions

Use it.

@github-actions
Copy link

github-actions bot commented May 16, 2023

Copy link
Member

@gilbertsoft gilbertsoft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounded promising but makes it even worse here. Also with a small project.

@rfay
Copy link
Member Author

rfay commented May 17, 2023

@gilbertsoft what does it make worse, and in what way?

@gilbertsoft
Copy link
Member

@gilbertsoft what does it make worse, and in what way?

docker-compose build takes much longer now. It was already bad before since some versions, not sure when it changed to bad but some time ago ddev start was much faster than it is at the moment.

@rfay
Copy link
Member Author

rfay commented May 17, 2023

So you're saying that you tested this PR and were able to detect the difference in timing on build? Did you use ddev debug refresh to test it? Can you give an example of what your experience was?

There haven't been reports of build being the problem here; dockerr-compose was frozen at 2.15.1 because of #4727

I was wondering if perhaps there was a change about using buildx or something in recent docker-compose versions but I don't see anything there.

@gilbertsoft
Copy link
Member

So you're saying that you tested this PR and were able to detect the difference in timing on build? Did you use ddev debug refresh to test it? Can you give an example of what your experience was?

There haven't been reports of build being the problem here; dockerr-compose was frozen at 2.15.1 because of #4727

For the test I did:

ddev start
ddev stop
ddev start

The first start asked for a poweroff which I did and that's why I did a stop and start again afterwards to have clean results only for the start with router and ssh agent already started and the docker-compose binary already downloaded and preset in the desired version.

To compare the time I've taken the last time track start before build and the next perf output after build:

v1.21.6 (16:30:54.899870360 -> 16:31:13.136306597 ~ 8.3 seconds)
v1.22.0-alpha2-60-gfa7a95f0 (16:23:16.347786863 -> 16:23:35.050146960 ~ 18,7 seconds)

I didn't do a debug refresh for the moment.

@rfay
Copy link
Member Author

rfay commented May 17, 2023

BTW, this can actually be tested easily without actually building; you can use ddev config global --required-docker-compose-version=v1.18.0 and that should be adequate to switch back and forth.

I do see in https://docs.docker.com/compose/environment-variables/envvars/ that we're using some unsupported environment variables still in

ddev/pkg/ddevapp/ddevapp.go

Lines 1903 to 1910 in c6518c3

// Without COMPOSE_DOCKER_CLI_BUILD=0, docker-compose makes all kinds of mess
// of output. BUILDKIT_PROGRESS doesn't help either.
"COMPOSE_DOCKER_CLI_BUILD": "0",
"COMPOSER_EXIT_ON_PATCH_FAILURE": "1",
// The compose project name can no longer contain dots
// https://github.com/compose-spec/compose-go/pull/197
"COMPOSE_PROJECT_NAME": "ddev-" + strings.Replace(app.Name, `.`, "", -1),
"COMPOSE_CONVERT_WINDOWS_PATHS": "true",
- but it doesn't seem like it would affect this.

@rfay
Copy link
Member Author

rfay commented May 17, 2023

On the Linux tests, there's no discernable difference in timing. For example, here's your Amplitude test:

image

And here's the 2.18.0 test:

image

@rfay
Copy link
Member Author

rfay commented May 17, 2023

I'm not seeing a difference in ddev start times on mac/colima, will try other environments:

image

@rfay
Copy link
Member Author

rfay commented May 18, 2023

@gilbertsoft I'm unable to recreate the problems you saw. I've done a full comparison at https://docs.google.com/spreadsheets/d/1SXlXanCoVw0SS_-viLueJ7DdJdjQUjrBT6819OW8pV4/edit?usp=sharing

The good news here is the numbers are all fine, and the macOS Docker Desktop numbers, which were horrible and probably the reason I was worrying about recent regressions, were fixed by a factory reset.

image

@rfay rfay force-pushed the 20230516_compose_2.18.0 branch from fa7a95f to 071f35a Compare May 18, 2023 18:00
@rfay rfay changed the title Bump docker-compose to 2.18.0 Bump docker-compose to v2.18.1 May 18, 2023
@rfay rfay merged commit 772e7c4 into ddev:master May 20, 2023
17 checks passed
@rfay rfay deleted the 20230516_compose_2.18.0 branch May 20, 2023 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants