Type Artifact Registry repository remote settings

What does this MR do and why?

ArtifactRegistryRepository.settings was a GraphQL::Types::JSON scalar with null: false. It is now a typed, nullable object: ArtifactRegistryRemoteSettings.

Two things change for a consumer.

It has a shape. An untyped JSON scalar hides the fields from clients, and it cannot stop a query from selecting an upstream credential.

It can be null. Artifact Registry omits settings on hosted and virtual repositories. The Ruby client defaulted the absent object to an empty hash, so the field always returned {}. It now returns null, so a consumer tests for presence rather than for emptiness.

References

How to set up and validate locally

  1. In a Rails console, enable the flag: Feature.enable(:artifact_registry_ui).
  2. Query an organization's artifactRegistryRepository, selecting settings { url cacheValidityHours metadataCacheValidityHours hasCredentials lastHealthStatus lastHealthCheckedAt }.
  3. Confirm it returns values on a remote repository, and null on a hosted one.
  4. Confirm that selecting a credential field under settings fails schema validation.

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist.

Edited by Rahul Chanila

Merge request reports

Loading
Loading