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

Negotiate client version for docker compose #432

Conversation

rahul-muttineni-okcupid
Copy link
Contributor

@rahul-muttineni-okcupid rahul-muttineni-okcupid commented Apr 25, 2022

Even though client version negotiation has been implemented for vanilla docker here, it hasn't been implemented for Docker Compose. I ran into the issue while setting up some integration tests and negotiating the client version fixed the issue and allowed me to make progress.

@rahul-muttineni-okcupid
Copy link
Contributor Author

@mdelapenya It looks like the failures are unrelated to my changes?

=== RUN   TestContainerCreationWaitingForHostPortWithoutBashThrowsAnError
    docker_test.go:1191: Error response from daemon: No such image: nginx:1.17.6-alpine: failed to create container

It seems to have failed to locate an image in test setup.

@mdelapenya
Copy link
Member

@rahul-muttineni-okcupid could you please rebase with latest changes 🙏 ? We fixed the netlify integration errors in #434, so they should pass now.

Let's also check if the image pull failed because of any glitch 🤞

@rahul-muttineni-okcupid rahul-muttineni-okcupid force-pushed the rahulmutt/fix-client-negotiation-in-docker-compose branch from 4971078 to 23e1961 Compare April 26, 2022 16:47
@rahul-muttineni-okcupid
Copy link
Contributor Author

@mdelapenya It's looking good now, thanks!

@codecov
Copy link

codecov bot commented Apr 26, 2022

Codecov Report

Merging #432 (23e1961) into main (64a22cb) will decrease coverage by 0.14%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #432      +/-   ##
==========================================
- Coverage   65.28%   65.13%   -0.15%     
==========================================
  Files          19       19              
  Lines        1178     1179       +1     
==========================================
- Hits          769      768       -1     
- Misses        302      304       +2     
  Partials      107      107              
Impacted Files Coverage Δ
compose.go 76.35% <100.00%> (+0.16%) ⬆️
docker.go 65.25% <0.00%> (-0.37%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 64a22cb...23e1961. Read the comment docs.

@rahul-muttineni-okcupid
Copy link
Contributor Author

@mdelapenya The next error is this (I'm seeing it on other open PRs too)

=== FAIL: . TestContainerLogWithErrClosed (20.88s)
2022/04/26 17:11:21 Starting container id: e981eede7dd6 image: docker:dind
2022/04/26 17:11:21 Waiting for container id e981eede7dd6 image: docker:dind
2022/04/26 17:11:37 Container is ready id: e981eede7dd6 image: docker:dind
    logconsumer_test.go:210: port not found

@mdelapenya
Copy link
Member

This test has been marked as flaky here: #411, hopefully fixed with #414

Copy link
Member

@mdelapenya mdelapenya left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@mdelapenya mdelapenya self-assigned this Apr 27, 2022
@mdelapenya mdelapenya added the chore Changes that do not impact the existing functionality label Apr 27, 2022
@mdelapenya mdelapenya merged commit cd84bb3 into testcontainers:main Apr 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Changes that do not impact the existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants