-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(listmailuser): Don't parse comments when reading config #2617
Merged
polarathene
merged 4 commits into
docker-mailserver:master
from
polarathene:fix/listmailuser-quota-comments
Jun 5, 2022
Merged
fix(listmailuser): Don't parse comments when reading config #2617
polarathene
merged 4 commits into
docker-mailserver:master
from
polarathene:fix/listmailuser-quota-comments
Jun 5, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This comment was marked as resolved.
This comment was marked as resolved.
georglauterbach
previously approved these changes
Jun 4, 2022
This comment was marked as resolved.
This comment was marked as resolved.
I need this PR and it's follow-up merged before I can continue #2615 I'm hoping another maintainer will have some time soon to spare, otherwise it's going to add friction to getting these PRs ready while I have time to spare 馃槄 |
Avoids passing comments to `dovecot_quota_to_hr()` which fails to handle it and would throws errors.
I'm not sure if it's better for the input, but the `sed` syntax is better. Instead of matching non-comments to print, it strips out lines that are comments.
polarathene
force-pushed
the
fix/listmailuser-quota-comments
branch
from
June 5, 2022 01:04
397ab8c
to
7702e74
Compare
polarathene
force-pushed
the
fix/listmailuser-quota-comments
branch
from
June 5, 2022 02:41
7702e74
to
b7c46c0
Compare
4 tasks
georglauterbach
approved these changes
Jun 5, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
馃憤馃徏
casperklein
approved these changes
Jun 5, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
The quota support method
dovecot_quota_to_hr()
was failing when provided comment lines. Fixed by stripping them from the config used as input for the while loop.Not sure how useful a test is for this? (we do have some tests that detect if other commands work without parsing failures though)Probably don't need a test for this as failure impact is UX only? This provides basis of consistent/improved config parsing to avoid issue in general going forward.Resolved concern
I haven't looked over the difference for the shell syntax for passing the input data to the while loop, but it seems the 2nd commit syntax looks more appropriate? I'm just referencing usage elsewhere in the project, so happy for @georglauterbach or @casperklein to weigh in on what is suitable 馃憤
sed
usage variants (for_config_without_comments()
):EDIT: Whoops, noticed that the patterns aren't equivalent matching (empty line, white-space only, comments) 馃槄
Type of change
Checklist:
If necessary I have added tests that prove my fix is effective or that my feature works