Action container tests fail to resolve container IP on Docker Engine v29+ (`NetworkSettings.IPAddress` removed)
- Dominant language
- Scala
- Stars
- 6.8k
- Forks
- 1.2k
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 2
Description
## Description
ActionContainer.withContainer resolves a newly started action container's IP with docker inspect --format '{{.NetworkSettings.IPAddress}}', but the top-level network properties of NetworkSettings were removed in Docker Engine v29.0.0 (API v1.52). On that engine the template fails to resolve, docker inspect exits non-zero, and the following assertion aborts every action container test before it can reach the container.
## Environment details
* Docker Engine `v29.3.0` (API `v1.54`) on Redhat 8.x.
## Steps to reproduce the issue
1. Install Docker Engine `v29.0.0` or newer (API `v1.52`+).
2. Run any test that uses `ActionContainer.withContainer(...)` (e.g. `./gradlew tests:test --tests "actionContainers.*"`)
3. `ActionContainer.withContainer` runs `docker inspect --format '{{.NetworkSettings.IPAddress}}' ` to discover the container IP and the command fails.
## Provide the expected results and outputs:
`docker inspect` exits with `0` and prints the container IP, so the test can reach the action container on `:8080`.
```
$ docker inspect --format '{{.NetworkSettings.IPAddress}}'
172.17.0.2
$ echo $?
0
```
## Provide the actual results and outputs
On Docker Engine `v29.2.1` the top-level `IPAddress` key no longer exists, so template execution fails and `docker inspect` exits non-zero:
```
$ docker inspect --format '{{.NetworkSettings.IPAddress}}'
template parsing error: template: :1:18: executing "" at <.NetworkSettings.IPAddress>: map has no entry for key "IPAddress"
$ echo $?
1
```
The subsequent `assert(ipOut._1 == 0, ...)` then fails, so every test built on `ActionContainer.withContainer` aborts before it can talk to the container.
Contributor guide
Research direction
Locate ActionContainer.withContainer and the actionContainers.* tests run by ./gradlew tests:test --tests "actionContainers.*". Start by tracing the docker inspect IP lookup and compare its behavior on Docker Engine v29.0.0+; done means docker inspect succeeds, the container IP is resolved, and the action container tests can reach :8080.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, scala
- Domain
- devops, testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100