[No QA] Fail loudly when a Mobile-Expensify PR has cherry-pick conflicts - #98366
Conversation
cherryPick.yml's conflict-resolution flow (draft PR creation, branch naming, instructions) assumes the conflicting PR lives in E/App. It doesn't work for Expensify/Mobile-Expensify PRs, so instead of silently mishandling those conflicts, fail the workflow with a clear error telling the user to cherry-pick manually.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f93ae27159
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| echo "::error::Please manually cherry-pick ${{ inputs.PULL_REQUEST_URL }} to the Mobile-Expensify ${{ inputs.TARGET }} branch instead." | ||
| exit 1 |
There was a problem hiding this comment.
Include App sync in Mobile conflict recovery
For Mobile-Expensify PRs with conflicts, this failure path runs after the workflow has already pushed the Mobile-Expensify version bump to the target branch, but exit 1 skips the later E/App push that would publish the matching App version bump and submodule pointer. The error only tells the deployer to cherry-pick the Mobile PR manually, so following it leaves the App target branch without the corresponding version/submodule update and no App deploy is triggered; please either fail before mutating the target branches or include/run the App-side sync in this recovery path.
Useful? React with 👍 / 👎.
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safari |
| echo "😞 PR can't be automerged, there are merge conflicts in the following files:" | ||
| echo "$UNMERGED_FILES" | ||
| git cherry-pick --abort | ||
| if [[ "${{ steps.getPRInfo.outputs.REPO_FULL_NAME }}" =~ Expensify/Mobile-Expensify* ]]; then |
There was a problem hiding this comment.
could reuse startsWith(steps.getPRInfo.outputs.REPO_FULL_NAME, 'Expensify/Mobile-Expensify') for consistency
There was a problem hiding this comment.
Good eye, but I think we should keep this because they're functionally the same and run in different contexts. The step-level check is evaluated by the runner, this internal conditional is bash.
There was a problem hiding this comment.
Technically we could do
if [[ ${{ startsWith(steps.getPRInfo.outputs.REPO_FULL_NAME, 'Expensify/Mobile-Expensify') && 'true' || 'false' }} == 'true' ]]; then
Or maybe:
if [[ ${{ fromJSON(startsWith(steps.getPRInfo.outputs.REPO_FULL_NAME, 'Expensify/Mobile-Expensify')) }} == 'true' ]]; then
but in both cases, I think the bash-native approach is cleaner
|
🚀 Deployed to staging by https://github.com/roryabraham in version: 9.4.53-0 🚀
|
Explanation of Change
cherryPick.ymldoesn't handle conflicts in Mobile-Expensify PRs. We should fix that, but for now let's just fail loudly with a better error message.Fixed Issues
$ n/a
Tests
n/a
Offline tests
N/A - this is a GitHub Actions workflow change with no client-side or offline behavior.
QA Steps
N/A - this is an internal CI/CD workflow change with no user-facing behavior. [No QA]
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)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
N/A - this is a GitHub Actions workflow change with no visual output.