-
Notifications
You must be signed in to change notification settings - Fork 205
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
Comments
ghost
added
the
Needs: Triage 🔍
label
Jun 19, 2023
@jnoren1 Thanks for reporting will check and update you. |
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. |
I agree with your response in theory and that is what I was hoping to accomplish. I am using C# http jobs. Unfortunately, those do not have separate input/output binding, only a single combined binding. I think it has to do with async functions not permitting the “out” parameters. It tripped me up for a while because the document listed them as input bindings and there is a document listed as output bindings, but further down in the document there is a single line that says essentially "all changes to the object are automatically written back to the database" after the function returns. Basically what I am looking for is a way to guarantee that read-only input binding for the c# http functions, or better some kind toggle.
|
@fabiocav pls comment and validate. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The text was updated successfully, but these errors were encountered: