Remove encrypted values from AppSettings attributes
What does this MR do?
The MR removes encrypted values from ApplicationSetting.last.attributes
in ElasticSearch tasks. Issue can occur on environments which have Slack app enabled, its encrypted secrets are stored as binary.
Resolving "Get and save Environment Settings via GitLab Toolbox pod" task failure with encoding issue:
TASK [post_configure : Get and save Environment Settings via GitLab Toolbox pod] ***
fatal: [localhost]: FAILED! => changed=true
rc: 1
return_code: 1
stderr: |-
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.6.1/lib/active_support/core_ext/object/json.rb:40:in `to_json': "\\xDC" from ASCII-8BIT to UTF-8 (Encoding::UndefinedConversionError)
from /srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.6.1/lib/active_support/core_ext/object/json.rb:40:in `to_json'
from /srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.6.1/lib/active_support/json/encoding.rb:57:in `to_json'
Related issues
https://gitlab.com/gitlab-org/quality/gitlab-environment-toolkit-configs/staging-ref/-/issues/46
Author's checklist
When ready for review, the Author applies the workflowready for review label and mention @gl-quality/get-maintainers
:
- Merge request:
-
Merge Request Title and Description are up-to-date, accurate, and descriptive -
MR targeting the appropriate branch -
MR has a green pipeline -
MR has no new security alerts in the widget from the Secret Detection
andIaC Scan (SAST)
jobs.
-
- Code:
-
Check the area changed works as expected. Consider testing it in different environment sizes (1k,3k,10k,etc.). - Staging Ref deployment passes with this branch.
-
Edited by Nailia Iskhakova