Commit 7a6c4cb
chore(runway): cherry-pick ci: switch OTA hotfix release branch to
- ci: switch OTA hotfix release branch to `-ota` suffix convention
(#29353)
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until this PR meets the canonical
Definition of Ready For Review in `docs/readme/ready-for-review.md`.
In short: the template must be materially complete (not just section
titles
present), all status checks must be currently passing, and the only
expected
follow-up commits must be reviewer-driven.
-->
## **Description**
Replaces the implicit "two-digit patch encodes an OTA hotfix" convention
(e.g. `release/7.73.01`) with an explicit `-ota` suffix on the branch
name (e.g. `release/7.75.2-ota`). The suffix is **branch-name-only**:
`OTA_VERSION`, the `CHANGELOG.md` header, and the production git tag all
keep using the bare strict-SemVer `X.Y.Z` (e.g. `v7.75.2`).
### Why
We decided to use OTA project in Runway so we now have ability to create
a branch with pre-release tag (`-ota`)
### What happens for each release-branch type
| Branch | Type | Native version files (`package.json`,
`android/build.gradle`, `ios/…/project.pbxproj`, `bitrise.yml`) |
`OTA_VERSION` (`app/constants/ota.ts`) | Changelog header /
`release-changelog/*` branch | Production git tag | Release PR title |
| --------------------------- | --------------- |
-----------------------------------------------------------------------------------------------------
| -------------------------------------- |
----------------------------------------------- | ------------------ |
------------------------ |
| `release/7.75.0` | Regular release | bumped to `7.75.0` (via
`MetaMask/github-tools/.github/actions/create-release-pr@v1`) |
unchanged | `7.75.0` / `release-changelog/7.75.0` | `v7.75.0` |
`release: 7.75.0` |
| `release/7.75.1` | Native hotfix | bumped to `7.75.1` (same action,
`previous-version-ref: null`) | unchanged | `7.75.1` /
`release-changelog/7.75.1` | `v7.75.1` | `release: 7.75.1` |
| `release/7.75.2-ota` | OTA hotfix | **not** bumped (native stays at
the prior native version, e.g. `7.75.1`) | bumped to `v7.75.2` |
`7.75.2` / `release-changelog/7.75.2` | `v7.75.2` | `release: 7.75.2
(OTA)` |
### What changed
#### Branch-name parsing & validation
- **`.github/scripts/extract-semver.sh`** — accepts `release/X.Y.Z` and
`release/X.Y.Z-ota`. Strips the suffix, sets `is_ota=true|false`,
validates strict SemVer (no leading zeros).
- **`.github/scripts/bump-ota-version-constants.sh`** — semver argument
must be strict SemVer.
- **`.github/scripts/run-update-release-changelog-mobile.sh`** — accepts
both branch shapes; for `-ota` branches passes the bare `X.Y.Z` to
`auto-changelog` as the explicit version (because `package.json` on an
OTA branch still holds the prior native version). The previous
prerelease-rewrite + URL-patching dance is gone.
- **`.github/workflows/auto-create-release-pr.yml`** — exposes `is_ota`
from the extract job and passes it as `is-ota` into
`create-release-pr.yml`.
- **`.github/workflows/build-rc-auto.yml`**,
**`.github/workflows/update-release-changelog.yml`**,
**`.github/workflows/create-bug-report.yml`** — branch-validation regex
now accepts the `-ota` suffix so these workflows continue to fire
correctly on OTA branches.
#### Release-PR creation
- **`.github/workflows/create-release-pr.yml`** — adds an `is-ota`
boolean input (both `workflow_dispatch` and `workflow_call`). Native
path is unchanged and still calls
`MetaMask/github-tools/.github/actions/create-release-pr@v1`. OTA path
operates on `release/X.Y.Z-ota`, runs only the OTA-specific bump +
changelog steps, and opens a draft PR with an OTA-specific title/body.
PR-existence check runs before the bump so retries don't double-write
`OTA_VERSION`.
#### OTA-bump detection (porting forward two safety guards)
- **`.github/workflows/runway-ota-build-core.yml`** — added two
early-exit guards in the `decide` job so stale/empty OTA states don't
trigger pushes:
1. `OTA_VERSION == "vX.XX.X"` (sentinel, no OTA configured) →
`ota_bump=false`.
2. A git tag matching `OTA_VERSION` already exists (already shipped,
e.g. via a forward-merge from a prior release) → `ota_bump=false`.
- **`.github/workflows/runway-ota-resolve-context.yml`** — mirrored the
same two guards into the new reusable resolve-context workflow so both
OTA-bump detectors stay aligned. Current callers (`runway-ota-rc.yml`,
`runway-ota-production.yml`) ignore `ota_bump` today, so this is a no-op
for shipped behaviour but prevents drift if a future caller starts
consuming it.
#### Documentation
- **`app/constants/ota.ts`** — doc-comment refreshed to describe the
`-ota` branch convention, the branch-name-only nature of the suffix, and
the patch-increment guarantee that prevents tag collisions.
### Rollout notes
- Runway is being configured to use `release/X.Y.Z-ota` as the OTA
hotfix branch name. The first OTA hotfix to use the new scheme should
produce a clean strict-SemVer changelog header (e.g. `## 7.75.2`) and a
`v7.75.2` git tag, with no URL fix-ups required.
### Testing
The 2 patch digits workflows were tested by creating real release
branches which caused some automations to break. Since this change is
similar so I did not test it by creating release branches. We can keep
an eye out next time when we create an OTA release. The impact is small.
If PRs are created incorrectly then we'll manually create them and fix.
## **Changelog**
<!--
If this PR is not End-User-Facing and should not show up in the
CHANGELOG, you can choose to either:
1. Write `CHANGELOG entry: null`
2. Label with `no-changelog`
If this PR is End-User-Facing, please write a short User-Facing
description in the past tense like:
`CHANGELOG entry: Added a new tab for users to see their NFTs`
`CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker`
(This helps the Release Engineer do their job more quickly and
accurately)
-->
CHANGELOG entry:null
## **Related issues**
Fixes:
## **Manual testing steps**
```gherkin
Feature: my feature name
Scenario: user [verb for user action]
Given [describe expected initial app state]
When user [verb for user action]
Then [describe expected outcome]
```
## **Screenshots/Recordings**
<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->
### **Before**
<!-- [screenshots/recordings] -->
### **After**
<!-- [screenshots/recordings] -->
## **Pre-merge author checklist**
<!--
Every checklist item must be consciously assessed before marking this PR
as
"Ready for review". A checked box means you deliberately considered that
responsibility, not that you literally performed every action listed.
Unchecked boxes are ambiguous: they are not an implicit "N/A" and they
are not
a silent "skip". See `docs/readme/ready-for-review.md` for the full
checklist
semantics.
-->
- [x] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile
Coding
Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've completed the PR template to the best of my ability
- [x] I've included tests if applicable
- [x] I've documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [x] I've applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.
#### Performance checks (if applicable)
- [ ] I've tested on Android
- Ideally on a mid-range device; emulator is acceptable
- [ ] I've tested with a power user scenario
- Use these [power-user
SRPs](https://consensyssoftware.atlassian.net/wiki/spaces/TL1/pages/edit-v2/401401446401?draftShareId=9d77e1e1-4bdc-4be1-9ebb-ccd916988d93)
to import wallets with many accounts and tokens
- [ ] I've instrumented key operations with Sentry traces for production
performance metrics
- See [`trace()`](/app/util/trace.ts) for usage and
[`addToken`](/app/components/Views/AddAsset/components/AddCustomToken/AddCustomToken.tsx#L274)
for an example
For performance guidelines and tooling, see the [Performance
Guide](https://consensyssoftware.atlassian.net/wiki/spaces/TL1/pages/400085549067/Performance+Guide+for+Engineers).
## **Pre-merge reviewer checklist**
<!--
Reviewer checklist items follow the same semantics as the author
checklist: an
unchecked box is ambiguous, a checked box means the reviewer consciously
assessed that responsibility. See `docs/readme/ready-for-review.md`.
-->
- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [x] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> **Medium Risk**
> Touches multiple GitHub Actions workflows and scripts in the
release/OTA pipeline; mistakes could cause release PR, changelog, or
OTA/build gating to misfire, though changes are mostly regex/branch
parsing and guardrails.
>
> **Overview**
> Switches OTA hotfix identification from *two-digit patch encoding* to
an explicit `release/X.Y.Z-ota` branch suffix, while keeping
`OTA_VERSION`, changelog headers, and production tags on the bare strict
SemVer `X.Y.Z`.
>
> Updates release automation to propagate an `is-ota` flag
(`extract-semver.sh` → `auto-create-release-pr.yml` →
`create-release-pr.yml`), bump/push `OTA_VERSION` and create PRs against
`release/X.Y.Z-ota`, and broaden branch-validation in RC builds,
bug-report creation, and changelog refresh to accept and strip the
`-ota` suffix.
>
> Simplifies OTA changelog generation by removing
prerelease/version-rewrite logic and instead passing the bare `X.Y.Z`
explicitly for `-ota` branches, and adds guards in OTA/bump detection to
treat the sentinel `vX.XX.X` or an already-existing `OTA_VERSION` git
tag as *no bump* (avoid stale/shipped OTAs triggering OTA flows).
>
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
07bf749. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
[4e11714](4e11714)
Co-authored-by: Wei Sun <wei.sun@consensys.net>-ota suffix convention (#29586)1 parent 9336824 commit 7a6c4cb
11 files changed
Lines changed: 160 additions & 106 deletions
File tree
- .github
- scripts
- workflows
- app/constants
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
7 | 9 | | |
8 | 10 | | |
9 | 11 | | |
| |||
30 | 32 | | |
31 | 33 | | |
32 | 34 | | |
33 | | - | |
34 | | - | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
35 | 38 | | |
36 | 39 | | |
37 | 40 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
5 | 17 | | |
6 | 18 | | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
| 19 | + | |
| 20 | + | |
12 | 21 | | |
13 | 22 | | |
14 | 23 | | |
15 | | - | |
16 | | - | |
17 | | - | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
18 | 37 | | |
19 | 38 | | |
20 | 39 | | |
21 | 40 | | |
| 41 | + | |
22 | 42 | | |
| 43 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
20 | 14 | | |
21 | 15 | | |
22 | | - | |
| 16 | + | |
23 | 17 | | |
24 | 18 | | |
25 | 19 | | |
| |||
30 | 24 | | |
31 | 25 | | |
32 | 26 | | |
33 | | - | |
34 | | - | |
| 27 | + | |
| 28 | + | |
35 | 29 | | |
| 30 | + | |
36 | 31 | | |
37 | | - | |
| 32 | + | |
38 | 33 | | |
39 | 34 | | |
40 | 35 | | |
41 | | - | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
42 | 40 | | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
| 41 | + | |
52 | 42 | | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
| 43 | + | |
73 | 44 | | |
74 | | - | |
| 45 | + | |
75 | 46 | | |
76 | 47 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
11 | 13 | | |
12 | 14 | | |
13 | 15 | | |
| |||
23 | 25 | | |
24 | 26 | | |
25 | 27 | | |
| 28 | + | |
26 | 29 | | |
27 | 30 | | |
28 | 31 | | |
| |||
44 | 47 | | |
45 | 48 | | |
46 | 49 | | |
| 50 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
58 | | - | |
| 57 | + | |
| 58 | + | |
59 | 59 | | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
60 | 63 | | |
61 | 64 | | |
62 | 65 | | |
63 | | - | |
| 66 | + | |
64 | 67 | | |
65 | 68 | | |
66 | 69 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
14 | 17 | | |
15 | 18 | | |
16 | 19 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
9 | 14 | | |
10 | 15 | | |
11 | 16 | | |
12 | 17 | | |
13 | 18 | | |
14 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
15 | 24 | | |
16 | 25 | | |
17 | 26 | | |
| |||
24 | 33 | | |
25 | 34 | | |
26 | 35 | | |
27 | | - | |
| 36 | + | |
| 37 | + | |
28 | 38 | | |
29 | 39 | | |
30 | 40 | | |
| |||
35 | 45 | | |
36 | 46 | | |
37 | 47 | | |
| 48 | + | |
38 | 49 | | |
39 | 50 | | |
40 | 51 | | |
41 | 52 | | |
42 | | - | |
43 | | - | |
44 | | - | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
45 | 57 | | |
46 | 58 | | |
47 | 59 | | |
48 | 60 | | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
| 61 | + | |
53 | 62 | | |
54 | | - | |
| 63 | + | |
55 | 64 | | |
56 | 65 | | |
57 | | - | |
| 66 | + | |
58 | 67 | | |
59 | 68 | | |
60 | 69 | | |
| |||
116 | 125 | | |
117 | 126 | | |
118 | 127 | | |
119 | | - | |
| 128 | + | |
120 | 129 | | |
121 | 130 | | |
122 | 131 | | |
| |||
127 | 136 | | |
128 | 137 | | |
129 | 138 | | |
130 | | - | |
| 139 | + | |
131 | 140 | | |
132 | 141 | | |
133 | 142 | | |
| |||
141 | 150 | | |
142 | 151 | | |
143 | 152 | | |
144 | | - | |
| 153 | + | |
145 | 154 | | |
146 | 155 | | |
147 | 156 | | |
| |||
153 | 162 | | |
154 | 163 | | |
155 | 164 | | |
156 | | - | |
| 165 | + | |
157 | 166 | | |
158 | 167 | | |
159 | 168 | | |
| |||
165 | 174 | | |
166 | 175 | | |
167 | 176 | | |
168 | | - | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
169 | 180 | | |
170 | 181 | | |
171 | 182 | | |
| |||
194 | 205 | | |
195 | 206 | | |
196 | 207 | | |
197 | | - | |
| 208 | + | |
198 | 209 | | |
199 | 210 | | |
200 | 211 | | |
| |||
208 | 219 | | |
209 | 220 | | |
210 | 221 | | |
211 | | - | |
212 | | - | |
213 | | - | |
| 222 | + | |
214 | 223 | | |
215 | 224 | | |
216 | 225 | | |
217 | | - | |
| 226 | + | |
218 | 227 | | |
219 | 228 | | |
220 | 229 | | |
| |||
0 commit comments