-
-
Notifications
You must be signed in to change notification settings - Fork 594
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
feat: Enable Parse.idempotency
by default
#2164
Conversation
Thanks for opening this pull request!
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## alpha #2164 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 64 64
Lines 6364 6363 -1
Branches 1507 1509 +2
=========================================
- Hits 6364 6363 -1 ☔ View full report in Codecov by Sentry. |
|
This should have been enabled from the beginning. This is the default behavior of the other SDKs as I mentioned in the OP. I wouldn't consider this a breaking change as wouldn't cause any disruptions to the developers. Adding this request header by default is pretty much useless unless the feature is enabled on the server. If it’s enabled on the server already it’s likely enabled in the SDK A breaking change would be removing the ability to turn it off. |
I'm not sure it should be on by default. That's at least not what I had in mind when I designed the feature. It's costly on server side resources when it's enabled on the server and a minority of users is likely using it. Sending a UID by default from the client to the server without the server using it would not be good practice because that generates unnecessary costs. It could be breaking considering that we change the request headers. An additional header may cause a request to be rejected on tightly configured firewalls. It's like changing a request HTTP method, that would also be a breaking change for the same reason. |
@mtrezza Im closing this as it works for me. From a client side cost side we should purge the other SDKs headers as well from the parse.com days. Can you add documentation so developers can enable this feature since designed it? |
I agree that other client SDKs should also not send the idempotency header by default. For docs see here. |
Pull Request
Issue
There isn't a well documented way to turn idempotency on, enabling it by default only requires configuration on the server side. This is how it is handled in other SDKs
parse-community/Parse-Swift#62
parse-community/Parse-SDK-iOS-OSX#1790
parse-community/Parse-SDK-Android#1190
Approach
POST
/PUT
request method as they are handled by serversTasks