#13473·gocd

Allow more flexible article cache creation and handling

Author: chadlwilsonCreated Feb 8, 2025Updated Mar 17, 2026
Labelsagentsartifactsno stalebot

Currently there is an artifact cache that is created on-demand based on artifact retrieval requests where agents request downloads of entire folders.

What seems to happen is that

  • zip directory artifact request comes in
  • background thread is created to zip the artifacts
  • agent/client gets a 202 accepted
  • zip is stored in godata/artifacts/cache with structure artifacts/pipelines/...
  • agent/client needs to retry. There is a sort of random back-off logic, but sometimes creation takes too long and it will timeout
    • wait 10-20s, retry 1
    • wait 20-30s, retry 2
    • wait 30-40s, retry 3
    • fail (after 60-90s, mean 75s)

The challenges are

  • this cache folder is not documented anywhere
  • generally it is inside the godata area and so is on persistent storage
  • there is no normal or periodic cleanup process for it
  • there is no way to change its location to be outside the normal artifactsDir defined for the server.
  • use of zips means executable bits and metadata are lost, however may have other benefits
  • creation of zips is CPU limited to a single thread/core