feat(preprod): Store raw build number for display purposes#119262
Merged
Conversation
Launchpad now packs multi-component Apple CFBundleVersion values (e.g. "1.2.3") into a large synthesized sortable int for build_number, since the DB column needs a single orderable value. Left as-is, that int would show up directly in the UI and in GitHub PR/status check comments wherever build_number is rendered to a human. Accept the raw, unparsed build string (build_number_raw) on the artifact update endpoint and store it in PreprodArtifactMobileAppInfo.extras rather than a new column, since extras is unused on this model today and a real column would need a migration for a field this narrowly scoped. The write is merge-safe: existing extras keys are fetched and merged rather than overwritten, since update_or_create's defaults would otherwise replace the whole JSON blob on every update. Surface it through BuildDetailsAppInfo (used by the build-details, builds, and size-analysis/compare endpoints) and prefer it over the synthesized int in format_version_string, the shared formatter used by PR/status check comments. Refs the launchpad build_number packing fix. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The sibling PreprodArtifact.extras merge a few lines below (head_artifact.extras.update(extras_updates)) has no comment for the same pattern — it's already established in this file. Explaining the road not taken (why not use get_mobile_app_info()) added length without adding anything a reader needs. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
A one-line comment listing known extras keys drifts silently — the sibling PreprodArtifact.extras field already has ~10 known keys and its comment only mentions a couple of examples. Replace the comment with PreprodArtifactMobileAppInfoExtras, a TypedDict that mypy actually checks at the write site (project_preprod_artifact_update.py) and both read sites (format_version_string, create_build_details_app_info). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
mtopo27
approved these changes
Jul 8, 2026
test_one_build asserts the full builds endpoint response body and missed the new build_number_raw field added to BuildDetailsAppInfo, which broke CI. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2 tasks
trevor-e
added a commit
that referenced
this pull request
Jul 9, 2026
## Summary - Backend now stores the raw, unparsed build identifier (`build_number_raw`) alongside `build_number`, since `build_number` can be a large synthesized int for Apple builds with a dotted `CFBundleVersion` (#119262). Left unhandled, that synthesized int would render directly to users. - Adds `build_number_raw` to `BuildDetailsAppInfo` and prefers it (`build_number_raw ?? build_number`) at every site that renders a build number: install header, build details header/title, builds table, build comparison item, selected-builds panel, and the base-build VCS info link. - Depends on #119262 (backend) being deployed first — until then `build_number_raw` is always `null` and this is a no-op, falling back to `build_number` exactly as before. ## Test plan - [x] New/updated unit tests in `preprodBuildsTable.spec.tsx` and `buildDetails.spec.tsx` asserting the raw value is preferred over a synthesized int - [x] `pnpm typecheck` and `pnpm lint:js` passing --------- Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
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.
Summary
CFBundleVersionvalues (e.g.1.2.3) into a large synthesized int forbuild_number(fix(preprod): Parse dotted Apple build numbers instead of dropping them launchpad#645), which would otherwise show up as an odd, unreadable number anywhere a build number is displayed.build_number_raw— the original unparsed build string — so those surfaces can show the real value instead. Stored inPreprodArtifactMobileAppInfo.extras(no migration needed) and exposed viaBuildDetailsAppInfo.Test plan
prekpassing