Draft: [ci skip] Display number of secrets that would be lost when deleting a project
What does this MR do and why?
When a user deletes a project, they are prompted with a modal that shows the resources that will be lost when the project is deleted. We should included the number of secrets in the list as well.
The stats in the modal are provided by Rails by default, but for our case, we will be fetching the secrets count via GraphQL for performance reasons. The secrets manager requires the OpenBao service and we have to check first that the feature is enabled for the project, so fetching the secrets count requires additional requests, which we would like to avoid on every page load.
See !229342 (comment 3210563579) for further discussion.
This is only available for EE.
References
Implements #583210 for projects. A separate MR will be created for groups.
Screenshots or screen recordings
| State | Screenshot |
|---|---|
| CE or no secrets manager provisioned (no secrets count provided) | ![]() |
| While querying | ![]() |
| With secrets count | ![]() |
| With error (this will NOT prevent the user from deleting) | ![]() |
How to set up and validate locally
Enable the Secrets Manager
- Upload a Premium license (or above).
- Set up openbao and enable the secrets manager on your gdk.
- Enable the
secrets_managerfeature flag. - Go to your project settings (Settings > General) and expand Visibility, project features, permissions. Enable the secrets manager for your project/group with the settings toggle.
- Go to
/path-to-project/secrets/newand create a new secret.
Feature Verification
- To delete your secret, you can either:
- Verify that the secrets count is shown in the delete modal.
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.




