Skip to content

Add `ACTIVE` ProjectSecretsManagerStatus in GraphQL

Mireya Andres requested to merge secrets/add-active-status-graphql into master

What does this MR do and why?

This adds the missing ACTIVE enum value for projectSecretsManager.status. A follow up for Enable secrets manager on a project (Backend) and required for implementing the frontend part Enable secrets manager on a project (Frontend).

The list of statuses is available in ee/app/models/secrets_management/project_secrets_manager.rb

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Before After
Screenshot_2024-09-19_at_17.16.38 Screenshot_2024-09-19_at_17.21.23

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Install openbao
    brew install openbao
  2. Follow the instructions in #470143 (comment 1984247205) to set up openbao locally for gdk.
  3. In the GraphQL explorer, provision your secrets manager.
    mutation {
      projectSecretsManagerInitialize(input: { projectPath: "/path/to/project" }) {
        errors
        projectSecretsManager {
          ciSecretsMountPath
          project {
            id
            name
          }
          status
        }
      }
    }
  4. When the secrets manager is active, we should be able to query the status without encountering an error.
    query {
      projectSecretsManager(projectPath: "/path/to/project") {
        status
        project {
          id
        }
        ciSecretsMountPath
      }
    }
Edited by Mireya Andres

Merge request reports

Loading