Write remote repository settings from the create and edit forms

What does this MR do and why?

Lets a viewer set a remote repository's upstream settings — the URL, credentials, and cache windows — when creating a repository and when editing one, and sends those settings to Artifact Registry through the GraphQL schema.

The create and edit forms share one source section. On a create it hides the connection indicator and the test action, because there is no repository yet for either to describe.

Cache windows show 24 as a placeholder rather than a value. Artifact Registry picks its own default from the upstream URL, and any value the form sends replaces it, so an untouched window is left out of the request entirely.

Name, format, and the upstream URL are marked as required.

The remote write now uses the same create and update mutations the hosted forms use, so the local stand-in for the unmounted schema is removed.

Note

The Test upstream connection action is on the edit form only. The create form needs an Artifact Registry endpoint that probes a URL before a repository exists, tracked in gitlab-org/ops/artifact-registry#812 (closed). The action will be added to the create form once that endpoint ships.

Screenshots or screen recordings

Format Create form
Docker gdk.test_3000_o_default_-artifact_registry_acme_repositories_new_remote_iPad_Mini___1
npm gdk.test_3000_o_default_-artifact_registry_acme_repositories_new_remote_iPad_Mini___2
OCI gdk.test_3000_o_default_-artifact_registry_acme_repositories_new_remote_iPad_Mini___3
Maven gdk.test_3000_o_default_-artifact_registry_acme_repositories_new_remote_iPad_Mini___4

How to set up and validate locally

  1. Enable the flag: Feature.enable(:artifact_registry_ui)
  2. Visit an organization's Artifact Registry repositories list.
  3. Create a remote repository — name, format, and upstream URL are required; leave a cache window untouched and confirm the request omits it.
  4. Edit it and change a cache window or the credentials; confirm the list entry updates in place.
  5. Use Test upstream connection on the edit form.

MR acceptance checklist

  • Tests added for this feature/bug — 51 suites, 1626 tests, 0 failures.
  • rake gitlab:graphql:validate passes: 16 documents, all OK, none skipped as a client query.
  • No changelog entry: the whole slice is dark behind a disabled flag.
  • Conforms to the code review guidelines.

Closes #618516 (closed)

Related to #618515 (closed)

Edited by Rahul Chanila

Merge request reports

Loading
Loading