Add pipeline artifact replication to geo [RUN ALL RSPEC] [RUN AS-IF-FOSS]

Merged Max Orefice requested to merge mo-add-pipeline-artifact-to-geo into master

Ref: #238464 (closed)

Step #2 to implement PipelineArtifact replication with geo.

What does this MR do?

This MR adds all the necessary logic to replicate + verify pipeline artifacts with geo.

It includes the following items:

  • Implement blob replicator logic as explained with geo framework doc
  • Implement verification part
  • Implement metrics with GraphQL

Why are we doing this?

The grouptesting is currently replicating our PipelineArtifact with geo.

During the investigation of this new feature in our POC the team decided to implement it in 3 steps:

  1. Adding database changes necessary - !57506 (merged)
  2. Implementing replication + verification - !57741 (merged)
  3. Enabling the feature

Database Review

Click to expand for database review

GraphQL query

{
  geoNode {
    id
    pipelineArtifactRegistries {
      nodes{
        pipelineArtifactId
      }
    }
  }
}

SQL query

This table was recently introduced and we can not explain this query yet (will update the description when possible).

ERROR: failed to run explain without execution: ERROR: relation "pipeline_artifact_registry" does not exist (SQLSTATE 42P01)

SELECT
    pipeline_artifact_registry.*
FROM
    pipeline_artifact_registry
ORDER BY
    pipeline_artifact_registry.id ASC

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • [-] Label as security and @ mention @gitlab-com/gl-security/appsec
  • [-] The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • [-] Security reports checked/validated by a reviewer from the AppSec team
Edited by Max Orefice