Skip to content
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

Closed
wants to merge 1 commit into from

Conversation

richm
Copy link
Contributor

@richm richm commented Mar 3, 2021

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 the returned: field is required.
I made all of the returned: success - I'm not sure if that
is really the case, or if some parameters are returned even if
the module failed, but I think success is safe.

@richm
Copy link
Contributor Author

richm commented Mar 3, 2021

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

@richm richm mentioned this pull request Mar 3, 2021
@nhosoi
Copy link
Contributor

nhosoi commented Mar 3, 2021

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... :)

@richm
Copy link
Contributor Author

richm commented Mar 3, 2021

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 black and flake8 too.

Copy link
Contributor

@nhosoi nhosoi left a 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.)

@richm richm force-pushed the ansible-test branch 2 times, most recently from 74d943a to dcd0fb7 Compare March 13, 2021 00:06
@richm
Copy link
Contributor Author

richm commented Mar 13, 2021

@nhosoi the 3 dependent PRs are merged - this PR is rebased on top of them - this PR also has the doc fixes

@richm richm requested a review from pcahyna March 13, 2021 00:40
@richm
Copy link
Contributor Author

richm commented Mar 13, 2021

rebase report - what affect with this have on existing PRs:

So wdyt? Can we merge this, then I help PR authors rebase their changes?

This fixes many formatting issues as well to make black, flake8,
pylint, yamllint, and ansible-lint happier.
@richm
Copy link
Contributor Author

richm commented Mar 17, 2021

ok to merge?

Copy link
Collaborator

@dwlehman dwlehman left a 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 = [
Copy link
Collaborator

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.

Copy link
Contributor Author

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

Copy link
Contributor Author

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

Copy link
Collaborator

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.

Copy link
Contributor Author

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

@richm
Copy link
Contributor Author

richm commented Apr 1, 2021

@dwlehman Can we get one of these PRs - this one or #205 - merged soon?

@richm
Copy link
Contributor Author

richm commented May 4, 2021

[citest pending]

@richm
Copy link
Contributor Author

richm commented May 4, 2021

[citest bad]

@richm
Copy link
Contributor Author

richm commented May 4, 2021

[citest pending]

@nhosoi
Copy link
Contributor

nhosoi commented May 8, 2021

@richm, Is #205 a superset of this pr? Or independent?
Took a look quickly, some changes are in common, but others are not...
Probably, we need to merge both of them, but the second merge may give us some conflicts...

@richm
Copy link
Contributor Author

richm commented May 10, 2021

@richm, Is #205 a superset of this pr? Or independent?

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.

Took a look quickly, some changes are in common, but others are not...
Probably, we need to merge both of them, but the second merge may give us some conflicts...

We need to choose one and close the other.

@dwlehman
Copy link
Collaborator

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.

@richm
Copy link
Contributor Author

richm commented May 13, 2021

closing in favor of #205

@richm richm closed this May 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants