Fastzip created archives have warnings files when extracted by default archiver

Fastzip and the default archiver both support the infozip 0x7875 extras extension, adding uid/gid information for each file.

Both implementations arguably adhere to the specification of 0x7875, but because it's loosely defined, it's lead to a problem where fastzip archives are not correctly supported by the default archiver.

Fastzip encodes UID/GIDs using a variable length, depending on the value.

The default archiver expects UID/GIDs to be 4 bytes (a signed 32-bit integer).

Workarounds

One workaround is to ensure that FF_USE_FASTZIP is enabled on both sides, for archiving and extracting.

Another is to modify the UID/GID to 2147483647:2147483647 (this forces the variable length to equal 4 bytes) of your paths at the end of the job. For example:

my_job:
  script:
    - .. do things ..
  after_script:
    - chown -R 2147483647:2147483647 node_modules/
  artifacts:
    paths:
      - node_modules/**/*

Files on the extraction side will now have an invalid UID/GID, so you may run into issues if you're not running as root inside of your container. I recognize this is not ideal and I wouldn't usually suggest this incredibly odd fix, but I recognize that some would still sooner have faster caches.

Edited by Arran Walker