Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-58222

cli_auth_utils broken after Python upgrade from 3.9 to 3.11

    XMLWordPrintable

Details

    • 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

          For Gerrit Dashboard: MB-58222
          # Subject Branch Project Status CR V

          Activity

            People

              ashwin.govindarajulu Ashwin Govindarajulu
              Gvidas.Razevicius Gvidas Razevicius
              Votes:
              0 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty