You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 29, 2024. It is now read-only.
In current state plugin checks that container is up by trying to get container ID from docker.
My proposal is that plugin should run tests only after all containers has status healthy or none.
Fast workaround can be added to DockerCommands
def getDockerContainerId(instanceName: String, serviceName: String): String = {
//Docker replaces '/' with '_' in the identifier string so search for replaced version
Process(s"""docker ps --all --filter=name=${instanceName.replace('/', '_')}_${serviceName}_ --format=\"{{.ID}}\ --filter=\"health=healthy\" --filter=\"health=none\" """").!!.trim().replaceAll("\"", "")
}
The text was updated successfully, but these errors were encountered:
I like the suggestion. However, the one complication is that it looks like the ability for docker ps to filter on health status was not introduced until somewhat recently in docker v1.13.0moby/moby#24698
As it looks like docker ps returns an error when a non-existing filter is supplied this change is going to break compatibility with anyone using a pre-v1.13.0 version of docker.
docker ps --filter=test=test
Error response from daemon: Invalid filter 'test'
It's possible that we could have two different versions of the command that getDockerContainerId executes but that would require adding some additional logic to get the docker version information before deciding on which version of the command to execute.
Could you please add the documentation, guide how to build this plug locally for different sbt/scala versions to make easier testing and contribution processes?
Hi @NikolayKhoroshevsky - If you want to build/test for sbt 0.13 and sbt 1.0 you can check out these instructions.
As for testing against different versions of docker I'm not aware of a good or easy way to do this. I identified the compatibility issue with the filters because in the past we have run into this type of problem when updating any of the commands in DockerCommands.scala. So I just manually took a look at the docker code to identify when support for the filters was added.
In current state plugin checks that container is up by trying to get container ID from docker.
My proposal is that plugin should run tests only after all containers has status
healthy
ornone
.Fast workaround can be added to
DockerCommands
The text was updated successfully, but these errors were encountered: