Remove [FF] ci_stop_using_has_exposed_artifacts_metadata_col
What does this MR do and why?
Background
A CI pipeline can be configured with "exposed artifacts" using the artifacts:expose_as keyword. These artifacts are listed as file links in the merge request UI with the name set to the expose_as value.
We currently use the column p_ci_builds_metadata.has_exposed_artifacts in the scope .with_exposed_artifacts to find jobs with exposed artifacts in FindExposedArtifactsService. This service iterates through each job where has_exposed_artifacts = true and fetches the applicable artifacts.
As part of our plan to migrate data away from the metadata table (https://gitlab.com/groups/gitlab-com/gl-infra/data-access/dbo/-/epics/36), we need update the code so it's no longer dependent on the has_exposed_artifacts column.
Feature MR
In !195693 (merged), we introduced the feature flag ci_stop_using_has_exposed_artifacts_metadata_col, which implemented the following:
Updates the logic for finding exposed artifacts so it doesn't use the has_exposed_artifacts column. This means that we have to iterate through all latest builds of a pipelines and check each one for exposed artifacts.
The feature flag was globally rolled out in #551510 (comment 2618828878) at 2025-07-10 3:54PM PT. It has been on for a few days and is deemed stable.
This MR
This MR removes the code related to ci_stop_using_has_exposed_artifacts_metadata_col.
References
How to set up and validate locally
These steps will lead you through creating an exposed artifact and verifying that the feature still works as before.
Prerequisite: Ensure you have a GitLab Runner set up with your gdk.
-
Check out this branch (restart gdk if needed.)
-
Create a new blank project with the following pipeline config:
.gitlab-ci.yml
generate-exposed-artifact:
script:
- echo "My test artifact" > my_artifact.txt
artifacts:
paths:
- my_artifact.txt
expose_as: 'My Test Artifact'
control-job:
script: echo
- Commit (anything) to a new branch and open a merge request. In that MR, wait for the pipeline to complete. Then observe that the artifact is correctly exposed in the UI:
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Related to #551510 (closed)
