Kubernetes cluster name can be added with whitespace => Problem when trying "To remove your integration, type ..."
When copying a Kubernetes cluster name from a
https://console.cloud.google.com/kubernetes/list page some whitespace carries over into the
Kubernetes cluster name field on GitLab's
Add existing cluster page (screenshots 1 & 2).
Not causing any problems when creating the cluster, installing apps on it and using it (for a GitLab Runner in my case), but when trying to remove, that whitespace is expected exactly again before the
Remove… buttons become active (screenshots 3 & 4).
Steps to reproduce
Follow steps in docs.gitlab.com/ee/user/project/clusters/add_remove_clusters and ensure that whitespace is copy-pasted as shown in screenshots below.
(If possible, please create an example project here on GitLab.com that exhibits the problematic behavior, and link to it here in the bug report)
(If you are using an older version of GitLab, this will also determine whether the bug is fixed in a more recent version)
What is the current bug behavior?
<code> tag contains a space, but that is not displayed in the GUI, thus isn't copy-paste-able to confirm the removal, nor is it obvious that it needs to be added by typing it.
What is the expected correct behavior?
If indeed the presence of spaces in the
Kubernetes cluster name field is intended, it should be displayed in the
If not: strip leading & trailing whitespaces upon pasting a
Kubernetes cluster name or upon clicking the
Add Kubernetes cluster button.
Relevant logs and/or screenshots
1. Double- or triple-click to select entire cluster name from GCP & copy
2. Paste cluster name into GitLab where requested
3. Try deleting the cluster & check the exact name in the
<code> block (use browser developer tools)
4. Copy cluster name with (white)space (characters) from source & paste into deletion confirmation field
Output of checks
(If you are reporting a bug on GitLab.com, write: This bug happens on GitLab.com)
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)
(If you can, link to the line of code that might be responsible for the problem)