Project

General

Profile

Actions

Bug #54003

closed

cephadm/ssh.py: Failed run-tox-mgr test in Jenkins builds due to incompatible types

Added by Laura Flores about 2 years ago. Updated about 2 years ago.

Status:
Resolved
Priority:
High
Category:
orchestrator
Target version:
-
% Done:

0%

Source:
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

Affects Jenkins 'make check' tests.

https://jenkins.ceph.com/job/ceph-pull-requests/89073/
https://jenkins.ceph.com/job/ceph-pull-requests/89074/

cephadm/module.py:45: note: In module imported here,
cephadm/__init__.py:1: note: ... from here:
cephadm/ssh.py:15: error: Incompatible types in assignment (expression has type "None", variable has type Module)
cephadm/ssh.py: note: In member "_remote_connection" of class "SSHManager":
cephadm/ssh.py:88: error: Incompatible types in assignment (expression has type "Optional[SSHClientConnection]", variable has type "SSHClientConnection")
cephadm/ssh.py: note: In member "_execute_command" of class "SSHManager":
cephadm/ssh.py:147: error: Item "None" of "Union[bytes, str, None]" has no attribute "rstrip" 
cephadm/ssh.py:147: error: Argument 1 to "rstrip" of "bytes" has incompatible type "str"; expected "Optional[bytes]" 
cephadm/ssh.py:148: error: Item "None" of "Union[bytes, str, None]" has no attribute "rstrip" 
cephadm/ssh.py:148: error: Argument 1 to "rstrip" of "bytes" has incompatible type "str"; expected "Optional[bytes]" 
cephadm/ssh.py:149: error: Incompatible return value type (got "Tuple[Union[bytes, str, Any], Union[bytes, str, Any], Optional[int]]", expected "Tuple[str, str, int]")
cephadm/__init__.py:1: note: In module imported here:
cephadm/module.py:66: error: Incompatible types in assignment (expression has type "None", variable has type Module)
Found 8 errors in 2 files (checked 31 source files)
ERROR: InvocationError for command /home/jenkins-build/build/workspace/ceph-pull-requests/src/pybind/mgr/.tox/mypy/bin/mypy --config-file=../../mypy.ini -m alerts -m balancer -m cephadm -m crash -m dashboard -m devicehealth -m diskprediction_local -m hello -m influx -m iostat -m localpool -m mds_autoscaler -m mgr_module -m mgr_util -m mirroring -m nfs -m orchestrator -m pg_autoscaler -m progress -m prometheus -m rbd_support -m rook -m snap_schedule -m selftest -m stats -m status -m telegraf -m telemetry -m test_orchestrator -m volumes -m zabbix (exited with code 1)

Actions #1

Updated by Ronen Friedman about 2 years ago

I'd suggest upgrading the priority, as this bug stops all merges.

Actions #2

Updated by Laura Flores about 2 years ago

  • Priority changed from Normal to High
Actions #3

Updated by Laura Flores about 2 years ago

  • Pull request ID set to 44760
Actions #4

Updated by Michael Fritch about 2 years ago

asyncssh 2.9 was recently released with additional type hints

https://pypi.org/project/asyncssh/2.9.0/#history

Actions #5

Updated by Michael Fritch about 2 years ago

  • Pull request ID changed from 44760 to 44761
Actions #6

Updated by Michael Fritch about 2 years ago

  • Category set to orchestrator
  • Status changed from New to Fix Under Review
  • Assignee set to Michael Fritch
Actions #7

Updated by Laura Flores about 2 years ago

  • Status changed from Fix Under Review to Resolved
Actions

Also available in: Atom PDF