-
Notifications
You must be signed in to change notification settings - Fork 494
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The client is allowing creating invalid element in Cosmos that cannot be deleted or accessed #1908
Comments
The item can be deleted using the following guide. The reason the SDK does not have the logic is it adds a lot of overhead. For creates the id is just in the body of the item. It would require the SDK to extract that id then validate the value. Then validate the id. This checks needs to be added in the service, but there are some hard problems with avoiding breaking customers that have items with invalid ids. All service request should be posted at https://feedback.azure.com/forums/263030-azure-cosmos-db?query=id |
Thanks it helped :) Could you add a link to this, from where the doc talk about invalid ids ? here
For the sdk I see multiple possibilities:
|
I just ran in the same issue - we were able to create documents with IDs, which doesn't allow us to retrieve the same documents by their IDs anymore. You could even add an option (maybe to Microsoft.Azure.Cosmos.CosmosClient?) to use the old "quick'n'dirty" behavior. Of course, the best place to fix it, might be the server itself. This way no client would be allowed to create documents with Ids which cannot be retrieved anymore. |
This needs to be implemented by the service. The SDK should not be doing this validation. Please contact support to have the Cosmos DB service add the required checks. |
@j82w Already reported using the support last year, it took 3 weeks to the one in charge of our ticket to understand we wanterd to repot a bug and nothing has been done since, do you have a direct contact with the team in charge and let them know ? |
@Socolin Can you fill out this short form w/ the details of the ticket https://forms.office.com/r/qpY2yZUVBq? I can follow up with the team in charge on the status of this ask and reach out to you! |
I'm getting the following error message on your link: "You don't have permission to view or respond to this form" |
I've fixed the permission issue. Should be working now! |
Closing due to in-activity, pease feel free to re-open. |
Hello
I have some invalid elements that were created in a cosmos (containting
/
in the key) and I cannot delete them, do you have any solution about that ?It would be great if this error could be catch sooner (server validation ? client validation too)
From https://docs.microsoft.com/en-us/dotnet/api/microsoft.azure.documents.resource.id?view=azure-dotnet
The id fields should be at least validated client side to catch the problem sooner than when trying to delete an invalid entity that cannot be deleted (event with the bulk)
To Reproduce
ReproCosmos.zip
Expected behavior
Actual behavior
No error until trying to read it or delete it
Environment summary
SDK Version: 3.13.0
OS Version Windows 10
The text was updated successfully, but these errors were encountered: