Change SendPerformanceTiming to be a read so it is not retried and ge…#21457
Conversation
…ts stuck in a loop
|
@aimane-chnaif Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
| } | ||
|
|
||
| API.write('SendPerformanceTiming', { | ||
| API.read('SendPerformanceTiming', { |
There was a problem hiding this comment.
By making it a read it does not get retried nor saved in onyx nor anyhing like that, which for a stats command makes total sense.
There was a problem hiding this comment.
This won't call api again when back online from offline. You meant that?
There was a problem hiding this comment.
Yeah, this is tracking metrics on speed, it's not really important to save every piece of data. And by removing this it means it does not block other actually important requests (both in normal conditions and especially after coming back online since that's when the app becomes unresponsive or outdated)
So it's kind of the solution. I do need to investigate why this failure was not triggering our reauthentication mechanism, when it should've, but that's work for another PR.
| } | ||
|
|
||
| API.write('SendPerformanceTiming', { | ||
| API.read('SendPerformanceTiming', { |
There was a problem hiding this comment.
This won't call api again when back online from offline. You meant that?
| value: eventTime, | ||
| platform: `${getPlatform()}`, | ||
| }); | ||
| }, {}); |
There was a problem hiding this comment.
3rd param is Onyx data and it already defaults to {} here 👇 so I think this change is redundant.
Line 93 in 67f627d
There was a problem hiding this comment.
But there's no default in the API.read method which is the one I am calling...
There was a problem hiding this comment.
That's fine. It's just redirected to makeRequestWithSideEffects. Btw NAB
Lines 129 to 134 in 820fa93
aimane-chnaif
left a comment
There was a problem hiding this comment.
Please fill checklist
|
Done |
Reviewer Checklist
Screenshots/VideosWebweb.movMobile Web - ChromeMobile Web - SafariDesktopiOSAndroid |
|
Oh no engineer assigned as a reviewer. |
|
It does not have the $ because it is not fixing the issue, that is correct |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/amyevans in version: 1.3.33-0 🚀
|
|
🚀 Deployed to production by https://github.com/thienlnam in version: 1.3.33-4 🚀
|
…ts stuck in a loop
Details
Fixed Issues
#21444
Tests
throw new ExpError('asdsad', 'caca', '', [], false, 407);to the backend code ofSendPerformanceTimingApp/src/libs/actions/Timing.js
Lines 49 to 52 in 2cd9b78
Offline tests
No
QA Steps
No
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)/** comment above it */thisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor)thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Web
Mobile Web - Chrome
Mobile Web - Safari
Desktop
iOS
Android