Repository navigation
[No QA] Fix prod web deploys - #46152
Conversation
|
@ 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] |
Reviewer Checklist
Screenshots/VideosAndroid: NativeAndroid: mWeb ChromeiOS: NativeiOS: mWeb SafariMacOS: Chrome / SafariMacOS: Desktop |
[No QA] Fix prod web deploys (cherry picked from commit 411f136)
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Cherry-picked to staging by https://github.com/luacmartins in version: 9.0.11-5 🚀
|
|
🚀 Cherry-picked to staging by https://github.com/luacmartins in version: 9.0.11-5 🚀
|
|
🚀 Deployed to production by https://github.com/francoisl in version: 9.0.11-5 🚀
|
|
🚀 Deployed to staging by https://github.com/luacmartins in version: 9.0.12-0 🚀
|
|
🚀 Deployed to production by https://github.com/francoisl in version: 9.0.12-0 🚀
|
| aws s3 cp --acl public-read --content-type 'application/json' --metadata-directive REPLACE ${{ env.S3_URL }}/.well-known/apple-app-site-association ${{env.S3_URL }}/apple-app-site-association | ||
| env: | ||
| S3_URL: s3://${{ fromJSON(env.SHOULD_DEPLOY_PRODUCTION) && '' || 'staging-' }}expensify-cash | ||
| S3_URL: s3://${{ env.SHOULD_DEPLOY_PRODUCTION != 'true' && 'staging-' || '' }}expensify-cash |
There was a problem hiding this comment.
The code was confusing to me before and is still confusing to me now. Is this code equivalent?
S3_URL: s3://${{ env.SHOULD_DEPLOY_PRODUCTION != 'true' ? 'staging-' : '' }}expensify-cash
And if so, why not write that which IMO is a lot more clearer than the current code?
There was a problem hiding this comment.
GH actions syntax doesn't support that kind of ternary - https://docs.github.com/en/actions/learn-github-actions/expressions#example
There was a problem hiding this comment.
That's so bad.... seems people asked for it but they did not add it actions/runner#409
Someone even pointed out the bug here actions/runner#409 (comment)
Fuck GH really
Details
web prod deploys were broken in #45364. The root cause of this error was a subtle bug in the ternary we were using to generate the S3 URL used to upload the build. See https://docs.github.com/en/actions/learn-github-actions/expressions#example - there's an important note that was missed:
That's exactly what the problem was here. We had
${{ fromJSON(env.SHOULD_DEPLOY_PRODUCTION) && '' || '-staging' }}, and because''is falsey we were always falling back to'-staging'. Whoops! 😓Fixed Issues
$ n/a - https://expensify.slack.com/archives/C07J32337/p1721856273594219
Tests
Run a prod deploy and verify that the version updates to the new version we intended to deploy.
Offline tests
None.
QA Steps
None.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.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
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop