Project

General

Profile

Bug #54003

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

Added by Laura Flores 11 months ago. Updated 11 months 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):
Tags:

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)

History

#1 Updated by Ronen Friedman 11 months ago

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

#2 Updated by Laura Flores 11 months ago

  • Priority changed from Normal to High

#3 Updated by Laura Flores 11 months ago

  • Pull request ID set to 44760

#4 Updated by Michael Fritch 11 months ago

asyncssh 2.9 was recently released with additional type hints

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

#5 Updated by Michael Fritch 11 months ago

  • Pull request ID changed from 44760 to 44761

#6 Updated by Michael Fritch 11 months ago

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

#7 Updated by Laura Flores 11 months ago

  • Status changed from Fix Under Review to Resolved

Also available in: Atom PDF