Skip to content

Hide Admin CI/CD variable Environment scope field

What does this MR do and why?

This is behind a disabled FF ci_variable_settings_graphql

In Admin view, you cannot edit the environment scope. We used to show it disabled, but now instead we want to hide it completely. This should avoid confusion as this feel as though it could be enabled but never will be.

Note that we couldn't solely rely on whether environment scope is enabled or not because for groups, for example, we want to show it disabled because you could have it enabled via a feature flag, while in admin it will never be shown. Therefore we introduce a new prop that hides the section completely that we pass down from admin.

Screenshots or screen recordings

Before After
Screen_Shot_2022-11-14_at_12.31.55_PM Screen_Shot_2022-11-14_at_12.38.25_PM

How to set up and validate locally

  1. Turn on the feature flag ci_variable_settings_graphql
  2. Go to `Admin => Settings => CI/CD => Variables
  3. Add a new variable
  4. notice the environment scope field is no longer 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 #369050 (closed)

Edited by Frédéric Caplette

Merge request reports