Stop jobs without a fetch from borrowing the git object pool
What does this MR do?
Fixes static-analysis on master, which fails with:
error: unable to normalize alternate object path: /cache/git-object-pools/builds/gitlab-org/gitlab/.git/objectsSince gitlab-com/gl-infra/argocd/apps!3948 (merged), the private runners set GLCI_GIT_OBJECT_POOL_DIR, so GIT_ALTERNATE_OBJECT_DIRECTORIES from !259066 (merged) now points at a pool path. The pre_get_sources_script hook creates a placeholder there, but it skips jobs that don't fetch. Jobs extending .repo-from-artifacts use GIT_STRATEGY: none, so every git command in them prints the error, and fail_on_warnings fails static-analysis.
This sets GIT_ALTERNATE_OBJECT_DIRECTORIES: "" in .repo-from-artifacts, the same value clone-gitlab-repo uses. These jobs don't fetch, so they lose nothing from the pool.
Example failure: https://gitlab.com/gitlab-org/gitlab/-/jobs/17113584664
Related issues
- gitlab-org/quality/engineering-productivity/master-broken-incidents#31018 (closed)
- gitlab-org/quality/analytics/ci-health-incidents#1365 (closed)
Checklist
Pre-merge
Consider the effect of the changes in this merge request on the following:
- Different pipeline types
- Non-canonical projects:
-
gitlab-foss -
security -
dev - personal forks
-
- Pipeline performance
Post-merge
- Consider communicating these changes to the broader team following the communication guideline for pipeline changes