Uploaded image for project: 'Couchbase Python Client Library'
  1. Couchbase Python Client Library
  2. PYCBC-708

Several similar admin test failures

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.0.0-beta.1
    • 3.0.0-beta.2
    • tests
    • None
    • 1

    Description

      There are a number of them that all have the same stack:

      ======================================================================
      ERROR: test_timeout (couchbase_tests.test_sync.transplant_class.<locals>.C)
      ----------------------------------------------------------------------
      Traceback (most recent call last):
        File "/home/ubuntu/couchbase-python-client/couchbase_core/exceptions.py", line 851, in wrapped
          return func(*args, **kwargs)
        File "/home/ubuntu/couchbase-python-client/couchbase/management/users.py", line 239, in get_all_groups
          **forward_args(kwargs, *options))
        File "/home/ubuntu/couchbase-python-client/couchbase/management/admin.py", line 161, in http_request
          timeout=timeout)
      couchbase_core.exceptions.HTTPError: <Key='/settings/rbac/groups/', RC=0x3B[HTTP Operation failed. Inspect status code for details], HTTP Request failed. Examine 'objextra' for full result, Results=1, C Source=(src/pycbc_http.c,154), OBJ=HttpResult<rc=0x0, value=b'Not found.', http_status=404, url=/settings/rbac/groups/, tracing_context=0, tracing_output=None>, Tracing Output={":nokey:0": null}>
       
      During handling of the above exception, another exception occurred:
       
      Traceback (most recent call last):
        File "/home/ubuntu/couchbase-python-client/couchbase/tests_v3/cases/usermgmt_t.py", line 122, in test_timeout
          self.um.get_all_groups(timeout=0.1)
        File "<boltons.funcutils.FunctionBuilder-31>", line 2, in get_all_groups
        File "/home/ubuntu/couchbase-python-client/couchbase_core/exceptions.py", line 859, in wrapped
          if pattern.match(value):
      TypeError: cannot use a string pattern on a bytes-like object
       
      ----------------------------------------------------------------------
      

      Note there are 2 issues – first we have what appears to be a 404, and then making the exception creates another exception. Lets fix both issues.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          david.kelly David Kelly added a comment - - edited

          taking this one. Note a couple are the same as this, and are not admin. But they all seems to be along the lines of "I looked for something that should be there, and it isn't", and _then we get a second exception handling that. I'll first fix that second exception (so we don't hide it and forget), then look at why we are not finding things.

          david.kelly David Kelly added a comment - - edited taking this one. Note a couple are the same as this, and are not admin. But they all seems to be along the lines of "I looked for something that should be there, and it isn't", and _then we get a second exception handling that. I'll first fix that second exception (so we don't hide it and forget), then look at why we are not finding things.
          david.kelly David Kelly added a comment -

          The tests 404 because the feature (groups in this case) are not supported when running against a 6.0 server. So - I need to handle the 6.0 vs 6.5 stuff, and that deals with the 404 in the first place. But still need to convert the 'value' in the HTTPError to a string in general to prevent the other exception if that happens for different reasons. PR coming...

          david.kelly David Kelly added a comment - The tests 404 because the feature (groups in this case) are not supported when running against a 6.0 server. So - I need to handle the 6.0 vs 6.5 stuff, and that deals with the 404 in the first place. But still need to convert the 'value' in the HTTPError to a string in general to prevent the other exception if that happens for different reasons. PR coming...

          People

            david.kelly David Kelly
            david.kelly David Kelly
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty