-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[No QA] Fix prod web deploys #46152
[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 🚀
|
@@ -346,10 +346,10 @@ jobs: | |||
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 }}/.well-known/apple-app-site-association | |||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
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.
😂
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 Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop