Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

api: omit missing Created field from ImageInspect response #47450

Merged
merged 1 commit into from
Feb 26, 2024

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.

None yet

6 participants