Docker 24.0.7 recently landed which includes this change to the docker stats functionality to speed up the collection of one-shot stats.
This new code path ends up returning a response that omits the name and id fields from the stats object, however. Docker seems to have been treating those fields as optional. Bollard doesn't, though. This means that this:
always fails with a JsonDataError { message: "missing field 'name' at line ... }
UPDATE:
I've revised this issue description and the associated PR to reflect that the id field is also missing from the stats object when collecting one-shot stats.
Docker 24.0.7 recently landed which includes this change to the docker stats functionality to speed up the collection of one-shot stats.
This new code path ends up returning a response that omits the
name
andid
fields from the stats object, however. Docker seems to have been treating those fields as optional. Bollard doesn't, though. This means that this:always fails with a
JsonDataError { message: "missing field 'name' at line ... }
UPDATE:
I've revised this issue description and the associated PR to reflect that the
id
field is also missing from the stats object when collecting one-shot stats.