-
Notifications
You must be signed in to change notification settings - Fork 3.3k
feat(cli): default release mode to event #91823
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| --- | ||
| cargo/posthog-cli: minor | ||
| --- | ||
|
|
||
| Default `--release-mode` to `event` for `sourcemap inject`, `sourcemap process`, `sourcemap upload`, `hermes inject`, `hermes clone`, `hermes upload` and `proguard upload`. Uploaded symbol sets, source maps and mappings are now release-independent, and each exception resolves its own release: a web build reads the `_posthogReleaseId` injected into the chunk, and a mobile build resolves it from the `$app_namespace` / `$app_version` / `$app_build` the SDK already sends. Two releases that ship the same code keep one symbol set instead of colliding on the release that uploaded it first. Pass `--release-mode symbol-set` to keep binding the release to what you upload. Before upgrading, check that the release coordinates you pass match the app's bundle identifier or applicationId, version and build number, because a mismatch leaves exceptions with no release. | ||
|
|
||
| `hermes upload` now resolves `--info-plist` before it checks the release coordinates. An iOS build that supplies them that way no longer gets a warning about a release the run creates correctly. `proguard upload` now warns about a missing `--build`, matching `hermes upload`. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -66,16 +66,15 @@ pub struct Args { | |
| #[arg(long)] | ||
| pub skip_ssl_verification: bool, | ||
|
|
||
| /// How the release is associated with exceptions. `symbol-set` (the default) stamps the | ||
| /// release id onto the uploaded symbol sets: the previous behavior. EXPERIMENTAL `event` | ||
| /// leaves symbol sets unbound; the chunks already carry the release id in their injected | ||
| /// snippet, so the release is resolved per event rather than per symbol set. Also settable | ||
| /// via `POSTHOG_RELEASE_MODE`. | ||
| /// How the release is associated with exceptions. `event` (the default) leaves symbol sets | ||
| /// unbound; the chunks already carry the release id in their injected snippet, so the release | ||
| /// is resolved per event rather than per symbol set. `symbol-set` stamps the release id onto | ||
| /// the uploaded symbol sets instead. Also settable via `POSTHOG_RELEASE_MODE`. | ||
| #[arg( | ||
| long, | ||
| env = "POSTHOG_RELEASE_MODE", | ||
| value_enum, | ||
| default_value = "symbol-set" | ||
| default_value = "event" | ||
|
ablaszkiewicz marked this conversation as resolved.
Comment on lines
+69
to
+77
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Event uploads can keep source maps with wrong offsetsWhy we think it's a valid issue
Issue descriptionEvent mode removes the injected snippet before it calculates Suggested fixInclude the snippet layout in the event-mode hash. For example, append a marker when Prompt to fix with AI (copy-paste)
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Addressed in #92250, which lands before this PR. The hash there covers which snippet the chunk carries, and still ignores the release id, so a new release does not re-upload every chunk. One correction from testing that PR. The collision is measurable on real esbuild output at the library level: the old hash is identical for both snippet variants. It does not reproduce end to end through |
||
| )] | ||
| pub release_mode: ReleaseMode, | ||
| } | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.