Details
-
Bug
-
Resolution: Fixed
-
Blocker
-
7.6.0
-
Untriaged
-
0
-
Yes
Description
What's the issue?
Recently tests started failing for the backup repo. I attached the failing test logs. The error we were getting is:
'Traceback (most recent call last):
|
File "/home/couchbase/jenkins/workspace/backup_integration_tests_master/source/install/lib/python/cbstats", line 18, in <module> |
cbstats.main()
|
File "/home/couchbase/jenkins/workspace/backup_integration_tests_master/source/install/lib/python/cbstats.py", line 1114, in main |
c.execute()
|
File "/home/couchbase/jenkins/workspace/backup_integration_tests_master/source/install/lib/python/clitool.py", line 83, in execute |
f[0](mc, *args[2:], **opts.__dict__) |
File "/home/couchbase/jenkins/workspace/backup_integration_tests_master/source/install/lib/python/cbstats.py", line 66, in g |
f(*args, **kwargs)
|
File "/home/couchbase/jenkins/workspace/backup_integration_tests_master/source/install/lib/python/cli_auth_utils.py", line 42, in g |
spec = inspect.getargspec(f)
|
^^^^^^^^^^^^^^^^^^
|
AttributeError: module 'inspect' has no attribute 'getargspec'. Did you mean: 'getargs'?' should be empty. |
We tracked down the error to come from: https://github.com/couchbase/kv_engine/blob/b33dfe1db102f314b378b599c56189f941405f04/engines/ep/management/cli_auth_utils.py#L42C37-L42C37
It seems that recently the python version used in the couchbase build was upgraded from 3.9 to 3.11 which caused this code to start failing since the function `inspect.getargspec` was deprecated in 3.9 however it was removed altogether in 3.11.
The ticket that upgraded the python version: https://issues.couchbase.com/browse/MB-57567
What's the fix?
We should probably fix this by using the new functions instead of the deprecated ones.
Attachments
Issue Links
- is duplicated by
-
MB-58258 AttributeError: module 'inspect' has no attribute 'getargspec'. Did you mean: 'getargs'?
- Closed