Improve error message when omnibus_gitconfig is not set properly
What does this MR do?
Some users have configured omnibus_gitconfig['system']
improperly,
causing this obscure error:
NoMethodError: undefined method `lstrip' for nil:NilClass
/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitaly/libraries/gitaly.rb:93:in `block (2 levels) in parse_gitconfig'
/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitaly/libraries/gitaly.rb:91:in `map'
/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitaly/libraries/gitaly.rb:91:in `block in parse_gitconfig'
This commit ensures each config line has a proper key=value
form and
displays a clearer message. For example:
RuntimeError
------------
Invalid entry detected in omnibus_gitconfig['system']: 'fsckObjects' should be in the form key=value
Related issues
Relates to #6986 (closed)
Checklist
See Definition of done.
For anything in this list which will not be completed, please provide a reason in the MR discussion
Required
-
Merge Request Title, and Description are up to date, accurate, and descriptive -
MR targeting the appropriate branch -
MR has a green pipeline on GitLab.com -
Pipeline is green on dev.gitlab.org if the change is touching anything besides documentation or internal cookbooks -
trigger-package
has a green pipeline running against latest commit
Expected (please provide an explanation if not completing)
-
Test plan indicating conditions for success has been posted and passes -
Documentation created/updated -
Tests added -
Integration tests added to GitLab QA -
Equivalent MR/issue for the GitLab Chart opened
Merge request reports
Activity
added devopssystems groupdistribution sectioncore platform labels
assigned to @stanhu
changed milestone to %15.4
added Pick into 15.3 workflowready for review labels
requested review from @balasankarc
2 Warnings 0bf606a2: The commit body should not contain more than 72 characters per line. For more information, take a look at our Commit message guidelines. You've made some changes at the locations which contain user facing configuration.
That's OK as long as you're refactoring existing code and not adding any new
configuration. If you are adding new user facing configuration, consider adding
to gitlab.rb.template located in files/gitlab-config-template/gitlab.rb.template .
Otherwise, please consider adding the typemaintenance label in that case.If needed, you can retry the
danger-review
job that generated this comment.Generated by
Dangermentioned in issue #6986 (closed)
- Resolved by 🤖 GitLab Bot 🤖
Proper labels assigned to this merge request. Please ignore me.
@stanhu - please see the following guidance and update this merge request.1 Error, 1 Warning Please add typebug typefeature, or typemaintenance label to this merge request. Please add a subtype label to this merge request. If you have added a type label and do not feel the purpose of this merge request matches one of the subtypes labels, please resolve this discussion.
Edited by 🤖 GitLab Bot 🤖
added 1 commit
- 0bf606a2 - Improve error message when omnibus_gitconfig is not set properly
added maintenanceusability typemaintenance labels
mentioned in commit 46e402f5
added workflowstaging-canary label and removed workflowready for review label
added workflowcanary label and removed workflowstaging-canary label
added workflowstaging label and removed workflowcanary label
added workflowproduction label and removed workflowstaging label
picked the changes into the branch
15-3-stable-patch-3
with commit 1a77c08ementioned in commit 1a77c08e
Automatically picked into !6304 (merged), will merge into
15-3-stable
ready for15.3.3
.removed Pick into 15.3 label
mentioned in merge request !6304 (merged)
added releasedcandidate label
added releasedpublished label and removed releasedcandidate label
mentioned in merge request !6564 (merged)