Skip to content

chore(cli): deprecate event release mode on the mobile uploads - #92401

Merged
trunk-io[bot] merged 5 commits into
masterfrom
chore/remove-cli-mobile-release-mode
Sep 2, 2026
Merged

chore(cli): deprecate event release mode on the mobile uploads#92401
trunk-io[bot] merged 5 commits into
masterfrom
chore/remove-cli-mobile-release-mode

Conversation

@ablaszkiewicz

@ablaszkiewicz ablaszkiewicz commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Related PRs

Event mode is live today, and it is opt-in. These PRs settle where it stays and where it goes.

Deprecating the mobile knobs. The symbol id on these paths is already a content hash, so two releases collide only when they ship a byte-identical artifact. An ordinary release that changes code gets its own symbol set and never collides. The dSYM path also lost release attribution for embedded targets, because one upload covers every target while it creates one release. Review asked for deprecation instead of removal, so every knob stays accepted as a warned no-op.

Making it the default.

React Native. Scopes the mode to the Hermes upload and defaults it to event. That is the one path where two releases really do ship the same artifact.

Problem

  • Event mode on the mobile uploads adds nothing: it pays off only when two releases ship a byte-identical artifact.
  • A proguard map id is a hash of the mapping, and a dSYM symbol set is keyed on the Mach-O LC_UUID.
  • An ordinary release that changes code gets its own symbol set and never collides.
  • The dSYM path also lost release attribution for embedded targets. One upload covers every target's dSYM, but it creates one release.
  • Removing the flags outright would break released callers. The Android gradle plugin and posthog-ios upload-symbols.sh still pass them, so an upgraded CLI would stop those builds with a parse error.

Changes

  • proguard upload --release-mode and dsym upload --no-release-bind become hidden no-ops. Both commands always bind their symbol sets to the release they create.
  • A build that still passes a flag keeps working. It prints a deprecation warning, and its opt-in unbinding stops.
  • proguard upload no longer reads POSTHOG_RELEASE_MODE. The variable keeps steering the sourcemap and hermes commands, so a global symbol-set opt-out for those cannot trigger warnings here.
  • --release-mode stays visible on sourcemap inject, sourcemap process, sourcemap upload, hermes inject, hermes clone and hermes upload.
  • Mechanical: the shared conflict help now names the sourcemap and hermes uploads instead of "a command that takes --release-mode", because proguard now takes it invisibly.

How did you test this code?

  • New parse tests pin the compatibility contract: both flags parse and default off, stay out of --help, and --release-mode binds no environment variable. They catch a future re-removal, which is the build break this PR prevents.
  • A local run with --release-mode event printed the warning and kept the release binding.
  • Not run: an upload against a real project.

Automatic notifications

  • Publish to changelog?

Docs update

None. Both knobs were experimental and undocumented.

🤖 Agent context

Autonomy: Human-driven (agent-assisted)

Written with Claude Code (Opus 5); reshaped from removal to deprecation with Claude Code (Fable 5). Skills invoked: /writing-pr-descriptions.

Reviews here and on PostHog/posthog-android#747 and PostHog/posthog-ios#791 asked for warned no-ops instead of removal. #91823 stacks on this PR and flips the defaults for the commands that keep the flag.

proguard upload and dsym upload bind their symbol sets to the release they
create. --release-mode and --no-release-bind are gone from both.

A proguard map id is a hash of the mapping, and a dSYM symbol set is keyed
on the Mach-O LC_UUID, so two releases collide only when they ship a
byte-identical artifact. The dSYM path also lost release attribution for
embedded targets, because one upload covers every target while it creates
one release.

--release-mode stays on the sourcemap and hermes commands.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Jg6r6rFUBnowrXssZyU7yR
@ablaszkiewicz ablaszkiewicz self-assigned this Sep 1, 2026
@trunk-io

trunk-io Bot commented Sep 1, 2026

Copy link
Copy Markdown

😎 Stack merged successfully - details.

@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

🤖 CI report

Trunk lane — non-backend lane

This PR is assigned to the non-backend lane. It does not run backend Python tests and may merge in parallel with PRs in other lanes.

@posthog

posthog Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

🦔 PostHog Review reviewed this pull request

Found 0 must fix, 4 should fix, 0 consider.

Published 4 findings (view the review).

Resolved comments: 1 fixed, 1 declined, 2 left for you

@posthog

posthog Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

PostHog Review alpha 🦔 If you find any issues helpful - please reply "valid", "invalid", etc., for evaluation purposes 🙏

@posthog posthog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

PostHog Review

Found 4 should fix.

Comment thread cli/src/proguard/upload.rs Outdated
Comment thread cli/src/dsym/upload.rs
Comment thread cli/src/dsym/upload.rs
Comment thread cli/src/proguard/upload.rs Outdated
posthog Bot and others added 2 commits September 1, 2026 13:02
The proguard upload no longer has a release mode, but the comment on the
release binding still described "both modes" and "Event mode" and ended in a
truncated sentence. Replace it with an accurate comment about the binding.

Generated-By: PostHog Desktop
Task-Id: 749c89e8-6e0a-44af-a343-1652e26a485e
Removing --release-mode took its only two tests with it. The module kept a
parse helper that nothing called, which CI rejects under -D warnings.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Jg6r6rFUBnowrXssZyU7yR
@greptile-apps

greptile-apps Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Reviews (1): Last reviewed commit: "chore(cli): drop the proguard upload tes..." | Re-trigger Greptile

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Removes the experimental “event release mode” controls from the mobile debug-symbol upload commands in the Rust CLI, standardizing proguard upload and dsym upload on binding uploaded symbol sets to the release they create.

Changes:

  • Remove --release-mode from proguard upload and always set release_id on the uploaded mapping (when a release is created).
  • Remove --no-release-bind from dsym upload and always set release_id on uploaded dSYM chunks.
  • Update shared conflict-flag help text and add a CLI changeset describing the behavior change.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
cli/src/sourcemaps/args.rs Updates help text for shared upload conflict flags.
cli/src/proguard/upload.rs Drops --release-mode support and always attempts to bind proguard mappings to the created release.
cli/src/dsym/upload.rs Drops --no-release-bind and always binds dSYM chunks to the created release.
cli/.sampo/changesets/remove-mobile-release-mode.md Adds release notes for the CLI behavior/flag removal.
Suppressed comments (1)

cli/src/sourcemaps/args.rs:145

  • Similarly, the --skip-on-conflict help text mentions “a sourcemap upload” and --release-mode=event, but this arg struct is reused by other commands that don’t support --release-mode. Rewording to describe the behavior without tying it to a specific subcommand/flag will avoid confusing CLI help across commands.
    /// Skip symbol sets that already exist with different content instead of failing.
    /// Existing symbol sets are left unchanged. A sourcemap upload ignores this with
    /// `--release-mode=event`. [default: false]

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread cli/src/proguard/upload.rs Outdated
Comment thread cli/src/sourcemaps/args.rs Outdated
ablaszkiewicz and others added 2 commits September 1, 2026 15:46
The proguard comment said the mapping binds to a release. A build without
a release name or version resolves none, and --skip-release-on-fail can
drop the binding too.

UploadConflictArgs is flattened into six commands, and its help named
sourcemap uploads. Three of those commands take no --release-mode, and
hermes upload does and was not covered. The text now names the condition
rather than a command.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Jg6r6rFUBnowrXssZyU7yR
Reviewers asked for the mobile flag removal to stay backwards compatible:
a released gradle plugin or upload-symbols.sh that still passes
--release-mode or --no-release-bind must not fail to parse on a CLI
upgrade. Both flags stay accepted and hidden, print a deprecation
warning, and change nothing. proguard upload no longer reads
POSTHOG_RELEASE_MODE, so the variable only steers the sourcemap and
hermes commands.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0177eam86deHk8HZYMKcJtbD
@ablaszkiewicz ablaszkiewicz changed the title chore(cli): remove event release mode from the mobile uploads chore(cli): deprecate event release mode on the mobile uploads Sep 1, 2026
Comment thread cli/src/dsym/upload.rs
Comment thread cli/src/dsym/upload.rs
@trunk-io
trunk-io Bot merged commit 8a28e07 into master Sep 2, 2026
211 checks passed
@trunk-io
trunk-io Bot deleted the chore/remove-cli-mobile-release-mode branch September 2, 2026 12:25
@deployment-status-posthog

deployment-status-posthog Bot commented Sep 2, 2026

Copy link
Copy Markdown

Deploy status

Environment Status Deployed At Workflow
dev ✅ Deployed 2026-09-02 12:46 UTC Run
prod-us ✅ Deployed 2026-09-03 08:35 UTC Run
prod-eu ✅ Deployed 2026-09-03 08:36 UTC Run

dmarticus added a commit that referenced this pull request Sep 4, 2026
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-authored-by: posthog[bot] <206114724+posthog[bot]@users.noreply.github.com>
dmarticus added a commit that referenced this pull request Sep 4, 2026
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-authored-by: posthog[bot] <206114724+posthog[bot]@users.noreply.github.com>
dmarticus added a commit that referenced this pull request Sep 4, 2026
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-authored-by: posthog[bot] <206114724+posthog[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants