Every sdk upgrade has become a nightmare

Hi,
I just upgraded to node sdk 4.2 and nothing works again.
I am querying a view and trying to filter by key but I noticed already 2 big differences:
1-It doesn’t return the full set for development view by default anymore. I never even know of the existence of this option in the sdk and my test has always worked fine, so the behaviour changed.It took me a while to understand what was going on.
2-I cannot even filter by key, it’s not working at all. I tried everything but I cannot do it.
I saw there was a bug from 2022 and you closed it as fixed but I think you fixed some scenario and broke something else, because it is not working right now and somebody else already mentioned it in January in github.
I noticed if I remove the key from the viewquery the result is not the real key but it enclosed in additional double quotes.

Please have a look and don’t change the default behaviour from previous sdk again, cause it is a real nightmare to debug.

I went back to 4.1.3 and at least the filter by key seem to be working, but at server start up sometime I get zero results, while there should be.
Probably something didn’t initialize yet and it would be simple to avoid if it would go back to the usual way of exposing a simple method of knowing when the connection is ready, instead of caching all the calls, which is another super breaking change from the old sdk and after more than 2 years we are still having issues.
If you want to go this risky way it’s fine but why not let us do the old way and play it safe?

The sdk version wasn’t fixing anything.
Upon further testing it seem the problem lies mainly in the fullSet option.
I don’t see that option being passed anywhere in the viewexecutor.js when calling documentView method.
If I publish the view it seem to work fine, at least for what I tested so far.

Please open an issue at support.couchbase.com or issues.couchbase.com so someone can investigate.

I cannot login to Jira anymore. I reset the password and it still says the password is wrong…

I had to create a new account but if you could unfreeze my old one(same nickname as here) I would be grateful.
The bug report is JSCBC-1202.

1 Like

Thank you. I’ve opened an internal ticket 28782 to restore your 00christian00 jira account. I don’t work on the nodejs sdk, but if you have further concerns you can tag me.

1 Like

Internal Support told me that you should go to https://support.couchbase.com/hc/en-us to get your old jira account restored. So you’ll likely have to create an account there as well (sorry).

Creating a Support Portal Account

The Couchbase Support Portal allows self service creation of user accounts.

If you do not already have an account, you can sign up for one using your company email address by clicking the Sign in button above, and choosing the Sign up option at the bottom of the dialog.

Once you have verified your email address, we will automatically use the domain of your email address to associate you with any Support entitlements. From here, you can raise tickets or check existing requests.

I’ll stick with the new account then…

1 Like

Another bug on views. I am starting to wonder if anybody test these before shipping.
On sdk 3.x before everything was rewritten in typescript, the sdk returned keys as normal with single quotes.
Now with 4.x has additional double quotes, see for example :
ViewRow {
value: null,
key: ‘“62eba17d3d800000”’,
id: ‘u#62eba17d3d800000’
},

I’ve opened a case Loading... for this.
To complete the information on the case, can you show the view definition and also the document (from the webui → Bucket → Documents → then click on the document id to get the pop-up, then click on “Meta”).

Thanks,

  • Mike

Hi, it happen in all views, I tried firing the old sdk and it returns the results without double quotes on the same database. The error is in the keys, not in the id meta. See my comment on JIRA.

function (doc, meta) {
                        if(doc.type=='user')
                        emit(doc.UUID, null);
                      }

Sample doc:

{
  "type": "user",
  "guest": 1,
  "UUID": "62eba17d3e000000"
}

meta of the doc,although irrelevant for the view, since the double quotes are on the key which in this case is generated from the field UUID:

{
  "id": "u#62eba17d3e000000",
  "rev": "1-17959fc385a300000000000002000000",
  "expiration": 0,
  "flags": 33554432
}

Thanks for all the details. That’s pretty clear.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.