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

[Bug]: Issue running ./gradlew check on latest code as of 8/30/23 #7449

Closed
alberttwong opened this issue Aug 30, 2023 · 6 comments
Closed

[Bug]: Issue running ./gradlew check on latest code as of 8/30/23 #7449

alberttwong opened this issue Aug 30, 2023 · 6 comments
Labels

Comments

@alberttwong
Copy link

Module

Core

Testcontainers version

1.19.0

Using the latest Testcontainers version?

Yes

Host OS

Mac

Host Arch

ARM

Docker version

atwong@Alberts-MacBook-Pro-3 testcontainers-java % docker version
Client:
 Cloud integration: v1.0.35-desktop+001
 Version:           24.0.5
 API version:       1.43
 Go version:        go1.20.6
 Git commit:        ced0996
 Built:             Fri Jul 21 20:32:30 2023
 OS/Arch:           darwin/arm64
 Context:           tcc

Server: Docker Desktop 4.22.1 (118664)
 Engine:
  Version:          24.0.5
  API version:      1.43 (minimum version 1.12)
  Go version:       go1.20.6
  Git commit:       a61e2b4
  Built:            Fri Jul 21 20:35:38 2023
  OS/Arch:          linux/arm64
  Experimental:     false
 containerd:
  Version:          1.6.21
  GitCommit:        3dce8eb055cbb6872793272b4f20ed16117344f8
 runc:
  Version:          1.1.7
  GitCommit:        v1.1.7-0-g860f061
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0


### What happened?

`./gradlew check`

### Relevant log output

```shell
Gradle Test Executor 11 > org.testcontainers.containers.CosmosDBEmulatorContainerTest > testWithCosmosClient FAILED
    org.testcontainers.containers.ContainerLaunchException: Container startup failed for image mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator:latest
        at app//org.testcontainers.containers.GenericContainer.doStart(GenericContainer.java:361)
        at app//org.testcontainers.containers.GenericContainer.start(GenericContainer.java:334)
        at app//org.testcontainers.containers.GenericContainer.starting(GenericContainer.java:1145)
        at app//org.testcontainers.containers.FailureDetectingExternalResource$1.evaluate(FailureDetectingExternalResource.java:28)
        at app//org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:54)
        at app//org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
        at app//org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
        at app//org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)


### Additional Information

_No response_
@alberttwong
Copy link
Author

alberttwong commented Aug 30, 2023

It seem related to #7082

tried adding in ryuk.container.privileged=true (doesn't work).
Tried docker context use default docker context use tcc docker context desktop-linux and all of them don't work.

@eddumelendez
Copy link
Member

H @alberttwong, If there is something else to say this can be done in the original issue which you can reopen as being the author. There is no need to create a new one .

@alberttwong
Copy link
Author

I can't reopen and my problem isn't pulling an image.

@eddumelendez
Copy link
Member

In the previous issue, it was mentioned that 1.19.0 the version was used. In 1.19.0, privileged is enabled by default. Besides that, the container doesn't run as I mentioned in the original issue as well. There are images that can not run in arm. For that reason, the issue is not in Testcontainers library.

@eddumelendez
Copy link
Member

eddumelendez commented Aug 30, 2023

I have an example which provides two workflows one to run cosmosdb with GH runners and other using TCC. As you can see, I ran those just moments ago and TCC was successful. See https://github.com/eddumelendez/testcontainers-cosmosdb-gha-test/actions

As mentioned before, looks like there was an intermittence pulling the image, probably something happening on the registry and that's why it causes issues when you were trying. It happened to me locally but not when using GHA.

@eddumelendez
Copy link
Member

Due to the issues about running azure cosmosdb emulator in ARM and current intermittence using the image, I'm closing the issue as if it out of scope of the library. JFTR due to a similar issue running in GHA, this module was disable to run in CI workflows. Also, there is no need to run all tests due to it is expensive execution for desktops.

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

No branches or pull requests

2 participants