Skip to content

Remove hasEnvScopeQuery prop from ci_variable_list

Mireya Andres requested to merge remove-has-env-scope-query-prop into master

What does this MR do and why?

hasEnvScopeQuery is always true for groups and projects, so the usage of this flag is redundant now in most components except in the CiVariableShared component where we want to skip the environments query if none is provided. This only applies to instance variables, since CI variables on the instance-level are not associated with environments.

In the past, hasEnvScopeQuery was used to determine if we need to do the search for environments scopes via GraphQL or on the client-side (where we manually filter from the list of environment scopes we initially fetched from various sources).

Since group and project CI variables use GraphQL now, the search will always be done using the GraphQL query. We no longer need to do a client-side search anymore.

For instance variables, we don't render the environment scope dropdown component anyway, so there is also no need to use the hasEnvScopeQuery flag there.

Screenshots or screen recordings

No changes. Pipelines should be green.

How to set up and validate locally

MR acceptance checklist

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

Edited by Mireya Andres

Merge request reports