build: upload GutenbergKit source maps to Sentry#25800
Draft
dcalhoun wants to merge 6 commits into
Draft
Conversation
GutenbergKit editor exceptions currently surface in Sentry with minified, unreadable frames. GutenbergKit now publishes its JS source maps alongside its XCFramework, so fetch them (by the resolved GutenbergKit version) and upload them to Sentry during the app builds — mirroring how `upload_gutenberg_sourcemaps` handles the React Native bundle. Because GutenbergKit's editor JS runs inside the host app, its exceptions carry the host app's release/dist, so the maps upload under the same `<app_identifier>@<release_version>+<build_version>` coordinates. The maps are fetched from the CDN rather than the XCFramework because SwiftPM binary-target contents aren't surfaced to the app build. The upload is best-effort: a GutenbergKit version published before its source-map feature simply has no artifact to fetch, so it's logged and skipped. Wired into the same App Store, prototype, and TestFlight lanes that already upload the React Native source maps. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Support host builds that pin GutenbergKit to a `pr-build/<N>` snapshot branch, not only released versions. Derive the CDN path segment from the resolved pin: a released `version` maps to `gutenbergkit/<version>/`, while a `pr-build/<N>` branch maps to `gutenbergkit/pr-builds/<N>/` (where PR builds publish their maps). This lets us verify the pipeline against a GutenbergKit PR build before a release exists. Unrelated branches and bare revisions have no published maps, so they skip gracefully. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Collaborator
Generated by 🚫 Danger |
TEMPORARY — do not merge. Pins GutenbergKit to its `pr-build/554` snapshot branch so a prototype build consumes the PR build's XCFramework (which contains an intentional test exception) and its published source maps. Revert to `from: "0.17.2"` before merging. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
|
| App Name | WordPress | |
| Configuration | Release-Alpha | |
| Build Number | 33231 | |
| Version | PR #25800 | |
| Bundle ID | org.wordpress.alpha | |
| Commit | e1626ed | |
| Installation URL | 581158a2ltm10 |
Contributor
|
| App Name | Jetpack | |
| Configuration | Release-Alpha | |
| Build Number | 33231 | |
| Version | PR #25800 | |
| Bundle ID | com.jetpack.alpha | |
| Commit | e1626ed | |
| Installation URL | 5f9eij06mq1tg |
Contributor
🤖 Build Failure AnalysisThis build has failures. Claude has analyzed them - check the build annotations for details. |
Prototype builds set `VERSION_SHORT` to `pr_or_branch`, so the app's runtime Sentry release is `<app_identifier>@<pr_or_branch>+<build_number>` (e.g. `com.jetpack.alpha@PR #25800+33210`). The source-map uploads were keyed to `release_version_current` (the marketing version, e.g. `27.0`), which never matches that runtime release — so prototype-build events stayed unsymbolicated. Pass `pr_or_branch` as the release version for both the GutenbergKit and the existing React Native source-map uploads on prototype builds. This fixes GutenbergKit symbolication and also a pre-existing gap in the React Native prototype upload. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Conform GutenbergKit's `GutenbergJSException.DebugImage` to the crash-logging service's `JSDebugImage` protocol, so the editor's source-map Debug IDs reach the Sentry event's `debug_meta`. This lets Sentry symbolicate GutenbergKit editor exceptions by Debug ID, independent of the WebView's on-device file paths. The existing `JSException` conformance picks up the debug images automatically via the protocol's associated type; the legacy React Native path is unaffected (it provides no debug images and uses the empty default). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
TEMPORARY — do not merge. Pins Automattic-Tracks-iOS to the branch that adds source-map debug images to `JSException` (PR #373), and re-pins GutenbergKit to the pr-build/554 snapshot carrying the Debug ID work, so a prototype build can verify end-to-end symbolication. Revert both pins to released versions before merging. Co-Authored-By: Claude Opus 4.8 (1M context) <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.


Description
GutenbergKit editor exceptions currently surface in Sentry with minified,
unreadable JS frames (e.g.
editor-CZ39QhNu.js:1:326003, seeJETPACK-IOS-1KAQ). This makes
them hard to triage.
GutenbergKit produces the editor JS but the host app publishes the exceptions to
Sentry, so the host must upload GutenbergKit's source maps — exactly as we
already do for the React Native (
gutenberg-mobile) bundle viaupload_gutenberg_sourcemaps. GutenbergKit now publishes its source mapsalongside its XCFramework
(GutenbergKit#554);
this PR fetches and uploads them.
How it works
upload_gutenberg_kit_sourcemapsfastlane helper resolves theGutenbergKit version from
Modules/Package.resolved, downloads the matchingGutenbergKitSourceMaps.zipfrom the CDN, and uploads it to Sentry.app's
release/dist, so the maps upload under the same<app_identifier>@<release_version>+<build_version>coordinates as the RNmaps, with
rewrite/strip_common_prefix.upload the RN source maps.
pr-build/<N>snapshot-branch pin(mapping to
gutenbergkit/pr-builds/<N>/) so the pipeline can be verifiedagainst a GutenbergKit PR build before a release exists.
logged and skipped rather than failing the build.
This is the iOS half of a cross-repo effort; a follow-up will add the equivalent
to WordPress-Android.
Note
Depends on GutenbergKit#554
(produces + publishes the maps). Draft until that lands and end-to-end
symbolication is verified against a prototype build.
Testing instructions
Verified locally:
rubocoppasses andfastlane lanesloads with no errors.The version resolver was unit-tested against both a released-version pin and a
pr-build/<N>branch pin.End-to-end verification (in progress): pin GutenbergKit to PR #554's
pr-build/554branch, run a prototype build, trigger a GutenbergKit editorexception, and confirm the resulting Sentry event de-minifies.
sentry-cli sourcemaps explain <event-id>confirms the release/dist match.