Skip to content

Cleanup `ci_group_env_scope_graphql` feature flag

Mireya Andres requested to merge ma/cleanup-ci_group_env_scope_graphql into master

What does this MR do and why?

By default, the environment scope dropdown for group CI variables will now fetch data via the new GraphQL query. This query fetches at most 30 environments at a time.

Rollout issue: #416385 (closed)

Screenshots or screen recordings

Screen_Recording_2023-07-17_at_22.17.14

How to set up and validate locally

  1. Disable the feature flag (Feature.disable(:ci_group_env_scope_graphql)).

  2. You can use the following command to seed your group with environments. Set environment_scope to unique for this test. (Docs)

    # Seed CI variables for group
    # Uses a default of 10 for seed_count, "*" for environment_scope, and `GROUP_VAR_` for the prefix.
    # Set environment_scope is set to "unique", each variable will have its own unique environment
    bundle exec rake "gitlab:seed:ci_variables_group[group_name, seed_count, environment_scope, prefix]"
    
    # Example
    bundle exec rake "gitlab:seed:ci_variables_group[<group_name>, 20, unique]"
  3. For your group, go to Settings > CI/CD > and expand the Variables section.

  4. Edit a variable of click Add variable to open the modal.

  5. The dropdown for Environment Scopes should now only fetch 30 environments at most.

  6. When using the search bar in the dropdown, this also queries for at most 30 environments.

MR acceptance checklist

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

Merge request reports