https://pantsbuild.org/ logo
#general
Title
# general
f

faint-businessperson-86903

01/31/2023, 12:45 AM
Hello, we have a use case where we want to package some files into a zip file using an
archive
target deterministically (in 🧵).
These are files that rarely change (CA certificates), but when they do we want to propagate an update downstream that uses the file hash to determine if it needs to be updated and the environment (airflow) needs to be restarted.
The problem is that while the contents of the archive don’t change, the zips include a timestamp as metadata that throws the archive hash off and triggers the environment to be restarted every time.
This blog post describes a `--no-extra`/`-X` flag to
zip
that excludes the metadata, so the zip can be deterministic from the file contents - is there any way to get pants to use this flag for our target?
f

faint-businessperson-86903

01/31/2023, 2:39 AM
Is that something you would want upstream? Happy to PR it if so
h

happy-kitchen-89482

01/31/2023, 2:48 AM
Makes sense to, thanks!
✔️ 1
f

fresh-cat-90827

01/31/2023, 9:39 AM
oh that's very useful, I didn't know about this flag, thanks for sharing this @faint-businessperson-86903
🙌 1
4 Views