Skip to content

Implements UI for dependency proxy packages settings

What does this MR do and why?

Implements UI for dependency proxy packages settings

Backend permissions were implemented as part of !138356 (merged)

MR deals with the GraphQL query aspect of page and rendering of fields.

Updating the fields & using GraphQL mutation is part of subsequent MR.

Screenshots or screen recordings

Before After
Screenshot_2023-12-07_at_12.06.02_am Screenshot_2023-12-07_at_12.05.12_am

How to set up and validate locally

The dependency proxy for packages has a few requirements:

  1. have packages -> enabled set to true in gitlab.yml.
  2. have dependency_proxy -> enabled set to true in gitlab.yml.
  3. have the packages feature enabled in the project's settings. Settings -> General -> Visiblity, project features, permissions -> Package registry (checkbox enabled.)
  4. have a GitLab license. Premium or more.
  5. Visit Project > Settings > Packages and Registries
  6. Confirm Dependency Proxy settings block is not visible
  7. have the related feature flag turned on:
    Feature.enable(:packages_dependency_proxy_maven)
  8. Confirm Dependency Proxy settings block is visible
  9. Open http://gdk.test:8000/-/graphql-explorer
  10. Run the following query:
    mutation {
      updateDependencyProxyPackagesSettings(input: { projectPath: "<project full path>", enabled: true, mavenExternalRegistryUrl: "https://test.dev", mavenExternalRegistryUsername: "u1", mavenExternalRegistryPassword: "p1"}) {
        dependencyProxyPackagesSetting {
          enabled
          mavenExternalRegistryUrl
          mavenExternalRegistryUsername
        }
        errors
      }
    }
  11. Confirm Dependency Proxy form is updated with values from mutation.
  12. Run in FOSS mode
  13. Confirm Dependency Proxy settings block is not visible

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #410726 (closed)

Edited by Rahul Chanila

Merge request reports

Loading