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

Tests using the .NET Docker remote API run indefinitely on Ubuntu 20.04 and Ubuntu 22.04 agents #6111

Closed
3 of 10 tasks
Hornet-Nest opened this issue Aug 19, 2022 · 5 comments
Closed
3 of 10 tasks

Comments

@Hornet-Nest
Copy link

Hornet-Nest commented Aug 19, 2022

Description

I have an integration test project that uses a library called Testcontainers to start an instance of a docker container for running tests against. The tests in this project pass on the Ubuntu 18.04 agent, however on updating to either Ubuntu 20.04 or 22.04 these tests now run up until the 1 hour build timeout is hit.

As the only change between a successful and failing build is updating the agent version in the yaml for the pipeline I believe that the issue is with the newer Ubuntu hosted agents.

Links to the last successful and failing builds can be found below.

Platforms affected

  • Azure DevOps
  • GitHub Actions

Virtual environments affected

  • Ubuntu 18.04
  • Ubuntu 20.04
  • Ubuntu 22.04
  • macOS 10.15
  • macOS 11
  • macOS 12
  • Windows Server 2019
  • Windows Server 2022

Image version and build link

Failed builds:

Last successful build:

Is it regression?

Ubuntu 18.04

Expected behavior

All tests in the sample project (linked below) pass when run on an Ubuntu 20.04 / 22.04 hosted agent.
The example that shows the issue can be found on the azure-pipelines branch.

https://dev.azure.com/hornetsnest/_git/TestContainers?path=%2F&version=GBazure-pipelines&_a=contents

Actual behavior

When run on an Ubuntu 20.04 or 22.04 agent the test step of the build runs up to the 1 hour limit. The build is then timed out.
On an Ubuntu 18.04 agent this does not happen and the test step completes in roughly 2 minutes.

Repro steps

  1. Clone the linked repository into a new Azure DevOps project.
  2. Setup a build for the azure-pipelines branch using the azure-pipelines.yml in the repo.
  3. Run the build and see that it fails.
  4. Update the azure-pipelines.yml to use an Ubuntu 18.04 agent.
  5. Run the build and see that is passes.
@miketimofeev
Copy link
Contributor

Hi @Hornet-Nest!
We will take a look.

@miketimofeev
Copy link
Contributor

@Hornet-Nest could you take a look at this issue #5036?
This seems related to me but I could be wrong.

@Hornet-Nest
Copy link
Author

@miketimofeev I'd say the 2 issues are related.
Both are using the same container image (mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator) and in both cases the image works correctly on an Ubuntu 18.04 agent but not on 20.04 agent or newer.

I've not been able to check the logs output from the container on for the build that was run an Ubuntu 20.04 agent however I suspect they will be similar to what is shown in this comment (#5036 (comment)). Which would explain why the builds are being timed out as how I'm verifying that the container is ready to accept requests is to wait by waiting for the word Started to be output to the containers stdout log.

@waszak
Copy link

waszak commented Aug 31, 2022

This is issue is also here mentioned Azure/azure-cosmos-db-emulator-docker#45

Probably the only way to fix this issue before they depracate ubuntu 18.04 is to upvote issues like that in both places.

They even have special email for issues like that that https://docs.microsoft.com/en-us/azure/cosmos-db/linux-emulator?tabs=sql-api%2Cssl-netstd21#report-an-emulator-issue

I tried to ask in this second place because "azure-cosmos-db-emulator-docker" repo doesn't seem active and development of linux emulator probably is somwhere else. Still I didn't get response.

@miketimofeev
Copy link
Contributor

@Hornet-Nest @waszak I'm going to close this issue as an external one but please feel free to contact us if you need any help from our side.
Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants