pacific: cephadm: pin flake8 to 5.0.4#49058
Conversation
to workaround zheller/flake8-quotes#110 flake8 v5.0.4 is the last known-to-work flake8 before flake8 v6.0.0. Fixes: https://tracker.ceph.com/issues/58069 Signed-off-by: Kefu Chai <tchaikov@gmail.com> (cherry picked from commit ecb3fb1)
to silence the warning like ``` flake8 run-test: commands[0] | flake8 --select=F,E9 --exclude=venv,.tox ./tasks/cephfs/test_full.py:6:5: F401 'typing.Optional' imported but unused ``` since we've migrated to python3.6 and up, there is no need to be compatible with Python 2 anymore. Signed-off-by: Kefu Chai <tchaikov@gmail.com> (cherry picked from commit 2413da8) Conflicts: qa/tasks/cephfs/test_full.py [ commit 485841b ("qa: import CommandFailedError from exceptions not run") not in pacific ]
|
Hrm, there seems to be an additional, pacific-only unused import: This is due to: While |
d8c60a4 to
89f684e
Compare
|
Pushed an additional pacific-only change: |
* use annotation style without comment * add noqa to import statement to prevent flake8 from complaining those which import typing modules to silence the warnings like: ``` flake8 run-test: commands[0] | flake8 --config=tox.ini alerts balancer cephadm cli_api crash devicehealth diskprediction_local hello iostat localpool nfs orchestrator prometheus selftest cephadm/schedule.py:5:1: F401 'typing.Callable' imported but unused cephadm/schedule.py:8:1: F401 'ceph.deployment.service_spec.ServiceSpec' imported but unused cephadm/tests/fixtures.py:17:1: F401 'orchestrator.OrchResult' imported but unused orchestrator/module.py:4:1: F401 'typing.Set' imported but unused orchestrator/module.py:17:1: F401 'ceph.deployment.inventory.Device' imported but unused prometheus/module.py:17:1: F401 'typing.DefaultDict' imported but unused 6 F401 'typing.Callable' imported but unused ERROR: InvocationError for command /home/jenkins-build/build/workspace/ceph-pull-requests/src/pybind/mgr/.tox/flake8/bin/flake8 --config=tox.ini alerts ``` Signed-off-by: Kefu Chai <tchaikov@gmail.com> (cherry picked from commit 7894e7b) Conflicts: src/pybind/mgr/orchestrator/module.py [ commit 28314ce ("mgr/cephadm: Adding support for natural sorting") not in pacific ] src/pybind/mgr/cephadm/services/exporter.py [ additional pacific-only change, this file doesn't exist in main ]
89f684e to
03f21fd
Compare
|
jenkins test api |
|
Rados suite review by @amathuria: https://pulpito.ceph.com/?branch=wip-yuri10-testing-2022-11-28-1042-pacific Failures, unrelated: |
Backport #49040 to pacific.