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
Set Created
to 0001-01-01T00:00:00Z
on older API versions
#47374
Conversation
This matches the prior behavior before 2a6ff3c. This also updates the Swagger documentation for the current version to note that the field might be the empty string and what that means. Signed-off-by: Tianon Gravi <admwiggin@gmail.com>
Restarted GHA for https://github.com/moby/moby/actions/runs/7877638978/job/21494256308?pr=47374#step:6:1902 which looks like it's probably just flaky 😄
|
/ # docker image inspect -f '{{ .Created }}' hivemq/hivemq-swarm:4.25.0
/ # DOCKER_API_VERSION=1.44 docker image inspect -f '{{ .Created }}' hivemq/hivemq-swarm:4.25.0
/ # DOCKER_API_VERSION=1.43 docker image inspect -f '{{ .Created }}' hivemq/hivemq-swarm:4.25.0
0001-01-01T00:00:00Z |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be also nice to address the wrong formatting in image list (could be in a follow up):
3. docker image list
=> CREATED
= 54 years ago
@@ -1746,7 +1746,7 @@ definitions: | |||
Created: | |||
description: | | |||
Date and time at which the image was created, formatted in | |||
[RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. | |||
[RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds, or empty if the field was not set in the image config. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should also note this change in version-history.md
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doh, good catch, I'll update (but I might not get to it today, so any other maintainer should feel free to take over 😅).
Yeah, this is probably an OK stop-gap solution. I agree with the discussion on the ticket that we should consider making this an |
Agreed! My first priority was addressing the backwards compatibility break for 25.x, and it seemed reasonable to decide it was "intentional" for 25.x and consider something more in 26.x (such as |
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Backport at #47387 |
Oh, can we apply |
Now that we always set it for old API versions, I guess omitempty would be just.. that? We already shipped this API version so I didn't want to push too hard, but yeah, would love to have it |
Well we could also revert/change this, apply the fix for 25.x API version too and add omitempty there. |
I think we can just add |
Did we get to that follow up, or is that still pending? 👀 |
It is still pending ..not able to see the api-inspect-created |
@tianon I wasn't sure if we reached any consensus on that being a good idea; I can open a PR making that change. |
I think if we're going to do it, we probably have to quickly -- maybe a PR is the best way to figure out if we have consensus? 😄 |
This matches the prior behavior before 2a6ff3c.
This also updates the Swagger documentation for the current version to note that the field might be the empty string and what that means.
Fixes #47368
(if accepted, this should be backported to 25.x)
Changelog