fix(posthog): pass release-name and release-version as separate CLI flags#8624
Merged
Conversation
…lags
posthog-cli sourcemap inject/upload combine --release-name and
--release-version server-side into "{name}@{version}". Every call site
(self-host's release workflow, review-enrichment, discovery-index, and the
self-host operator deploy script) only passed our own already-combined
string as --release-version, leaving --release-name unset. The CLI then
auto-derived its own name from git/package.json, silently doubling the
stored release id and breaking release-based symbol-set lookups.
Also wires self-host's previously-computed-but-unused resolvePostHogRelease
into its captured PostHog events, matching how review-enrichment and
discovery-index already tag captures with their release.
Contributor
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8624 +/- ##
=======================================
Coverage 92.76% 92.76%
=======================================
Files 797 797
Lines 79355 79377 +22
Branches 24034 24039 +5
=======================================
+ Hits 73616 73638 +22
Misses 4592 4592
Partials 1147 1147
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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
sourcemap inject/sourcemap uploadcombine--release-nameand--release-versionserver-side into{name}@{version}. Every call site (self-host's release workflow, review-enrichment, discovery-index, and the self-host operator deploy script) only passed our already-combined string as--release-version, leaving--release-nameunset — the CLI then auto-derived its own name from git/package.json and silently doubled the stored release id, sovalidate-posthog-release.mjs's release lookup never matched.resolvePostHogRelease(previously computed but never attached to any capture) into its PostHog-captured events, matching review-enrichment/discovery-index's existing behavior.Test plan
npx vitest run test/unit/selfhost-posthog.test.ts test/unit/selfhost-posthog-release.test.ts test/unit/discovery-index/upload-sourcemaps.test.ts test/unit/worker-posthog.test.ts test/unit/discovery-index/posthog.test.ts test/unit/discovery-index/validate-posthog-release.test.ts test/unit/docs-selfhost-posthog-observability.test.ts— all passnpm --prefix review-enrichment test— 1377/1377 passnpm run build --workspace @loopover/discovery-indexand roottsc --noEmit— cleannpm run actionlint— clean