[No QA] Fix prod deploy GitHub comments#47530
Merged
Merged
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] |
Contributor
Author
|
@ikevin127 no C+ review needed here |
AndrewGable
reviewed
Aug 16, 2024
Contributor
Reviewer Checklist
Screenshots/VideosAndroid: NativeAndroid: mWeb ChromeiOS: NativeiOS: mWeb SafariMacOS: Chrome / SafariMacOS: Desktop |
AndrewGable
approved these changes
Aug 16, 2024
Contributor
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
OSBotify
pushed a commit
that referenced
this pull request
Aug 17, 2024
…ents [No QA] Fix prod deploy GitHub comments (cherry picked from commit c7d4c5f) (CP triggered by Beamanator)
74 tasks
Contributor
|
🚀 Cherry-picked to staging by https://github.com/Beamanator in version: 9.0.21-3 🚀
|
Contributor
|
🚀 Deployed to production by https://github.com/Beamanator in version: 9.0.21-4 🚀
|
Contributor
|
🚀 Deployed to production by https://github.com/Beamanator in version: 9.0.21-4 🚀
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.actionthat triggered it - it just saysevent: releasefor 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-6is a final release, so it looks like a prod deploy.1. Then we end up comparing
9.0.20-6to9.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-6is the most recent staging deploy, then we close the checklist.1.
9.0.20-6becomes a final release.1.
9.0.21-0looks 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-4because9.0.20-5was cancelled in progress)1. Then we end up with
git log 9.0.20-4...9.0.21-0instead 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 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