-
Notifications
You must be signed in to change notification settings - Fork 59
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
resolve ansible-test issues #204
Conversation
since there are a few PRs in flight, I think we should not merge this right away - it will be a big disruption - I'll have to rebase this and merge it after we get in ths PRs for 8.4 |
LGTM Looking at this change, is this the first time to run black and flake8 on the storage role? (no wonder there were lots of formatting changes... :) |
Yes. Since we have to make other big changes for ansible-test, I figured we should enable |
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.
lgtm
(may not be merged just now, but you have my approval.)
74d943a
to
dcd0fb7
Compare
@nhosoi the 3 dependent PRs are merged - this PR is rebased on top of them - this PR also has the doc fixes |
This fixes many formatting issues as well to make black, flake8, pylint, yamllint, and ansible-lint happier.
ok to merge? |
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.
A lot of these changes seem like bikeshedding to me, but I don't feel strongly about it.
blkid_data = [('/dev/sdx', 'UUID=\"hello-1234-56789\" TYPE=\"crypto_LUKS\"'), | ||
('/dev/sdy', 'UUID=\"this-1s-a-t3st-f0r-ansible\" VERSION=\"LVM2 001\" TYPE=\"LVM2_member\" USAGE=\"raid\"'), | ||
('/dev/sdz', 'LABEL=\"/data\" UUID=\"a12bcdef-345g-67h8-90i1-234j56789k10\" VERSION=\"1.0\" TYPE=\"ext4\" USAGE=\"filesystem\"')] | ||
blkid_data = [ |
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.
How this can be considered an improvement is beyond my comprehension, but I suppose I can read it either way.
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.
python black
- this is a double edged sword - it fixes many legitimate issues found by Galaxy importer, but it imposes a rather arbitrary, and in some cases hard-to-read, formatting regime
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.
Every other system role uses python black
formatting - if storage doesn't want to use this, we'll have to figure out some way to make an exception, and figure out how to lint some of the issues found by Galaxy importer without using black
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.
No, it's probably worth it for the consistency and linting.
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.
ok - here's #205 for comparison - pretty much everything except the black
formatting
[citest pending] |
[citest bad] |
[citest pending] |
Independent. @dwlehman expressed concerns with the large number of formatting changes in this PR, so I created #205 as an alternative which fixed the ansible-lint issues without some of the large formatting changes, so we could compare the two and decide which one was better for the storage role.
We need to choose one and close the other. |
My comment was not intended to be a serious objection, just a comment that I personally find the new style unpleasant. We should go with this version if it brings the project in line with the rest of the system roles in some meaningful way. |
closing in favor of #205 |
Lots of python code changes for formatting, fix linter issues,
etc. This also cleans up the module docs. One fix is that
for the
RETURN
parameters thereturned:
field is required.I made all of the
returned: success
- I'm not sure if thatis really the case, or if some parameters are returned even if
the module failed, but I think
success
is safe.