Skip to content

Only checkout repo archive if steps will be executed

Warren Gifford requested to merge mrn/archive-and-cache into main

Created by: mrnugget

Since we use a "reference counting" mechanism when checking out archives we shouldn't bump the ref count if we never execute steps.

Because only after executing the steps do we decrease the ref count and thus "free" the archive to be cleaned up.

The problem is that if a Task has a cache hit then the ref will never be decreased and the archive never cleaned up.

Edit, just to clarify: it's hard to hit this, since it requires workspaces to be defined and if: conditions structured in a way that would bust the cache for one of N workspaces that use the same archive.

Merge request reports

Loading