-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Always request version.json from network (no cache) #8350
Always request version.json from network (no cache) #8350
Conversation
21eb27f
to
d89a148
Compare
I haven't checked some PR check items, because I'm not certain what I should do. |
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.
Hmm I'm following the test steps, I changed the version in dist/version.json
from {"version":"1.1.46-3"}
to {"version":"1.1.47-3"}
but I don't get the prompt to update the app nor do I see a new request for version.json. Am I missing something?
test.mov
@luacmartins |
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.
Thanks for the updated testing steps! Left a small comment.
✋ 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 @luacmartins in version: 1.1.51-0 🚀
|
@kidroca @luacmartins @roryabraham |
First off – this only affects web AFAIK not other platforms |
We'll go ahead and assume that the documentation for fetch is accurate, and that it's so fundamental to JavaScript that we don't need to do anything more to validate that it's working. |
Yes, this should only affect web If there's a slack channel that posts a message when a build is starting it can be used to open web while the old version is still actual and then do the test steps after the deploy finishes |
🚀 Deployed to production by @roryabraham in version: 1.1.51-0 🚀
|
🚀 Deployed to production by @roryabraham in version: 1.1.51-0 🚀
|
Details
As explained in the issue comment the only usage for
HttpUtils.download
was in the version check hereInstead of modifying existing code to make
HttpUtils.download
support a cache/no-cache options, we usefetch
directlySince now
HttpUtils.download
has no more usages it can be deletedA problem with the webpack dev config was fixed so that the fix can be tested locally
Fixed Issues
$ #7856
Tests
To test locally modify
src/setup/platformSetup/index.website.js
so that thisApp/src/setup/platformSetup/index.website.js
Lines 63 to 66 in 1c4add7
becomes:
dist/version.json
is created automatically by the webpack dev server - you should have this file after runningnpm run web
./version.json
currentVersion
dist/version.json
to be a greater version thancurrentVersion
./version.json
PR Review Checklist
Contributor (PR Author) Checklist
### Fixed Issues
section aboveTests
sectionQA steps
sectiontoggleReport
and notonIconClick
)src/languages/*
filesSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
displayName
propertythis
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)PR Reviewer Checklist
### Fixed Issues
section aboveTests
sectionQA steps
sectiontoggleReport
and notonIconClick
).src/languages/*
filesSTYLE.md
) were followed/** comment above it */
displayName
propertythis
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)QA Steps
I think this ticket can only be tested after deploying to staging, because we need to be on older version and a new version be released in the meantime
We're primarily verifying there are no regressions and the update check works as expected
All the scenarios below are existing flows and not introduced in the current PR
We're verifying they work as expected
On web/mobile-web
Verify new version is detected during background the app
Verify new version is detected during foregrounding the app
Verify new version is detected during foregrounding the app - alternative
Verify problems due to cache are fixed (the bug in the linked ticket)
Screenshots
Web
New version refreshes in the background
Screen.Recording.2022-03-30.at.3.11.01.mov
New version prompts to refresh page on the foreground
Screen.Recording.2022-03-30.at.3.17.45.mov
Mobile Web
New version available and refreshes App
Screen.Recording.2022-03-30.at.3.19.43.mov
No new version available - no page refresh
Screen.Recording.2022-03-30.at.3.20.28.mov
Android Chrome
Android.Emulator.-.Pixel_2_API_29_5554.2022-03-30.03-32-40.mp4
Desktop
iOS
Android