Loading
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
- #609504 (closed) - "Type ArtifactRegistryRepository.settings with a union/interface before GA". This MR uses a flat object type rather than a union, because the per-format branches nest rather than diverge.
- The field set follows the Artifact Registry OpenAPI specification and its S17 REST management API spec.
- Related to GraphQL surface: remote settings read type, wri... (#618513 - closed) • Rahul Chanila, Fiona McCawley • 19.4
How to set up and validate locally
- In a Rails console, enable the flag:
Feature.enable(:artifact_registry_ui). - Query an organization's
artifactRegistryRepository, selectingsettings { url cacheValidityHours metadataCacheValidityHours hasCredentials lastHealthStatus lastHealthCheckedAt }. - Confirm it returns values on a remote repository, and null on a hosted one.
- Confirm that selecting a credential field under
settingsfails schema validation.
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist.
Edited by Rahul Chanila