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
mgr/volume: Python flake warning fixes. #52208
base: main
Are you sure you want to change the base?
Conversation
* Two lines between class definitions. * Fixes: https://tracker.ceph.com/issues/51379 Signed-off-by: Manish M Yathnalli <myathnal@redhat.com>
Fixes: https://tracker.ceph.com/issues/51386 Signed-off-by: Manish M Yathnalli <myathnal@redhat.com>
Fixes: https://tracker.ceph.com/issues/51388 Signed-off-by: Manish M Yathnalli <myathnal@redhat.com>
Fixes: https://tracker.ceph.com/issues/51389 Signed-off-by: Manish M Yathnalli <myathnal@redhat.com>
Fixes: https://tracker.ceph.com/issues/51394 Signed-off-by: Manish M Yathnalli <myathnal@redhat.com>
Fixes: https://tracker.ceph.com/issues/51395 Signed-off-by: Manish M Yathnalli <myathnal@redhat.com>
Fixes: https://tracker.ceph.com/issues/51397 Signed-off-by: Manish M Yathnalli <myathnal@redhat.com>
Fixes: https://tracker.ceph.com/issues/51399 Signed-off-by: Manish M Yathnalli <myathnal@redhat.com>
Fixes: https://tracker.ceph.com/issues/51404 Signed-off-by: Manish M Yathnalli <myathnal@redhat.com>
Fixes: https://tracker.ceph.com/issues/51405 Signed-off-by: Manish M Yathnalli <myathnal@redhat.com>
I had went through the PR last week and the changes look good to me |
@rishabh-d-dave PTAL. |
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.
The changes look fine.
But I am confused how did you find this issues? I mean what command did you run to get these? I am asking because I see many more such issues when I run flake8 command on top the PR branch -
flake8 --exclude=venv,.tox src/pybind/mgr/volumes/fs | wc -l
786
For Python code in qa/ we run flake8 this way - flake8 --select=F,E9 --exclude=venv,.tox qa/
. Running this command suggests 21 issues -
flake8 --select=F,E9 --exclude=venv,.tox src/pybind/mgr/volumes/fs | wc -l
21
Ah, I think you fixed only the issues mentioned in the tickets. Sadly these tickets don't mention what parameters were pased to flake8/pep. I would recommend running the above command and fixing the rest of issues as well.
### volume operations -- create, rm, ls | ||
# volume operations -- create, rm, ls |
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.
Multiple #
s are perhaps deliberately added so that this comment is more easily apparent to readers.
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.
The reason single # with a space is recommended in pep8 is because someone might think
################################################################
# volume operations -- create, rm, ls #
################################################################
is more emphasizing than
### volume operations -- create, rm, ls.
Again style guides are just that, guides. If we don't agree, I can close the PR.
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.
If former is accepted by pep8/flake, let's switch to it instead?
### subvolume operations | ||
# subvolume operations |
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.
Same.
### subvolume snapshot | ||
# subvolume snapshot |
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.
same
### group snapshot | ||
# group snapshot |
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.
same
CREATE = 'create' | ||
REMOVE = 'rm' | ||
REMOVE_FORCE = 'rm-force' | ||
PIN = 'pin' | ||
LIST = 'ls' | ||
GETPATH = 'getpath' | ||
INFO = 'info' | ||
RESIZE = 'resize' | ||
SNAP_CREATE = 'snap-create' | ||
SNAP_REMOVE = 'snap-rm' | ||
SNAP_LIST = 'snap-ls' | ||
SNAP_INFO = 'snap-info' | ||
SNAP_PROTECT = 'snap-protect' | ||
SNAP_UNPROTECT = 'snap-unprotect' | ||
CLONE_SOURCE = 'clone-source' | ||
CLONE_CREATE = 'clone-create' | ||
CLONE_STATUS = 'clone-status' | ||
CLONE_CANCEL = 'clone-cancel' | ||
CLONE_INTERNAL = 'clone_internal' | ||
ALLOW_ACCESS = 'allow-access' | ||
DENY_ACCESS = 'deny-access' | ||
AUTH_LIST = 'auth-list' | ||
EVICT = 'evict' | ||
USER_METADATA_SET = 'user-metadata-set' | ||
USER_METADATA_GET = 'user-metadata-get' | ||
USER_METADATA_LIST = 'user-metadata-ls' | ||
USER_METADATA_REMOVE = 'user-metadata-rm' | ||
SNAP_METADATA_SET = 'snap-metadata-set' | ||
SNAP_METADATA_GET = 'snap-metadata-get' | ||
SNAP_METADATA_LIST = 'snap-metadata-ls' | ||
SNAP_METADATA_REMOVE = 'snap-metadata-rm' | ||
CREATE = 'create' | ||
REMOVE = 'rm' | ||
REMOVE_FORCE = 'rm-force' |
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.
This formatting was deliberately this way for sake of readability.
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.
The reason pep8 style guide does not recommend aligning = signs is that sooner or later, you will get a longer variable, which causes you to re-align all those = symbols. It is subjective if aligned = is more readable or not. Given that we have a tracker issue and we want it to be fixed, which means we want to adhere to pep8, I have fixed it. If not we can close the PR.
@manishym Let me know when this PR is ready for review again. |
@rishabh-d-dave Can you take a look. I have fixed other formatting errors as well. |
This pull request has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs for another 30 days. |
ping @rishabh-d-dave |
This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved |
@manishym Please ping me when this PR is ready. (If possible, please ping me on Slack/IRC/G-chat. Since GH notifications are always too many, usually most of us use this approach) |
This pull request has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs for another 30 days. |
This pull request has been automatically closed because there has been no activity for 90 days. Please feel free to reopen this pull request (or open a new one) if the proposed change is still appropriate. Thank you for your contribution! |
the last commit does not have "Signed-off-by" tag. and please resolve the merge conflicts. |
This pull request has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs for another 30 days. |
Each commit fixes one tracker issue.
Contribution Guidelines
To sign and title your commits, please refer to Submitting Patches to Ceph.
If you are submitting a fix for a stable branch (e.g. "pacific"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.
Checklist
Show available Jenkins commands
jenkins retest this please
jenkins test classic perf
jenkins test crimson perf
jenkins test signed
jenkins test make check
jenkins test make check arm64
jenkins test submodules
jenkins test dashboard
jenkins test dashboard cephadm
jenkins test api
jenkins test docs
jenkins render docs
jenkins test ceph-volume all
jenkins test ceph-volume tox
jenkins test windows