Skip to content

Frontend: Admin view instance-level environment variable has extra field "Environment scope"

Summary

Admin view for CI/CD "Variables" has extra field Environment scope which is not applicable to instance-level environment variable. The field is grayed out and not changeable. The "question mark" help button is not clickable and does not have any link assigned.

Steps to reproduce

  1. Create a Self-Managed GitLab instance
  2. Go into Admin area
  3. Create a new variable under Settings => CI/CD => Variables => Expand => Add variable - Pop-up window appear with the field Environment scope which is not applicable to the instance-level variable. (Screenshot below)

Example Project

Re-produceable on SaaS admin area or any Self-Managed instance Admin area

What is the current bug behavior?

Environment scope field is shown, however it is not applicable to the instance-level environment variable

Instance-level environment variable API confirms that there is no "environment scope" key for the variable at the instance-level

What is the expected correct behavior?

The field is hidden and not rendered in the UI

Relevant logs and/or screenshots

image

Output of checks

Results of GitLab environment info

Expand for output related to GitLab environment info

(For installations with omnibus-gitlab package run and paste the output of:
`sudo gitlab-rake gitlab:env:info`)

(For installations from source run and paste the output of:
`sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)

Results of GitLab application Check

Expand for output related to the GitLab application check

(For installations with omnibus-gitlab package run and paste the output of: sudo gitlab-rake gitlab:check SANITIZE=true)

(For installations from source run and paste the output of: sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true)

(we will only investigate if the tests are passing)

Possible fixes

Edited by Nadia Sotnikova