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

Create AnalyticsIndexManager, fix analytics queries, with v3 tests

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 3.0.0-rc
    • None
    • None
    • 1
    • SDK5: Docs, Pathfind Antorized, SDK7: Devguide Antorized, Docs, SDK9: Coll/Txn/Doc chipping

    Description

      When running the analytics tests (nosetests -v couchbase_core/tests/analytics_harness.py) I'm seeing several errors/failures. Seems at least part of the problem is the format of the dict we are returning (having {{results: {}, metrics:{}, where the test only knows about the object inside the results). So - could be entirely test bugs. I'll upload the entire output in a text file.

      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 -

          The above is when hitting a 6.5 server, on Mac.  Oddly enough I also see a couple skips: 

          test_query_00_00_show_dataverse (couchbase_core.tests.analytics_harness.CBASTestQueries) ... SKIP: Real server required
          ...
          test_correct_timeout_in_constructor (couchbase_core.tests.analytics_harness.DeferredAnalyticsTest) ... SKIP: Real server required

          Against a 6.0 server, we see the same error and fails, and skips that seem to make no sense.

          We can either adjust the expected json, or what we return. Possibly a bit of both.

          david.kelly David Kelly added a comment - The above is when hitting a 6.5 server, on Mac.  Oddly enough I also see a couple skips:  test_query_00_00_show_dataverse (couchbase_core.tests.analytics_harness.CBASTestQueries) ... SKIP: Real server required ... test_correct_timeout_in_constructor (couchbase_core.tests.analytics_harness.DeferredAnalyticsTest) ... SKIP: Real server required Against a 6.0 server, we see the same error and fails, and skips that seem to make no sense. We can either adjust the expected json, or what we return. Possibly a bit of both.
          david.kelly David Kelly added a comment -

          First off - the format that is returned seems to be {results:[{}], metrics: {}}, yet the expected is just the [{}] of the results.  Lets start there - the tests should remove the metrics as part of the sanitization process (perhaps?).

          david.kelly David Kelly added a comment - First off - the format that is returned seems to be {results: [{}] , metrics: {}}, yet the expected is just the [{}] of the results.  Lets start there - the tests should remove the metrics as part of the sanitization process (perhaps?).
          david.kelly David Kelly added a comment -

          Now that we have the v3 interface in place, really all these fails are due to small differences in how things are returned.

          So – perhaps all we should do here is convert to v3. Also there is a lot of machinery in these tests, perhaps we can simplify that? I feel like this is less important then getting some semblance of combination tests running. So – I'll switch over to that, and come back to this as part of the v2->v3 push

          david.kelly David Kelly added a comment - Now that we have the v3 interface in place, really all these fails are due to small differences in how things are returned. So – perhaps all we should do here is convert to v3. Also there is a lot of machinery in these tests, perhaps we can simplify that? I feel like this is less important then getting some semblance of combination tests running. So – I'll switch over to that, and come back to this as part of the v2->v3 push
          david.kelly David Kelly added a comment - - edited

          Moving into 3.0.0.rc since:

          • There is no AnalyticsIndexManager at all
          • There are no v3 tests for Analytics at all
            But there is the a Cluster.analytics_query call with the correct interface. So...
          • create the AnalyticsIndexManager
          • create tests for the AnalyticsIndexManager
          • create minimal tests for the v3 interface of analytics_query. Similar to the existing v3 for query.

          As a side note, we probably have to do this for FTS as well. But I believe Ellis Breen has a PR started for the interface rework, so I'm sure he's on that one.

          david.kelly David Kelly added a comment - - edited Moving into 3.0.0.rc since: There is no AnalyticsIndexManager at all There are no v3 tests for Analytics at all But there is the a Cluster.analytics_query call with the correct interface. So... create the AnalyticsIndexManager create tests for the AnalyticsIndexManager create minimal tests for the v3 interface of analytics_query. Similar to the existing v3 for query. As a side note, we probably have to do this for FTS as well. But I believe Ellis Breen has a PR started for the interface rework, so I'm sure he's on that one.
          david.kelly David Kelly added a comment -

          Also – analytics queries that used the AnalyticsOptions didn't really work. Fixed that too

          david.kelly David Kelly added a comment - Also – analytics queries that used the AnalyticsOptions didn't really work. Fixed that too

          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