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

Request reattempt fix #418

Merged
merged 2 commits into from
Sep 21, 2018
Merged

Request reattempt fix #418

merged 2 commits into from
Sep 21, 2018

Conversation

Nightsd01
Copy link
Contributor

@Nightsd01 Nightsd01 commented Sep 21, 2018

• Fixes an issue where network requests were not being allowed to finish all allocated reattempts
• Fixes an issue where calling sendTags() (and other requests) with no active internet connection would result in the success block eventually getting called even though the request did not succeed
• Adds regression testing to verify reattempt logic


This change is Reviewable

• Our SDK recently introduced HTTP reattempts for failed (500+) type requests.
• However, our SDK also had a timeout where it would give up on an HTTP request if it took too long
• This became apparent when calls to sendTags() when users had no network connection would, after 60 seconds, call the successBlock
• The success block was being called because the final re-attempt had not yet occurred, so no errors had been populated in the errors dictionary
• Fixed by (A) fixing the timeout to give enough time for all re-attempts to finish and (B) ensuring that there will be an error added to the errors dictionary if a request times out.
• Adds testing to ensure that the reattempt logic works correctly
@Nightsd01 Nightsd01 requested a review from jkasten2 September 21, 2018 18:55
Copy link
Member

@jkasten2 jkasten2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 8 of 8 files at r1.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

@Nightsd01
Copy link
Contributor Author

Due to time constraints we will be merging this PR. The added test is flaky and its failure is only reproducible on Travis.

@Nightsd01 Nightsd01 merged commit 937b44f into master Sep 21, 2018
Nightsd01 added a commit that referenced this pull request Sep 25, 2018
Nightsd01 added a commit that referenced this pull request Sep 25, 2018
Nightsd01 added a commit that referenced this pull request Sep 25, 2018
* revert-412-dynamic_framework:
  Revert "Dynamic framework (#412)"
  Revert "2.8.8 Release"
  Revert "Request reattempt fix (#418)"

# Conflicts:
#	OneSignal.podspec
#	OneSignalDynamic.podspec
#	iOS_SDK/OneSignalSDK/Framework/Dynamic/OneSignal.framework/OneSignal
#	iOS_SDK/OneSignalSDK/Source/OneSignal.m
#	iOS_SDK/OneSignalSDK/UnitTests/UnitTests.m

NOTE: Mistakes during a merge from branch `dynamic_framework` to `master` led to some previous bug fixes being reverted.
• Using a partial revert merge to undo these reversions
@Jeasmine Jeasmine deleted the request_reattempt_fix branch May 12, 2020 22:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants