Skip to content

refactor(native): flatten "official" naming across Android, iOS, CI#7325

Open
diegolmello wants to merge 1 commit into
remove-experimental-pr3-delete-codefrom
remove-experimental-pr4-flatten-official
Open

refactor(native): flatten "official" naming across Android, iOS, CI#7325
diegolmello wants to merge 1 commit into
remove-experimental-pr3-delete-codefrom
remove-experimental-pr4-flatten-official

Conversation

@diegolmello
Copy link
Copy Markdown
Member

@diegolmello diegolmello commented May 15, 2026

Proposed changes

With the Experimental variant no longer in the codebase, the official qualifier no longer disambiguates anything. This PR flattens it across Android, iOS, and CI so variants collapse back to React Native canonical defaults.

TBD: Follow-up: drop official_ prefix from GitHub environment names

Mechanical CI cleanup. Needs repo-admin access to rename envs in GitHub Settings → Environments (GH's env rename preserves approval rules + bound secrets, so no secret re-entry needed). Secrets stay under their existing *_OFFICIAL names.

  • Rename env official_android_buildandroid_build
  • Rename env upload_official_androidupload_android
  • Rename env official_ios_buildios_build
  • Rename env upload_official_iosupload_ios
  • Update environment: refs in .github/workflows/build-android.yml (lines 16, 61)
  • Update environment: refs in .github/workflows/build-ios.yml (lines 16, 62)
  • (Optional) delete stale envs no longer referenced by any workflow: experimental_android_build, experimental_ios_build, upload_experimental_android, upload_experimental_ios, build_experimental_android, build_official_android

Safe rollout: rename envs first (workflow environment: refs become invalid until the YAML PR lands, but no PR is blocked because the rename is instant); land the YAML PR within the same maintenance window.

Android

  • Drop flavorDimensions "app" and productFlavors { official } from android/app/build.gradle — variants collapse to debug/release.
  • Merge android/app/src/official/ resources into src/main/ (bootsplash images, launcher icons, colors.xml/strings.xml, sharedUserId manifest attr). Also delete the empty src/experimental/ directory.
  • package.json scripts: drop --mode=officialDebug.
  • android/fastlane/Fastfile: lane official_open_testingopen_testing; AAB path bundle/officialRelease/app-official-release.aabbundle/release/app-release.aab.
  • GH Actions: workflow build-official-android.ymlbuild-android.yml; job names Build Android OfficialBuild Android; artifact android-aab-officialandroid-aab (upload+download in lockstep); Android Official APKAndroid APK; build_name: 'android-official' input → 'android'.
  • Maestro run-maestro.sh adb-installs app-release.apk; .maestro/README.md updates the release-build command.

iOS

  • Rename ios/Official.xcassetsios/Assets.xcassets (27 files via git mv, UUIDs preserved in project.pbxproj).
  • ios/fastlane/Fastfile: build_official + build_official_simulator lanes collapse to build + build_simulator (lane bodies byte-identical apart from the name).
  • GH Actions: workflow build-official-ios.ymlbuild-ios.yml; artifacts ios-build-official / -dSYM / -info-plistios-build / -dSYM / -info-plist.

What is intentionally kept

Secret names retain the OFFICIAL suffix — GitHub has no secret-rename API, so dropping the suffix would require delete-and-recreate with custody of every original value (keystore base64, bugsnag keys, signing passwords).

  • Secrets: KEYSTORE_OFFICIAL_*, BUGSNAG_KEY_OFFICIAL, GOOGLE_SERVICES_IOS_OFFICIAL

GitHub environment names (official_android_build, official_ios_build, upload_official_android, upload_official_ios) are kept in this PR; a follow-up rename is tracked under Further comments.

Issue(s)

How to test or reproduce

Local

  • Android: yarn android builds and launches on emulator with no --mode=officialDebug; APK signature matches chat.rocket.reactnative (uninstall any stale install signed by a different debug keystore first).
  • iOS: yarn ios builds and launches chat.rocket.ios on simulator.

CI

  • build-android.yml and build-ios.yml jobs pass on the PR (after environment approvals).
  • E2E Build Android produces Android APK artifact at outputs/apk/release/app-release.apk; maestro-android.yml downloads it under the new name.
  • Acceptance grep over Android-related paths returns nothing except the intentionally-kept secret/env names listed above:
    rg -i 'official' android/ package.json .github/workflows/build-android.yml .github/workflows/build-develop.yml .github/workflows/build-pr.yml .github/actions/build-android .github/scripts/run-maestro.sh .maestro/README.md README.md \
      | rg -v 'KEYSTORE_OFFICIAL|BUGSNAG_KEY_OFFICIAL|GOOGLE_SERVICES_IOS_OFFICIAL|official_(android|ios)_build|upload_official_'

Screenshots

N/A — CI/build-infra refactor with no UI surface.

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • Improvement (non-breaking change which improves a current function)
  • New feature (non-breaking change which adds functionality)
  • Documentation update (if none of the other choices apply)

Checklist

  • I have read the CONTRIBUTING doc
  • I have signed the CLA
  • Lint and unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works (if applicable) — N/A, no behavior change
  • I have added necessary documentation (if applicable)
  • Any dependent changes have been merged and published in downstream modules

Further comments

With Experimental removed, the "official" qualifier no longer disambiguates.
Drop it from build configs, fastlane lanes, workflow/artifact names, and
asset paths so variants collapse back to RN canonical defaults.

Android: drop the `app` flavor dimension and `productFlavors { official }`
block; merge `src/official/` resources into `src/main/` (bootsplash, launcher
icons, sharedUserId manifest). AAB/APK paths return to
`outputs/bundle/release/app-release.aab` and `outputs/apk/release/app-release.apk`.

iOS: rename `Official.xcassets` → `Assets.xcassets`; fastlane `build_official`
+ `build_official_simulator` lanes collapse to `build` + `build_simulator`.

CI: `build-official-{android,ios}.yml` → `build-{android,ios}.yml`;
artifact pairs `android-aab-official`/`Android Official APK` → `android-aab`/
`Android APK`; `ios-build-official-*` → `ios-build-*`. `build_name: 'android-official'`
input → `'android'`. Maestro `run-maestro.sh` adb-installs `app-release.apk`.

Secret names (`KEYSTORE_OFFICIAL_*`, `BUGSNAG_KEY_OFFICIAL`,
`GOOGLE_SERVICES_IOS_OFFICIAL`) and GH environment names
(`official_{android,ios}_build`, `upload_official_{android,ios}`) kept
permanently per ADR 0007.

Refs NATIVE-1129
@diegolmello diegolmello temporarily deployed to approve_e2e_testing May 15, 2026 14:19 — with GitHub Actions Inactive
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 15, 2026

Walkthrough

This PR removes the "official" build variant from the Rocket.Chat mobile application across Android and iOS, consolidating all builds to standard release variants. Changes include removing Gradle product flavors, renaming Fastlane lanes, updating GitHub Actions workflows, changing iOS asset catalogs, and updating npm scripts and documentation to reflect the new build structure.

Changes

Official Build Variant Removal and Consolidation

Layer / File(s) Summary
Android build configuration consolidation
android/app/build.gradle, android/app/src/main/AndroidManifest.xml
Gradle product flavor official removed; android:sharedUserId moved from flavor-specific manifest to main manifest.
Android build action and workflow inputs
.github/actions/build-android/action.yml, .github/workflows/build-android.yml
Build action switches from bundleOfficialRelease to bundleRelease variant; input descriptions simplified; workflow requests standard android build name.
Android E2E build workflow
.github/workflows/e2e-build-android.yml
Switches Gradle task from assembleOfficialRelease to assembleRelease; artifact output renamed from "Android Official APK" to "Android APK".
Android artifact upload and distribution
.github/actions/upload-android/action.yml, .github/actions/upload-internal-android/action.yml
Artifact download steps updated to use android-aab artifact and place in bundle/release/ directory; Fastlane lane for open testing renamed from official_open_testing to open_testing.
Android Fastlane lanes and Play Store uploads
android/fastlane/Fastfile
Lanes beta, internal_app_sharing, and open_testing explicitly specify release AAB artifact path app/build/outputs/bundle/release/app-release.aab.
iOS Xcode asset catalog migration
ios/RocketChatRN.xcodeproj/project.pbxproj
Asset catalog references updated from Official.xcassets to Assets.xcassets across build files, file references, group contents, and resource build phases.
iOS Fastlane lane renaming
ios/fastlane/Fastfile
Device and simulator build lanes renamed from build_official / build_official_simulator to build / build_simulator.
iOS build action and workflow inputs
.github/actions/build-ios/action.yml
Build action switches to fastlane ios build lane; input descriptions simplified; artifact uploads renamed to non-official naming scheme.
iOS E2E and artifact upload workflow
.github/workflows/e2e-build-ios.yml, .github/workflows/maestro-android.yml, .github/actions/upload-ios/action.yml
E2E workflow uses build_simulator lane; artifact uploads reference standard artifact names; log messages updated to remove "as Official" wording.
CI/CD workflow orchestration
.github/workflows/build-develop.yml, .github/workflows/build-pr.yml
Job identifiers and workflow references updated: android-build-official-storeandroid-build-store, ios-build-official-storeios-build-store; all point to standard workflow files.
Development scripts and testing utilities
package.json, .github/scripts/run-maestro.sh
npm scripts android and android-whitelabel remove --mode=officialDebug flag; Maestro test installs standard app-release.apk.
Documentation and build instructions
.maestro/README.md, README.md, ios/fastlane/README.md
Build command examples updated from bundleOfficialRelease to bundleRelease; fastlane lane documentation reflects renamed actions; README references updated.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested labels

type: chore

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the primary change: removing 'official' naming conventions across Android, iOS, and CI infrastructure to simplify the codebase after removing the experimental variant.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

Warning

Review ran into problems

🔥 Problems

Errors were encountered while retrieving linked issues.

Errors (2)
  • NATIVE-1129: Request failed with status code 401
  • ADR-0007: Request failed with status code 401

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@diegolmello diegolmello temporarily deployed to official_android_build May 15, 2026 14:22 — with GitHub Actions Inactive
@diegolmello diegolmello temporarily deployed to official_ios_build May 15, 2026 14:22 — with GitHub Actions Inactive
@diegolmello diegolmello requested a deployment to upload_official_ios May 15, 2026 14:49 — with GitHub Actions Waiting
@diegolmello diegolmello requested a deployment to upload_official_android May 15, 2026 15:02 — with GitHub Actions Waiting
@github-actions
Copy link
Copy Markdown

Copy link
Copy Markdown
Member Author

@diegolmello diegolmello left a comment

Choose a reason for hiding this comment

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

Code review — flatten "official" naming (PR4 of 4)

Verdict: ship

Clean mechanical rename. Single commit, scoped tightly to PR4's stated goal; no PR3 bleed-through. Every call-site updated in lockstep (Fastlane lanes, workflows, composite actions, artifact upload/download pairs, Maestro APK install, package.json scripts, pbxproj UUIDs, asset catalog rename). The intentional-keep list (KEYSTORE_OFFICIAL_*, BUGSNAG_KEY_OFFICIAL, GOOGLE_SERVICES_IOS_OFFICIAL, official_*/upload_official_* GH environments) is respected exactly — and tracked for follow-up per ADR 0007.

Verifications performed

  • Acceptance grep: rg -i 'official' over android/, package.json, build workflows, composite actions, run-maestro.sh, .maestro/README.md, README.md returns only keep-list entries.
  • Repo-wide residue: git grep for IS_OFFICIAL, isOfficial, officialRelease, app-official-release, Official.xcassets, src/official, productFlavor, --mode=officialDebug, bundle exec fastlane … build_official, android-aab-official, ios-build-official*, Android Official APK, Build Android Official, build_name: 'android-official'zero hits outside the keep-list.
  • Android resource merge: src/official/res/values/{colors,strings}.xml moved to src/main/. At PR3 base, those files did NOT exist in src/main/ (only in src/official/), so no symbol collision on merge. app_name, share_extension_name, primary_dark, splashBackground, notification_text are uniquely defined.
  • Android launcher icon: src/main/ic_launcher-web.png correctly replaced (40966 → 19371 bytes — the official artwork was promoted, not the original non-flavor one kept).
  • Android manifest: sharedUserId="chat.rocket.android" correctly hoisted from src/official/AndroidManifest.xml to src/main/AndroidManifest.xml. Empty src/experimental/ is gone (was removed in PR3).
  • build.gradle: flavorDimensions "app" + productFlavors { official } removed cleanly; no remaining flavor-qualified task names (bundleOfficialRelease, assembleOfficialRelease) anywhere in CI.
  • package.json scripts: --mode=officialDebug dropped from android and android-whitelabel. No other script depends on the dropped flavor.
  • APK / AAB paths: bundle/release/app-release.aab propagates through android/fastlane/Fastfile (×3 lanes), build-android/action.yml (Bugsnag upload + artifact upload), upload-android/action.yml, upload-internal-android/action.yml. E2E now produces apk/release/app-release.apk and run-maestro.sh adb-installs the matching name.
  • iOS Official.xcassetsAssets.xcassets rename (27 files): All four pbxproj sites (PBXBuildFile ×3, PBXFileReference ×1, PBXGroup child, two PBXResourcesBuildPhase entries) updated; UUIDs preserved. On-disk path is ios/Assets.xcassets (group RocketChatRN has no path, so <group> resolves to ios/). The Widget/Watch target keeps both Assets.xcassets references (its own ios/RocketChat Watch App/Assets.xcassets + the renamed top-level one) — same arrangement as pre-PR (where it was Official.xcassets + Watch's Assets.xcassets). Asset-set names don't collide (top-level has AppIcon/LaunchScreenIcon/splashBackgroundColor; Watch has channel-/teams-/discussions/message), so the merged Assets.car is identical to pre-PR.
  • Artifact rename lockstep: android-aab-official → android-aab (upload in build-android/action.yml; download in both upload-android/action.yml and upload-internal-android/action.yml). ios-build-official* → ios-build* (upload in build-ios/action.yml; download in upload-ios/action.yml). Android Official APK → Android APK (upload in e2e-build-android.yml; download in maestro-android.yml). build_name: 'android-official' → 'android' and 'ios-official' → 'ios' — passed as inputs, not compared against the old literal anywhere.
  • Fastlane lane callers: build_official → build and build_official_simulator → build_simulator are only invoked from .github/actions/build-ios/action.yml and .github/workflows/e2e-build-ios.yml — both updated. official_open_testing → open_testing is only invoked from .github/actions/upload-android/action.yml — updated. No README/docs left over.
  • Docs: .maestro/README.md updates the gradle command and (correctly) drops the dangling "iOS Production Build (Simulator)" block that referenced the now-deleted build_experimental_simulator lane. README.md removes "Experimental versions" reference. ios/fastlane/README.md regenerated (cosmetic + lane renames).

Findings

None of severity ≥ minor. The diff is a textbook stacked-rename: 103 +/109 - across 74 files, all 1:1 substitutions with consistent before/after.

Notes for follow-up (not blockers; already tracked in PR body)

  • GH environment names (official_android_build, upload_official_android, official_ios_build, upload_official_ios) remain — explicitly tracked under "TBD" in the PR body, requires repo-admin to rename in Settings → Environments.
  • ADR 0007 documents the permanent retention of *_OFFICIAL secret names (no GH rename API).

LGTM.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant