Skip to content

api: omit missing Created field from ImageInspect response#47450

Merged
thaJeztah merged 1 commit intomoby:masterfrom
neersighted:image_created_omitempty
Feb 26, 2024
Merged

api: omit missing Created field from ImageInspect response#47450
thaJeztah merged 1 commit intomoby:masterfrom
neersighted:image_created_omitempty

Conversation

@neersighted
Copy link
Member

@neersighted neersighted commented Feb 26, 2024

Set the Created field in image inspect to omitempty so we don't return it when it is absent from the image config, as opposed to returning an empty string.

* api: `GET /images/{id}/json` omits the `Created` field (previously it was `0001-01-01T00:00:00Z`)
  if the `Created` field is missing from the image config.

Signed-off-by: Bjorn Neergaard <bjorn.neergaard@docker.com>
@thaJeztah
Copy link
Member

This one probably will fail, asking for a change-log entry 😉

@tianon
Copy link
Member

tianon commented Feb 26, 2024

(added cherry-pick labels to follow-up #47387 👍)

@thaJeztah
Copy link
Member

Can we still do this for v25 (as it already shipped), or is this considered a change to the API?

@thaJeztah
Copy link
Member

Discussed in a call, and the missing omitempty was an oversight, so to not complicate things too much, it's better to include it than to have 3 variants.

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

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.

6 participants