-
Notifications
You must be signed in to change notification settings - Fork 3.2k
[No QA] Fix prod deploy GitHub comments #47530
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
Conversation
@ikevin127 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] |
@ikevin127 no C+ review needed here |
.github/actions/javascript/getDeployPullRequestList/getDeployPullRequestList.ts
Outdated
Show resolved
Hide resolved
Reviewer Checklist
Screenshots/VideosAndroid: NativeAndroid: mWeb ChromeiOS: NativeiOS: mWeb SafariMacOS: Chrome / SafariMacOS: Desktop |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
…ents [No QA] Fix prod deploy GitHub comments (cherry picked from commit c7d4c5f) (CP triggered by Beamanator)
🚀 Cherry-picked to staging by https://github.com/Beamanator in version: 9.0.21-3 🚀
|
🚀 Deployed to production by https://github.com/Beamanator in version: 9.0.21-4 🚀
|
🚀 Deployed to production by https://github.com/Beamanator in version: 9.0.21-4 🚀
|
Details
I've attempted to explain this PR clearly in code comments. But this PR accomplishes three things.
Problem: production deploys are being compared to themself
When a production deploy completes, no PRs are listed to be marked for deploy. What's happening here is:
1. staging deploy for the final version in a checklist (i.e:
9.0.20-6
) finishes1. production deploy looks for the last completed production deploy by listing recent workflow runs. The most recent workflow run is the staging deploy for
9.0.20-6
. But there's nothing in the workflow run that shows theevent.action
that triggered it - it just saysevent: release
for both staging and production deploys.1. So we look at the GitHub Release to check if it's a prerelease or not. However, by the time this action runs (at the end of the prod deploy),
9.0.20-6
is a final release, so it looks like a prod deploy.1. Then we end up comparing
9.0.20-6
to9.0.20-6
, which yields no results 💥Solution
Never allow a version to be compared with itself when running
git log startTag...endTag
.Problem: staging deploys are skipping a version
When a checklist is closed, one (or more) extra PR that's already been deployed to prod is included in the next checklist. What's happening here is:
1.
9.0.20-6
is the most recent staging deploy, then we close the checklist.1.
9.0.20-6
becomes a final release.1.
9.0.21-0
looks for the most recent staging deploy, but when it checks9.0.20-6
, it looks like a prod deploy.1. So it then looks at the last completed staging deploy (in this case it was actually
9.0.20-4
because9.0.20-5
was cancelled in progress)1. Then we end up with
git log 9.0.20-4...9.0.21-0
instead ofgit log 9.0.20-6...9.0.21-0
, so we include some extra PRs we shouldn't 💥Solution
Allow staging deploys to be compared with other staging deploys or prod deploys too.
Problem: this code was super ugly
Also this is just pretty confusing and we were missing logs that would have helped me figure this out faster
Solution
I tried to make the code a bit cleaner and improved documentation via code comments (and this PR writeup 😉). Added some logs
Fixed Issues
$ #47461
Tests
Live test with the next deploy checklist.
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