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

[CV] [CLI] Fix mypy failure in CV

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Unresolved
    • Major
    • None
    • None
    • None
    • 0

    Description

      What's the issue?
      The CLI is failing with the following error

      Failed mypy type checking in cbbackup
      Re running: mypy --ignore-missing-imports cbbackup
      x509_adapter.py:28: error: Library stubs not installed for "OpenSSL.crypto" [import] x509_adapter.py:28: note: Hint: "python3 -m pip install types-pyOpenSSL" x509_adapter.py:29: error: Library stubs not installed for "OpenSSL.SSL" [import] x509_adapter.py:30: error: Library stubs not installed for "requests.adapters" [import] x509_adapter.py:31: error: Library stubs not installed for "requests.packages.urllib3.contrib.pyopenssl" [import] cluster_manager.py:13: error: Library stubs not installed for "requests" [import] cluster_manager.py:13: note: Hint: "python3 -m pip install types-requests" cluster_manager.py:13: note: (or run "mypy --install-types" to install all missing stub packages) cluster_manager.py:13: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports pump.py:42: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked] pump.py:43: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked] pump.py:44: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked] pump_json.py:22: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked] pump_sfd.py:197: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked] pump_sfd.py:283: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked] pump_mc.py:103: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked] pump_mc.py:104: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked] pump_mc.py:106: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked] pump_bfd.py:677: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked] Found 5 errors in 2 files (checked 1 source file)
      

      What's the fix?
      As the error message suggests, install types-pyOpenSS and types-requests along with the other dependencies that are already being installed in the Jenkinsfile.

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            safian.ali Safian Ali
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty