Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

tejksat
Copy link
Contributor

@tejksat tejksat commented Aug 4, 2025

Expose the condition query parameter (added in Docker Engine API v1.30) on WaitContainerCmd. When the parameter is omitted, we keep the daemon’s default not-running behaviour.

Practical implications

  • create → wait (no condition) → start Calling wait right after create but before start returns immediately with whatever exit-code the daemon reports for a container that has never run (typically 0). In other words, you learn nothing about the future process.

  • create → start → wait (no condition) For short-lived containers started with --rm, the container may be auto-removed before the client manages to issue wait, resulting in a "container not found" error.

  • create → wait(condition=removed) → start Passing the new removed condition eliminates both races: the wait call blocks until the container has exited and been removed, reliably yielding the actual exit code even for --rm containers.

@tejksat tejksat requested a review from a team as a code owner August 4, 2025 20:50
@tejksat tejksat force-pushed the introduce-condition-parameter-to-wait-container-cmd branch from a2becae to 352e602 Compare August 4, 2025 20:55
Expose the `condition` query parameter (added in Docker Engine API v1.30) on `WaitContainerCmd`. When the parameter is omitted, we keep the daemon’s default `not-running` behaviour.

Practical implications
----------------------
* **create → wait (no condition) → start**
  Calling `wait` right after `create` but **before** `start` returns immediately with whatever exit-code the daemon reports for a container that has never run (typically `0`). In other words, you learn nothing about the future process.

* **create → start → wait (no condition)**
  For short-lived containers started with `--rm`, the container may be auto-removed before the client manages to issue `wait`, resulting in a *"container not found"* error.

* **create → wait(condition=removed) → start**
  Passing the new `removed` condition eliminates both races: the wait call blocks until the container has exited *and* been removed, reliably yielding the actual exit code even for `--rm` containers.
@tejksat tejksat force-pushed the introduce-condition-parameter-to-wait-container-cmd branch from 352e602 to 85ec0be Compare August 4, 2025 21:03
@tejksat
Copy link
Contributor Author

tejksat commented Aug 19, 2025

@eddumelendez I saw you've approved some recent PR. Could you please take a look at this one?

@eddumelendez eddumelendez added this to the next milestone Aug 19, 2025
@eddumelendez eddumelendez merged commit dfe1866 into docker-java:main Aug 19, 2025
4 checks passed
@eddumelendez
Copy link
Member

Thanks for your contribution, @tejksat !

@tejksat
Copy link
Contributor Author

tejksat commented Aug 20, 2025

@eddumelendez cool! I saw that it already made it into the release — thank you!

svc-squareup-copybara pushed a commit to cashapp/misk that referenced this pull request Aug 20, 2025
| Package | Type | Package file | Manager | Update | Change |
|---|---|---|---|---|---|
|
[com.google.api.grpc:proto-google-common-protos](https://github.com/googleapis/sdk-platform-java)
| dependencies | misk/gradle/libs.versions.toml | gradle | minor |
`2.60.0` -> `2.61.0` |
|
[com.google.cloud:google-cloud-core-http](https://github.com/googleapis/sdk-platform-java)
| dependencies | misk/gradle/libs.versions.toml | gradle | minor |
`2.59.0` -> `2.60.0` |
|
[com.google.cloud:google-cloud-core](https://github.com/googleapis/sdk-platform-java)
| dependencies | misk/gradle/libs.versions.toml | gradle | minor |
`2.59.0` -> `2.60.0` |
| [com.google.api:gax](https://github.com/googleapis/sdk-platform-java)
| dependencies | misk/gradle/libs.versions.toml | gradle | minor |
`2.69.0` -> `2.70.0` |
| [org.jetbrains.kotlin.jvm](https://kotlinlang.org/)
([source](https://github.com/JetBrains/kotlin)) | plugin |
misk/gradle/libs.versions.toml | gradle | patch | `2.1.20` -> `2.1.21` |
| [org.jetbrains.kotlin.plugin.jpa](https://kotlinlang.org/)
([source](https://github.com/JetBrains/kotlin)) | plugin |
misk/gradle/libs.versions.toml | gradle | patch | `2.1.20` -> `2.1.21` |
| [org.jetbrains.kotlin.plugin.allopen](https://kotlinlang.org/)
([source](https://github.com/JetBrains/kotlin)) | plugin |
misk/gradle/libs.versions.toml | gradle | patch | `2.1.20` -> `2.1.21` |
| [org.jetbrains.kotlin:kotlin-test](https://kotlinlang.org/)
([source](https://github.com/JetBrains/kotlin)) | dependencies |
misk/gradle/libs.versions.toml | gradle | patch | `2.1.20` -> `2.1.21` |
| [org.jetbrains.kotlin:kotlin-stdlib-jdk8](https://kotlinlang.org/)
([source](https://github.com/JetBrains/kotlin)) | dependencies |
misk/gradle/libs.versions.toml | gradle | patch | `2.1.20` -> `2.1.21` |
| [org.jetbrains.kotlin:kotlin-reflect](https://kotlinlang.org/)
([source](https://github.com/JetBrains/kotlin)) | dependencies |
misk/gradle/libs.versions.toml | gradle | patch | `2.1.20` -> `2.1.21` |
| [org.jetbrains.kotlin:kotlin-noarg](https://kotlinlang.org/)
([source](https://github.com/JetBrains/kotlin)) | dependencies |
misk/gradle/libs.versions.toml | gradle | patch | `2.1.20` -> `2.1.21` |
|
[org.jetbrains.kotlin:kotlin-gradle-plugins-bom](https://kotlinlang.org/)
([source](https://github.com/JetBrains/kotlin)) | dependencies |
misk/gradle/libs.versions.toml | gradle | patch | `2.1.20` -> `2.1.21` |
|
[org.jetbrains.kotlin:kotlin-compiler-embeddable](https://kotlinlang.org/)
([source](https://github.com/JetBrains/kotlin)) | dependencies |
misk/gradle/libs.versions.toml | gradle | patch | `2.1.20` -> `2.1.21` |
| [org.jetbrains.kotlin:kotlin-bom](https://kotlinlang.org/)
([source](https://github.com/JetBrains/kotlin)) | dependencies |
misk/gradle/libs.versions.toml | gradle | patch | `2.1.20` -> `2.1.21` |
|
[com.github.docker-java:docker-java-transport-httpclient5](https://github.com/docker-java/docker-java)
| dependencies | misk/gradle/libs.versions.toml | gradle | minor |
`3.5.3` -> `3.6.0` |
|
[com.github.docker-java:docker-java-transport](https://github.com/docker-java/docker-java)
| dependencies | misk/gradle/libs.versions.toml | gradle | minor |
`3.5.3` -> `3.6.0` |
|
[com.github.docker-java:docker-java-core](https://github.com/docker-java/docker-java)
| dependencies | misk/gradle/libs.versions.toml | gradle | minor |
`3.5.3` -> `3.6.0` |
|
[com.github.docker-java:docker-java-api](https://github.com/docker-java/docker-java)
| dependencies | misk/gradle/libs.versions.toml | gradle | minor |
`3.5.3` -> `3.6.0` |
|
[com.github.docker-java:docker-java](https://github.com/docker-java/docker-java)
| dependencies | misk/gradle/libs.versions.toml | gradle | minor |
`3.5.3` -> `3.6.0` |
| [software.amazon.awssdk:sdk-core](https://aws.amazon.com/sdkforjava) |
dependencies | misk/gradle/libs.versions.toml | gradle | patch |
`2.32.25` -> `2.32.26` |
| [software.amazon.awssdk:sqs](https://aws.amazon.com/sdkforjava) |
dependencies | misk/gradle/libs.versions.toml | gradle | patch |
`2.32.25` -> `2.32.26` |
| [software.amazon.awssdk:regions](https://aws.amazon.com/sdkforjava) |
dependencies | misk/gradle/libs.versions.toml | gradle | patch |
`2.32.25` -> `2.32.26` |
|
[software.amazon.awssdk:dynamodb-enhanced](https://aws.amazon.com/sdkforjava)
| dependencies | misk/gradle/libs.versions.toml | gradle | patch |
`2.32.25` -> `2.32.26` |
| [software.amazon.awssdk:dynamodb](https://aws.amazon.com/sdkforjava) |
dependencies | misk/gradle/libs.versions.toml | gradle | patch |
`2.32.25` -> `2.32.26` |
| [software.amazon.awssdk:aws-core](https://aws.amazon.com/sdkforjava) |
dependencies | misk/gradle/libs.versions.toml | gradle | patch |
`2.32.25` -> `2.32.26` |
| [software.amazon.awssdk:bom](https://aws.amazon.com/sdkforjava) |
dependencies | misk/gradle/libs.versions.toml | gradle | patch |
`2.32.25` -> `2.32.26` |
| [software.amazon.awssdk:auth](https://aws.amazon.com/sdkforjava) |
dependencies | misk/gradle/libs.versions.toml | gradle | patch |
`2.32.25` -> `2.32.26` |

---

### Release Notes

<details>
<summary>googleapis/sdk-platform-java
(com.google.api.grpc:proto-google-common-protos)</summary>

###
[`v2.61.0`](https://github.com/googleapis/sdk-platform-java/blob/HEAD/CHANGELOG.md#2610-2025-08-04)

##### Features

- **mtls:** Add support for X.509-based mTLS-transport in Java GAX lib
([#&#8203;3852](googleapis/sdk-platform-java#3852))
([2d02344](googleapis/sdk-platform-java@2d02344))

##### Bug Fixes

- improve error messaging for LRO CancellationException
([#&#8203;3873](googleapis/sdk-platform-java#3873))
([9cae675](googleapis/sdk-platform-java@9cae675))
- make generation config update logs verbose
([#&#8203;3764](googleapis/sdk-platform-java#3764))
([9b1a34b](googleapis/sdk-platform-java@9b1a34b))

</details>

<details>
<summary>JetBrains/kotlin (org.jetbrains.kotlin.jvm)</summary>

###
[`v2.1.21`](https://github.com/JetBrains/kotlin/releases/tag/v2.1.21):
Kotlin 2.1.21

##### Changelog

##### Backend. Native. Debug

- [`KT-75991`](https://youtrack.jetbrains.com/issue/KT-75991) Xcode
16.3: Fix lldb stepping test over an inline function

##### Compiler

- [`KT-75992`](https://youtrack.jetbrains.com/issue/KT-75992) Xcode
16.3: stacktraces on simulators are not symbolicated
- [`KT-76663`](https://youtrack.jetbrains.com/issue/KT-76663) KJS:
KotlinNothingValueException caused by expression return since 2.1.20
- [`KT-75756`](https://youtrack.jetbrains.com/issue/KT-75756) Backend
Internal error: Exception during IR lowering when trying to access
variable from providedProperties in class within kotlin custom script
- [`KT-76209`](https://youtrack.jetbrains.com/issue/KT-76209)
CONFLICTING\_UPPER\_BOUNDS on `Nothing` bound
- [`KT-70352`](https://youtrack.jetbrains.com/issue/KT-70352) K2:
False-negative CONFLICTING\_UPPER\_BOUNDS on `Nothing` bound
- [`KT-74739`](https://youtrack.jetbrains.com/issue/KT-74739) Native:
"IllegalArgumentException: All constructors should've been lowered:
FUNCTION\_REFERENCE"
- [`KT-75483`](https://youtrack.jetbrains.com/issue/KT-75483) Native:
redundant unboxing generated with smart cast
- [`KT-71425`](https://youtrack.jetbrains.com/issue/KT-71425) IR
Inliner: investigate return type of an inlined block

##### Native

- [`KT-76252`](https://youtrack.jetbrains.com/issue/KT-76252) Native:
executable crash with generic value classes with 2.1.20

##### Native. C and ObjC Import

- [`KT-75781`](https://youtrack.jetbrains.com/issue/KT-75781) Xcode
16.3: Fix cinterop tests failing with fatal error: could not build
module '\_stdint'

##### Native. Runtime. Memory

- [`KT-74280`](https://youtrack.jetbrains.com/issue/KT-74280) Native:
GC.collect crashes with -Xallocator=std

##### Tools. CLI

- [`KT-75588`](https://youtrack.jetbrains.com/issue/KT-75588)
\[2.1.20-RC] "was compiled by a pre-release version of Kotlin and cannot
be loaded by this version of the compiler" warnings despite using the
same compiler version
- [`KT-74663`](https://youtrack.jetbrains.com/issue/KT-74663) kotlinc-js
CLI: not providing -ir-output-dir results in NullPointerException

##### Tools. Compiler Plugins

- [`KT-76162`](https://youtrack.jetbrains.com/issue/KT-76162)
"IllegalStateException: No mapping for symbol: VALUE\_PARAMETER
INSTANCE\_RECEIVER" after updating to 2.1.20

##### Tools. Gradle

- [`KT-73682`](https://youtrack.jetbrains.com/issue/KT-73682)
Compatibility with Gradle 8.12 release
- [`KT-73142`](https://youtrack.jetbrains.com/issue/KT-73142) Kotlin
Gradle plugin: Remove usage of Gradle's internal ExecHandleBuilder
- [`KT-36004`](https://youtrack.jetbrains.com/issue/KT-36004) Update
'org.gradle.usage' attribute rules to support the 'JAVA\_API' and
'JAVA\_RUNTIME' value
- [`KT-73968`](https://youtrack.jetbrains.com/issue/KT-73968)
KotlinDependencyManagement tries to mutate configuration after it was
resolved
- [`KT-73684`](https://youtrack.jetbrains.com/issue/KT-73684) Run
integration tests against Gradle 8.12
- [`KT-72694`](https://youtrack.jetbrains.com/issue/KT-72694) Accessing
Task.project during execution is being deprecated in Gradle 8.12
- [`KT-73683`](https://youtrack.jetbrains.com/issue/KT-73683) Compile
against Gradle API 8.12

##### Tools. Gradle. JS

- [`KT-77119`](https://youtrack.jetbrains.com/issue/KT-77119) KJS:
Gradle: Setting custom environment variables in KotlinJsTest tasks no
longer works
- [`KT-74735`](https://youtrack.jetbrains.com/issue/KT-74735) KGP uses
Gradle internal `CompositeProjectComponentArtifactMetadata`
- [`KT-71879`](https://youtrack.jetbrains.com/issue/KT-71879) Notice of
upcoming deprecation for Boolean 'is-' properties in Gradle Groovy
scripts

##### Tools. Gradle. Multiplatform

- [`KT-75808`](https://youtrack.jetbrains.com/issue/KT-75808) KGP: MPP
with jvm target and Gradle java-test-fixtures is broken
- [`KT-75605`](https://youtrack.jetbrains.com/issue/KT-75605) Dependency
resolution fails in commonTest/nativeTest source sets for KMP module
when depending on another project due to missing PSM
- [`KT-75512`](https://youtrack.jetbrains.com/issue/KT-75512)
Maven-publish: ArtifactId is not correct in`pom` file with customized
`withXml`

##### Tools. Incremental Compile

- [`KT-62555`](https://youtrack.jetbrains.com/issue/KT-62555) Wrong ABI
fingerprint for inline function containing a lambda
- [`KT-75883`](https://youtrack.jetbrains.com/issue/KT-75883) Follow-up:
switch from INSTANCE heuristic to outerClass chain

##### Tools. Kapt

- [`KT-75936`](https://youtrack.jetbrains.com/issue/KT-75936) K2 KAPT:
unsupported FIR element kinds in constant evaluation
- [`KT-75942`](https://youtrack.jetbrains.com/issue/KT-75942) K2 KAPT:
underscore not allowed here

##### Tools. Scripts

- [`KT-76424`](https://youtrack.jetbrains.com/issue/KT-76424)
Dependencies in main.kts not working with 2.1.20
- [`KT-76296`](https://youtrack.jetbrains.com/issue/KT-76296) Kotlin
script compiler crashes when secondary constructor calls a function
- [`KT-75589`](https://youtrack.jetbrains.com/issue/KT-75589) Scripts:
"IndexOutOfBoundsException in
jdk.internal.util.Preconditions.outOfBounds" when trying to extend a
class which uses global variable

##### Tools. Wasm

- [`KT-76161`](https://youtrack.jetbrains.com/issue/KT-76161) Wasm:
"export startUnitTests was not found" after updating to Kotlin 2.1.20

</details>

<details>
<summary>docker-java/docker-java
(com.github.docker-java:docker-java-transport-httpclient5)</summary>

###
[`v3.6.0`](https://github.com/docker-java/docker-java/releases/tag/3.6.0)

[Compare
Source](docker-java/docker-java@3.5.3...3.6.0)

##### Changes

- Bump org.apache.commons:commons-compress from 1.27.1 to 1.28.0
[@&#8203;dependabot](https://github.com/dependabot)
([#&#8203;2486](docker-java/docker-java#2486))
- Bump jersey.version from 2.30.1 to 2.47
[@&#8203;dependabot](https://github.com/dependabot)
([#&#8203;2496](docker-java/docker-java#2496))
- Bump netty.version from 4.2.3.Final to 4.2.4.Final
[@&#8203;dependabot](https://github.com/dependabot)
([#&#8203;2494](docker-java/docker-java#2494))
- Bump org.assertj:assertj-core from 3.27.3 to 3.27.4
[@&#8203;dependabot](https://github.com/dependabot)
([#&#8203;2489](docker-java/docker-java#2489))
- Bump jackson.version from 2.18.4 to 2.19.2
[@&#8203;dependabot](https://github.com/dependabot)
([#&#8203;2485](docker-java/docker-java#2485))
- Bump commons-io:commons-io from 2.19.0 to 2.20.0
[@&#8203;dependabot](https://github.com/dependabot)
([#&#8203;2480](docker-java/docker-java#2480))
- Bump org.junit.jupiter:junit-jupiter from 5.13.3 to 5.13.4
[@&#8203;dependabot](https://github.com/dependabot)
([#&#8203;2482](docker-java/docker-java#2482))
- Bump org.junit.jupiter:junit-jupiter from 5.13.2 to 5.13.3
[@&#8203;dependabot](https://github.com/dependabot)
([#&#8203;2469](docker-java/docker-java#2469))
- Bump netty.version from 4.2.2.Final to 4.2.3.Final
[@&#8203;dependabot](https://github.com/dependabot)
([#&#8203;2477](docker-java/docker-java#2477))
- Bump org.apache.commons:commons-lang3 from 3.17.0 to 3.18.0
[@&#8203;dependabot](https://github.com/dependabot)
([#&#8203;2478](docker-java/docker-java#2478))
- Fix typo 'deamon' to 'daemon'
[@&#8203;sehyuk080101](https://github.com/sehyuk080101)
([#&#8203;2476](docker-java/docker-java#2476))

##### 📈 Enhancements

- Add support for container wait conditions
[@&#8203;tejksat](https://github.com/tejksat)
([#&#8203;2487](docker-java/docker-java#2487))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "after 6pm every weekday,before 2am
every weekday" in timezone Australia/Melbourne, Automerge - At any time
(no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Never, or you tick the rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config help](https://github.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Renovate
Bot](https://github.com/renovatebot/renovate).

GitOrigin-RevId: 67c534111b00bc4c6a439915d184f36b5fd21ae7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants