pa11y-webservice icon indicating copy to clipboard operation
pa11y-webservice copied to clipboard

Sort in CosmosDB Mongo APIs mandates indexing

Open iamsethi opened this issue 2 years ago • 2 comments

Expected behaviour

Pa11y dashboard should be able to integrate with Azure Cosmos DB for MongoDB

Actual behaviour

[model:task:getAll failed
Error=2, Details='Response status code does not indicate success: BadRequest (400); Substatus: 0; ActivityId: db9c9b1c-6eb2-43d9-8422-0df2991f8822; Reason: (Response status code does not indicate success: BadRequest (400); Substatus: 0; ActivityId: db9c9b1c-6eb2-43d9-8422-0df2991f8822; Reason: (Response status code does not indicate success: BadRequest (400); Substatus: 0; ActivityId: db9c9b1c-6eb2-43d9-8422-0df2991f8822; Reason: (Message: {"Errors":["The order by query does not have a corresponding composite index that it can be served from."]}
ActivityId: db9c9b1c-6eb2-43d9-8422-0df2991f8822, Request URI: /apps/d76a7012-7f63-444d-b353-8a54be2d58d5/services/f84105c4-7e32-44bf-9ebf-abc37440863d/partitions/771dbbb2-eae7-45cf-bc90-14f8bc3e5295/replicas/133203351083477204s/, RequestStats: Microsoft.Azure.Cosmos.Tracing.TraceData.ClientSideRequestStatisticsTraceDatum, SDK: Windows/10.0.17763 cosmos-netstandard-sdk/3.18.0);););

Error: Error 500
    at Request._callback (C:\Users\80992798\pa11y-dashboard\node_modules\pa11y-webservice-client-node\lib\client.js:124:16)
    at Request.self.callback (C:\Users\80992798\pa11y-dashboard\node_modules\request\request.js:185:22)
    at Request.emit (events.js:315:20)
    at Request.<anonymous> (C:\Users\80992798\pa11y-dashboard\node_modules\request\request.js:1154:10)
    at Request.emit (events.js:315:20)
    at IncomingMessage.<anonymous> (C:\Users\80992798\pa11y-dashboard\node_modules\request\request.js:1076:12)
    at Object.onceWrapper (events.js:421:28)
    at IncomingMessage.emit (events.js:327:22)
at endReadableNT (internal/streams/readable.js:1327:12)
at processTicksAndRejections (internal/process/task_queues.js:80:21)](url)

Steps to reproduce

Connect to cosmos DB by azure

iamsethi avatar Feb 08 '23 17:02 iamsethi

Hey @iamsethi, thanks for your report. I know it's been a while but did you manage to find a fix, or get closer to one?

For now I'll move this to pa11y-webservice's issues as that's where the problem seems to be.

pa11y-dashboard uses pa11y-webservice-client-node to speak to pa11y-webservice which speaks to MongoDB.

danyalaytekin avatar Nov 10 '23 01:11 danyalaytekin

Will revisit once the issue described here has been resolved, since this will be the way to test any work, as far as I can tell:

  • https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/86

danyalaytekin avatar Mar 18 '24 00:03 danyalaytekin