summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKamil TrzciƄski <ayufan@ayufan.eu>2019-04-28 15:09:15 +0000
committerGitLab Release Tools Bot <robert+release-tools@gitlab.com>2019-04-29 18:26:59 +0000
commit7cf23929d121ef598fbc8a7efb67715083431623 (patch)
tree8e2e6f7b154213389e09bc5b1eee36193d3d7f22
parent2d5c7faa1b980ac818cc42801ab28825c4b95219 (diff)
downloadgitlab-ce-7cf23929d121ef598fbc8a7efb67715083431623.tar.gz
Merge branch '60945-masked-variable-still-printed-in-log-output-on-gitlab-com' into 'master'
Resolve "Masked Variable still printed in log output on gitlab.com" Closes #60945 See merge request gitlab-org/gitlab-ce!27768 (cherry picked from commit 6246979a8659cef67533a5033755a45ad72d30c5) 07b5c503 Remove variable masking feature flag
-rw-r--r--lib/gitlab/ci/variables/collection/item.rb6
-rw-r--r--spec/lib/gitlab/ci/variables/collection/item_spec.rb14
2 files changed, 1 insertions, 19 deletions
diff --git a/lib/gitlab/ci/variables/collection/item.rb b/lib/gitlab/ci/variables/collection/item.rb
index 833aa75adb5..aab10aef398 100644
--- a/lib/gitlab/ci/variables/collection/item.rb
+++ b/lib/gitlab/ci/variables/collection/item.rb
@@ -27,13 +27,9 @@ module Gitlab
# don't expose `file` attribute at all (stems from what the runner
# expects).
#
- # If the `variable_masking` feature is enabled we expose the `masked`
- # attribute, otherwise it's not exposed.
- #
def to_runner_variable
@variable.reject do |hash_key, hash_value|
- (hash_key == :file && hash_value == false) ||
- (hash_key == :masked && !Feature.enabled?(:variable_masking))
+ hash_key == :file && hash_value == false
end
end
diff --git a/spec/lib/gitlab/ci/variables/collection/item_spec.rb b/spec/lib/gitlab/ci/variables/collection/item_spec.rb
index 3ff2fe18c15..613814df23f 100644
--- a/spec/lib/gitlab/ci/variables/collection/item_spec.rb
+++ b/spec/lib/gitlab/ci/variables/collection/item_spec.rb
@@ -137,19 +137,5 @@ describe Gitlab::Ci::Variables::Collection::Item do
.to eq(key: 'VAR', value: 'value', public: true, file: true, masked: false)
end
end
-
- context 'when variable masking is disabled' do
- before do
- stub_feature_flags(variable_masking: false)
- end
-
- it 'does not expose the masked field to the runner' do
- runner_variable = described_class
- .new(key: 'VAR', value: 'value', masked: true)
- .to_runner_variable
-
- expect(runner_variable).to eq(key: 'VAR', value: 'value', public: true)
- end
- end
end
end