-
Notifications
You must be signed in to change notification settings - Fork 408
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
JENKINS-57589 Fix parsing of container creation date #175
base: master
Are you sure you want to change the base?
Conversation
(3 months without response) @dwnusbaum PTAL. Thanks |
@rufoa Thanks for the PR! Can you add a regression test for the bug? |
All done I think |
@dwnusbaum thanks for volunteering to review this Devin - could you check it over when you get a minute please? The changes are pretty straightforward. |
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.
@rufoa The fix seems simple/fine, but I don't really understand the impact (is the creation date even used for anything now that fingerprinting is disabled by default? Was it ever used?). It looks like the PR could still use a regression test that deals with time zones specifically (unless the changes to DockerClientTest fail without the fix?).
IIRC the problem surfaced because I was using this plugin with podman (rather than Docker) and the timestamps it exposes via I believe (can't easily check, sorry) that Docker outputs timestamps pre-converted to UTC, whereas podman outputs them in the system's TZ. The old code assumed that removing the final character from the timestamp would be harmless (because in UTC this is always just
Unfortunately because Docker always returns timestamps in UTC, you can't really test for the actual bug unless you start running your tests against podman (in a non-UTC tz) as well. 🤷♂️ I tightened up the tests while I was here, but you're correct that they won't actually catch a regression. |
Thought I'd fix this outstanding TODO