jozu-ai / kitops

Tools for easing the handoff between AI/ML and App/SRE teams.
https://KitOps.ml
Apache License 2.0
266 stars 26 forks source link

Remove timestamps from gzip headers to avoid changing hashes #242

Closed amisevsk closed 2 months ago

amisevsk commented 2 months ago

Description

By default, file and directory headers include timestamps for creation time, etc. These timestamps mean that kit builds are not reproducible through the sequence

  1. kit pack -t .
  2. kit unpack
  3. kit pack # should be same but isn't

since the unpack step results in different timestamps on files.

Instead, we just use the zero value for those timestamps to ensure hash is unchanged.

Linked issues

N/A