Change the way cache:paths and cache:untracked work together

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

  • Close this issue

Problem to solve

Currently, cache attribute of the job is processed in the same way as artifacts. All the files matching the cache:paths are taken with addition of git ls-files -o if cache:untracked is specified. However placing version-controlled files in the cache makes little to no sense and can easily lead to hardly discoverable bugs.

Further details

The behavior was taken from artifacts attribute where it was reasonable.

Proposal

Fix processing of cache attribute so that specifying both cache:paths and cache:untracked means "take files from git ls-files -o and filter them against cache:paths"

Documentation

Currently this point is not covered in documentation.

gitlab-ce10230929 gitlab-ce4107606

Edited Aug 04, 2025 by 🤖 GitLab Bot 🤖
Assignee Loading
Time tracking Loading