Skip to content

Bug in ImageData.from(Image) causes AgeBasedPullPolicy to unexpectedly pull #4275

@mr-rycho

Description

@mr-rycho

The bad fragment of ImageData.from(Image) :

return builder().createdAt(Instant.ofEpochMilli(image.getCreated())).build();

The ofEpochMilli method is used but image.getCreated() returns timestamp as epoch (seconds). This makes all images to be dated to early 1970 and AgeBasedPullPolicy always pulls images from repo, even if local images are new.
Tested with testcontainers 1.15.3
Docker:

Connected to docker: 
  Server Version: 20.10.6
  API Version: 1.41
  Operating System: Docker Desktop

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions