Skip to content

api/types/image: make InspectResponse.GraphDriver optional#50893

Merged
thaJeztah merged 1 commit intomoby:masterfrom
austinvazquez:make-image-inspect-driver-data-optional
Sep 4, 2025
Merged

api/types/image: make InspectResponse.GraphDriver optional#50893
thaJeztah merged 1 commit intomoby:masterfrom
austinvazquez:make-image-inspect-driver-data-optional

Conversation

@austinvazquez
Copy link
Contributor

@austinvazquez austinvazquez commented Sep 4, 2025

- What I did
Split from #50857

This change makes the GraphDriver field in image.InspectResponse optional. This field will only be returned when using moby engine graph drivers as a backend storage implementation. It will be omitted when using the containerd image backend.

- How I did it

- How to verify it

- Human readable description for the release notes

api: make `GraphDriver` field in `image.InspectResponse` optional. This field will continue to be emitted when using the legacy graph drivers and will be omitted when using the containerd image backend.

- A picture of a cute animal (not mandatory but encouraged)

@austinvazquez austinvazquez added area/api API impact/api kind/refactor PR's that refactor, or clean-up code release-blocker PRs we want to block a release on labels Sep 4, 2025
@austinvazquez austinvazquez added this to the 29.0.0 milestone Sep 4, 2025
@austinvazquez austinvazquez self-assigned this Sep 4, 2025
@austinvazquez austinvazquez force-pushed the make-image-inspect-driver-data-optional branch from eb8b9c6 to b5451b7 Compare September 4, 2025 13:18
@austinvazquez austinvazquez marked this pull request as ready for review September 4, 2025 14:02
// GraphDriver holds information about the storage driver used to store the
// container's and image's filesystem.
GraphDriver storage.DriverData
GraphDriver storage.DriverData `json:"GraphDriver,omitempty"`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Omit empty is respected on non-pointer structs if all the sub-fields of the struct are also empty?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch I think you are right it would be not be effective here.

@austinvazquez austinvazquez force-pushed the make-image-inspect-driver-data-optional branch from b5451b7 to 56ca2fc Compare September 4, 2025 15:51
@thaJeztah
Copy link
Member

Needs a rebase, @austinvazquez

@thaJeztah
Copy link
Member

docker-py test failures should also be checked probably; they could be legit (and possibly have to be adjusted, and temporarily skipped)

cc @ctalledo

=================================== FAILURES ===================================
_________________ ServiceTest.test_create_service_with_config __________________
tests/integration/api_service_test.py:767: in test_create_service_with_config
    assert container is not None
E   assert None is not None
_________________ ServiceTest.test_create_service_with_secret __________________
tests/integration/api_service_test.py:715: in test_create_service_with_secret
    assert container is not None
E   assert None is not None

This change makes the `GraphDriver` field in `image.InspectResponse` optional. This field will only be returned when using moby engine graph drivers as a backend storage implementation. It will be omitted when using the containerd image backend.

Signed-off-by: Austin Vazquez <austin.vazquez@docker.com>
@austinvazquez austinvazquez force-pushed the make-image-inspect-driver-data-optional branch from 56ca2fc to c441b2e Compare September 4, 2025 18:04
@austinvazquez
Copy link
Contributor Author

@thaJeztah , looks like it was a flake. It reran on the rebase.

Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@thaJeztah thaJeztah merged commit 10f683e into moby:master Sep 4, 2025
102 checks passed
@austinvazquez austinvazquez deleted the make-image-inspect-driver-data-optional branch September 4, 2025 19:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/api API impact/api kind/refactor PR's that refactor, or clean-up code release-blocker PRs we want to block a release on

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants