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

Use latest docker-compose v2 version #1233

Merged
merged 3 commits into from
Apr 26, 2023
Merged

Conversation

mrodm
Copy link
Contributor

@mrodm mrodm commented Apr 24, 2023

This PR enables docker-compose v2 in CI.
Setting the latest version available at the time of creating this PR (2.17.2)
https://docs.docker.com/compose/release-notes/

Relates #1116

@mrodm
Copy link
Contributor Author

mrodm commented Apr 24, 2023

/test

@mrodm
Copy link
Contributor Author

mrodm commented Apr 24, 2023

Missing logs for container-logs apache package

EDIT:
docker-compose v2 does not write the message referring to attaching. For instance:
Attaching to elastic-package-service_nginx_1

As apache does not have any logs a part from that "attacching..." line when docker-compose v1 is used, those logs are empty when docker-compose v2 is used.

@mrodm mrodm added the ci label Apr 25, 2023
@mrodm mrodm self-assigned this Apr 25, 2023
@mrodm mrodm marked this pull request as ready for review April 25, 2023 11:30
@mrodm mrodm requested a review from a team April 25, 2023 11:30
Comment on lines +183 to +188
versionMessage := fmt.Sprintf("Determined Docker Compose version: %v", ver)
if ver.Major() == 1 {
logger.Debugf("Determined Docker Compose version: %v, the tool will use Compose V1", ver)
versionMessage = fmt.Sprintf("%s, the tool will use Compose V1", versionMessage)
c.dockerComposeV1 = true
}
logger.Debug(versionMessage)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Maybe it can be dismissed the tool will use Compose V1 sentence and just lave the message Determined Docker Compose version: %v?

Copy link
Member

Choose a reason for hiding this comment

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

Sounds good, yes.

Copy link
Member

Choose a reason for hiding this comment

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

Though well, it also tells if V1 implementation is being used here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, I'll leave it adding that sentence if docker-compose version is v1.x

@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

History

cc @mrodm

@mrodm mrodm merged commit c8d09fc into elastic:main Apr 26, 2023
@mrodm mrodm deleted the use_docker_compose_v2 branch April 26, 2023 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants