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 |
---|---|
How to set up and validate locally
The dependency proxy for packages has a few requirements:
- have
packages
->enabled
set totrue
ingitlab.yml
. - have
dependency_proxy
->enabled
set totrue
ingitlab.yml
. - have the
packages
feature enabled in the project's settings.Settings
->General
->Visiblity, project features, permissions
->Package registry
(checkbox enabled.) - have a GitLab license.
Premium
or more. - Visit Project > Settings > Packages and Registries
- Confirm Dependency Proxy settings block is not visible
- have the related feature flag turned on:
Feature.enable(:packages_dependency_proxy_maven)
- Confirm Dependency Proxy settings block is visible
- Open
http://gdk.test:8000/-/graphql-explorer
- 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 } }
- Confirm Dependency Proxy form is updated with values from mutation.
- Run in FOSS mode
- 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.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #410726 (closed)
Edited by Rahul Chanila