fussybeaver / bollard

Docker daemon API in Rust
Apache License 2.0
858 stars 131 forks source link

give stats object name & id fields a default empty string #347

Closed rolyatmax closed 10 months ago

rolyatmax commented 10 months ago

This fixes #346 - an issue with the latest Docker 24.0.7 where the name and id fields in the stats object are omitted for one-shot stats collection. This change seems to be the least disruptive, but may potentially cause problems for folks who rely on getting an Error when name or id is missing. (Not sure how common that would be.)

Another option would be making name and id both Option<String>s, but that would be a breaking change.

Thoughts?

UPDATE:

I've revised this PR description and the associated issue to reflect that the id field is also missing from the stats object when collecting one-shot stats.

rolyatmax commented 10 months ago

Hi @fussybeaver! The tests failing here seem to have been failing for some time on CI/CD, but is there anything I should look into here?

fussybeaver commented 10 months ago

Thanks for the PR and heads-up... I've fixed the problems in master, which are caused by small semantic changes in the API that are affecting the tests. If you could rebase, hopefully CI will go green.

rolyatmax commented 10 months ago

@fussybeaver rebased!