Skip to content
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

Toggle Persistant Changes #850

Open
jnoren1 opened this issue Jun 19, 2023 · 4 comments
Open

Toggle Persistant Changes #850

jnoren1 opened this issue Jun 19, 2023 · 4 comments

Comments

@jnoren1
Copy link

jnoren1 commented Jun 19, 2023

Per the documentation (link below) any changes made to the input binding are persisted back to the database when the function ends. Can a toggle or parameter be added to adjust this feature?

https://learn.microsoft.com/en-us/azure/azure-functions/functions-bindings-cosmosdb-v2-input?tabs=python-v2%2Cin-process%2Cextensionv4&pivots=programming-language-csharp#http-trigger-get-multiple-docs-using-cosmosclient-c

Repro steps

Changes to a document are started based on input from an HTTP request but validation ultimately fails at a server level. Under the current setup, either, changes have to be made on a dummy model and then applied to the bound model after validation passes or the changes have to be rolled back.

Hoped for behavior

A toggle added (that defaults to preserving current functionality) that would prevent writeback to the database.

@ghost ghost added the Needs: Triage 🔍 label Jun 19, 2023
@bhagyshricompany bhagyshricompany self-assigned this Jun 20, 2023
@bhagyshricompany
Copy link

bhagyshricompany commented Jun 20, 2023

@jnoren1 Thanks for reporting will check and update you.

@bhagyshricompany
Copy link

bhagyshricompany commented Jul 4, 2023

you can consider using output bindings to explicitly control the writeback behavior. By separating the input and output bindings, you can have more control over when and how changes are persisted to the database.

@jnoren1
Copy link
Author

jnoren1 commented Jul 4, 2023 via email

@bhagyshricompany
Copy link

@fabiocav pls comment and validate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants