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

Collection tests failing on 7.0

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.0.5
    • 3.0.6
    • library
    • None
    • 1
    • SDK 42: Txns/Connect/Docs/3.1

    Description

      The issue is in parsing exceptions.  The tests fail because they expect specific exceptions, but the http error parsing is failing.  7.0 seems to have changed how the exceptions are structured/nested.  

       

      We should maybe be less sensitive to the structure - will look at doing that.

      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 -

          An Example:

          <Key='pools/default/buckets/other-bucket/collections/_default', RC=0x41D[LCB_ERR_HTTP (1053)], HTTP Request failed. Examine 'objextra' for full result, Results=1, C Source=(src/pycbc_http.c,212), OBJ=HttpResult<rc=0x0, value=\{'errors': {'_': 'Collection with name "other-collection" in scope "_default" already exists'}}, http_status=400, url=pools/default/buckets/other-bucket/collections/_default, tracing_context=0, tracing_output=None>, Context=\{'response_code': 400, 'path': '/pools/default/buckets/other-bucket/collections/_default', 'response_body': '{"errors":{"_":"Collection with name \\"other-collection\\" in scope \\"_default\\" already exists"}}', 'endpoint': '172.23.111.128:8091', 'type': 'HTTPErrorContext'}, Tracing Output=\{":nokey:0": null}>
          

          specifically the

          errors': {'_': 'Collection with name "other-collection" in scope "_default" already exists'}
          

          The parsing expects "name" not "_" for the key in that dict. The parsing is really complicated as different versions have a different structure. Thinking about a better way...

          david.kelly David Kelly added a comment - An Example: <Key='pools/default/buckets/other-bucket/collections/_default', RC=0x41D[LCB_ERR_HTTP (1053)], HTTP Request failed. Examine 'objextra' for full result, Results=1, C Source=(src/pycbc_http.c,212), OBJ=HttpResult<rc=0x0, value=\{'errors': {'_': 'Collection with name "other-collection" in scope "_default" already exists'}}, http_status=400, url=pools/default/buckets/other-bucket/collections/_default, tracing_context=0, tracing_output=None>, Context=\{'response_code': 400, 'path': '/pools/default/buckets/other-bucket/collections/_default', 'response_body': '{"errors":{"_":"Collection with name \\"other-collection\\" in scope \\"_default\\" already exists"}}', 'endpoint': '172.23.111.128:8091', 'type': 'HTTPErrorContext'}, Tracing Output=\{":nokey:0": null}> specifically the errors': {'_': 'Collection with name "other-collection" in scope "_default" already exists'} The parsing expects "name" not "_" for the key in that dict. The parsing is really complicated as different versions have a different structure. Thinking about a better way...

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty