-
Notifications
You must be signed in to change notification settings - Fork 61
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
RUM-5564 increase retry delay on DNS error #2135
Conversation
internal class DNSErrorStatusForgeryFactory : ForgeryFactory<UploadStatus.DNSError> { | ||
|
||
override fun getForgery(forge: Forge): UploadStatus.DNSError { | ||
return UploadStatus.DNSError |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we need a factory here which only returns one single type of enum ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not an enum but an object as part of a sealed class
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
even so in this case this factory only returns one value of that UploadStatus
sealed class. Wouldn't it be more simple to just add this value in your test data without using forge ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Except for that Forge factory which I don't think is needed this LGTM
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #2135 +/- ##
===========================================
+ Coverage 70.00% 70.01% +0.01%
===========================================
Files 726 726
Lines 26970 26996 +26
Branches 4521 4524 +3
===========================================
+ Hits 18879 18901 +22
- Misses 6817 6834 +17
+ Partials 1274 1261 -13
|
What does this PR do?
When a DNS issue prevents the SDK from reaching our intake hosts, we increase the delay to avoid an infinite loop.
Motivation
By default our retry loop can be quite frequent, but DNS issues often take some time to be fixed. Although an actual issue in our DNS registration is unlikely, there seems to also be some issues on some networks preventing the devices from resolving the intake host address.
Additional Notes
Relates to #2131