Gate "keep latest artifacts for ref" behind feature flag
This applies a patch for gitlab-com/gl-infra/production#2031 (closed) to master
. A version of this change was applied by @ayufan in https://ops.gitlab.net/gitlab-com/gl-infra/patcher/-/merge_requests/171, but later reduced to a simplified version for the production patch.
Issue introduced in !29802 (merged), reported in #16267 (comment 333877045).
cc @gitlab-org/release/managers
Edited by Robert Speicher