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

The exporter when writing extension layers should zero timestamps #1180

Closed
natalieparellano opened this issue Aug 10, 2023 · 0 comments · Fixed by #1289
Closed

The exporter when writing extension layers should zero timestamps #1180

natalieparellano opened this issue Aug 10, 2023 · 0 comments · Fixed by #1289
Assignees
Labels
status/ready type/bug Something isn't working

Comments

@natalieparellano
Copy link
Member

Summary

When using extensions to extend the run image, it appears that timestamps within the layers are not zeroed out. This hurts reproducibility.


Reproduction

Steps
  1. Following the tutorial from Demo run image extension docs#581, modify the output image tag to be localhost:5000/hello-extensions (including the registry) and provide --publish to pack build
  2. Use crane manifest localhost:5000/hello-extensions to get the digest of the extension layer (it should be the 6th layer)
  3. Use crane blob localhost:5000/hello-extensions@sha256:<extension layer digest> > blob.tar.gz
  4. Expand the tarball and ls -lt from the root directory
Current behavior

The timestamps are not zeroed out:

$  ls -lt
total 0
drwxr-xr-x  3 narellano  staff   96 Aug 10 11:33 etc
drwxr-xr-x  3 narellano  staff   96 Jul 26 08:16 lib
drwxr-xr-x  6 narellano  staff  192 Jul 26 08:16 usr
drwxr-xr-x  3 narellano  staff   96 Jun 14 11:03 var
Expected behavior

The timestamps should be zeroed out.


Context

lifecycle version

0.17.0

anything else?

We don't use Reproducible: true in kaniko for reasons having to do with the fact that we don't pull the complete base image (since we are already running in the context of the image that is being extended). See where we override image.RetrieveRemoteImage and set InitialFSUnpacked: true. Available options seem to be:

  1. Try to modify kaniko
  2. Have the exporter zero out timestamps when streaming the layer to the target (this may be easier)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/ready type/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant