Skip to content

Preserve retest requests across canceled staging deploys - #105673

Merged
roryabraham merged 3 commits into
mainfrom
fix-cp-retests
Nov 3, 2026
Merged

roryabraham merged 3 commits into
mainfrom
fix-cp-retests

Conversation

@jasperhuangg

@jasperhuangg jasperhuangg commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Explanation of Change

  • Staging tags are created before all platforms finish deploying. If another cherry-pick cancels that deploy, using its tag as the starting point misses the earlier fix.
  • Scan from the previous release checklist after staging deploys on all platforms. Request one retest per matching cherry-pick with the checklist blockers linked at that time, and skip picks reverted before the deploy.
  • Wait for the checklist update, track requests before posting to Slack, and keep processing the batch if one request or legacy marker lookup fails.

Fixed Issues

$ #105541
PROPOSAL:

Tests

N/A we'll just see if this works once it goes out

  • Verify that no errors appear in the JS console

Offline tests

QA Steps

Request and run multiple CPs, verify retest requests are created for all of them

  • Verify that no errors appear in the JS console

PR Author Checklist

  • I linked the correct issue in the ### Fixed Issues section above
  • I wrote clear testing steps that cover the changes made in this PR
    • I added steps for local testing in the Tests section
    • I added steps for the expected offline behavior in the Offline steps section
    • I added steps for Staging and/or Production testing in the QA steps section
    • I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
    • I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).
  • I included screenshots or videos for tests on all platforms
  • I ran the tests on all platforms & verified they passed on:
    • Android: Native
    • Android: mWeb Chrome
    • iOS: Native
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
  • I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
  • I verified any copy / text that was added to the app is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
  • If new assets were added or existing ones were modified, I verified that:
    • The assets are optimized and compressed (for SVG files, run npm run compress-svg)
    • The assets load correctly across all supported platforms.
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • If the PR adds or modifies the UI:
    • I asked an AI agent to review the changes for accessibility issues and addressed its findings.
    • I tested with a screen reader (VoiceOver on macOS) and verified all new/changed elements are reachable with a logical focus order.
    • I verified all new/changed elements have meaningful accessible names and roles.
    • I verified state changes are announced (e.g. checked/unchecked, expanded/collapsed, selected).
  • I added unit tests for any new feature or bug fix in this PR to help automatically prevent regressions in this user flow.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.

AI Tests

  • Passed 88 targeted Bun tests covering the retest script and deploy checklist helpers, including reverts, checked blockers, missing legacy tags, webhook retries, and Slack recovery.
  • Passed npm run lint-changed, npm run typecheck, scoped npm run spell-changed, oxfmt --check, .github/scripts/verifyActions.sh, and actionlint with the existing custom runner-label warnings ignored.
  • Replayed the October 28 deploy history read-only: all three cherry-picks were found across 640 commits, and an existing tag-only marker was recognized. Replayed real App revert PRs, including a multi-PR revert.
  • Not run: a live staging deploy or Slack webhook. The pre-push hook skipped because Husky was unavailable; the checks above were run directly.
  • An expanded spellcheck of the workflow reported existing subteam, nvmrc, and procs tokens; the normal scoped check passed.

Screenshots/Videos

Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari

@jasperhuangg
jasperhuangg requested a review from a team November 2, 2026 19:18
@jasperhuangg
jasperhuangg marked this pull request as ready for review November 2, 2026 19:42
@melvin-bot
melvin-bot Bot requested review from bernhardoj and removed request for a team November 2, 2026 19:43
@melvin-bot

melvin-bot Bot commented Nov 2, 2026

Copy link
Copy Markdown

@bernhardoj 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]

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-02T19:56:33.616018Z d226977 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@roryabraham

Copy link
Copy Markdown
Contributor

@MelvinBot review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d226977f12

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread scripts/createRetestRequestForCP.ts Resolved
@MelvinBot

Copy link
Copy Markdown
Contributor

Review

The approach looks right. The new scan range matches the range the checklist uses (createOrUpdateDeployChecklist.ts:229). Cherry-picks from the previous release are still dropped because the checklist already filters out those PRs. I found one behavior change to confirm and two small robustness gaps.

  1. Retests are now skipped for blockers that were closed or demoted early. createRetestRequestForCP.ts:517 keeps only unchecked blockers. The checklist update automatically checks any blocker whose issue is closed or no longer has the DeployBlockerCash label (createOrUpdateDeployChecklist.ts:166-167). If an engineer closes the blocker issue right after requesting the CP, QA gets no retest. Before this PR, QA would have gotten one. Please confirm this matches how the team works.

  2. A legacy marker that points to a missing tag fails the whole job. The compare at createRetestRequestForCP.ts:288-294 throws on a 404. That stops the remaining hits from being filed. Consider catching the error and skipping that comment.

  3. Retests are deduplicated per PR and cherry-pick, not per blocker. If someone adds a second blocker link to the PR body after the first retest, createRetestRequestForCP.ts:578 skips it. This is probably fine. I'm noting it because the description says "each outstanding blocker."

Other notes
  • Because of the deploy.yml change (deploy.yml:966), the job now runs on every staging deploy, not just cherry-picks. Each run lists checklists, compares commits across the whole release, and looks up the PR for each cherry-pick. The early exit when no blockers are unresolved keeps most runs cheap.
  • Depending on deployChecklist succeeding is correct. The script reads the updated checklist, so it shouldn't run on a stale one.
  • I couldn't run tests/tooling/createRetestRequestForCP.test.ts in this environment, so I reviewed the code only.

@jasperhuangg
jasperhuangg requested review from roryabraham and removed request for bernhardoj and roryabraham November 2, 2026 19:58
@roryabraham

Copy link
Copy Markdown
Contributor

@jasperhuangg can you fix lint here

@jasperhuangg
jasperhuangg requested a review from a team as a code owner November 2, 2026 21:23
@melvin-bot
melvin-bot Bot requested review from eh2077 and removed request for a team November 2, 2026 21:23
@melvin-bot

melvin-bot Bot commented Nov 2, 2026

Copy link
Copy Markdown

@eh2077 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]

@jasperhuangg

Copy link
Copy Markdown
Contributor Author

(Jasper's Agent) Addressed the review:

  • Restored the previous behavior for checked, closed, or demoted checklist blockers.
  • If a legacy tag cannot be checked, the job processes the other requests and reports the affected PR instead of risking a duplicate. A pending marker also prevents a repeat if Slack succeeds but GitHub confirmation fails.
  • Clarified that each cherry-pick gets one request containing its linked checklist blockers at that time.
  • Added coverage for reverted picks, re-picks, and reverts of reverts. The 88 targeted tests pass.

@roryabraham

Copy link
Copy Markdown
Contributor

oxlint failure is unrelated

@roryabraham
roryabraham merged commit d138eba into main Nov 3, 2026
36 of 40 checks passed
@roryabraham
roryabraham deleted the fix-cp-retests branch November 3, 2026 00:12
@roryabraham roryabraham added the InternalQA This pull request required internal QA label Nov 3, 2026
@OSBotify

OSBotify commented Nov 3, 2026

Copy link
Copy Markdown
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.

@melvin-bot melvin-bot Bot added the Emergency label Nov 3, 2026
@melvin-bot

melvin-bot Bot commented Nov 3, 2026

Copy link
Copy Markdown

@roryabraham looks like this was merged without a test passing. These checks had not passed on f6244ee when it was merged:

Please add a note explaining why this was done and remove the Emergency label if this is not an emergency.

@roryabraham

Copy link
Copy Markdown
Contributor

As I mentioned, that was unrelated

@OSBotify OSBotify mentioned this pull request Nov 3, 2026
99 tasks done
@OSBotify

OSBotify commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

🚀 Deployed to staging by https://github.com/roryabraham in version: 9.5.31-0 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 failure ❌
🍎 iOS 🍎 success ✅

@OSBotify

OSBotify commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

🚀 Deployed to staging by https://github.com/roryabraham in version: 9.5.31-0 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

@OSBotify

OSBotify commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

🚀 Deployed to production by https://github.com/blimpich in version: 9.5.31-4 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

Bundle Size Analysis (Sentry):

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

InternalQA This pull request required internal QA

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants