Repository navigation
Conversation
Retain event package metadata and support bounded exact-name selection through the existing resource and issue readers. Include selected versions with supplied Markdown and local formatting without extra API requests. Fixes getsentry#1292 Co-Authored-By: GPT-6 (Codex) <noreply@openai.com>
Merge upstream/main and retain package selection in the new structured issue responses as well as Markdown fallback. Share selection logic and cover both response formats through the tool and MCP boundaries. Co-Authored-By: GPT-6 (Codex) <noreply@openai.com>
Preserve package-selection test imports alongside upstream tool failure telemetry tests and the latest issue-details replay limits. Co-Authored-By: GPT-6 (Codex) <noreply@openai.com>
Preserve selected event package versions alongside suspect commit output and adapt package-selection fixtures to numeric issue event endpoints. Co-Authored-By: GPT-6 (Codex) <noreply@openai.com>
Preserve package selection alongside updated resource telemetry and nullable event context documentation. Co-Authored-By: GPT-6 (Codex) <noreply@openai.com>
Preserve selected package versions with experimental structured issue details and locally formatted event bodies. Regenerate definitions and update response snapshots for the upstream formatting contract. Co-Authored-By: GPT-6 (Codex) <noreply@openai.com>
|
@mr-danya is attempting to deploy a commit to the Sentry Team on Vercel. A member of the Team first needs to authorize it. |
|
|
||
| return { | ||
| metadataAvailable: true, | ||
| packages: [...new Set(packageNames)].map((name) => { |
There was a problem hiding this comment.
| packages: [...new Set(packageNames)].map((name) => { | |
| packages: Array.from(new Set(packageNames), (name) => { |
| return { | ||
| metadataAvailable: true, | ||
| packages: [...new Set(packageNames)].map((name) => { | ||
| const version = Object.hasOwn(packages, name) |
There was a problem hiding this comment.
packages should be a Map I guess if we are doing this?
| const version = Object.hasOwn(packages, name) | ||
| ? packages[name] | ||
| : undefined; | ||
| if (version === undefined || !version?.trim()) { |
There was a problem hiding this comment.
First check is redundant.
| if (version === undefined || !version?.trim()) { | |
| if (!version?.trim()) { |
| if (version === undefined || !version?.trim()) { | ||
| return { | ||
| name, | ||
| status: version === undefined ? "not_listed" : "version_not_recorded", |
There was a problem hiding this comment.
Well, do version === undefined early on and record it? Then you can probably reduce this to a single return {...} statement with 2 ternary statements in it.
| const value = | ||
| entry.status === "recorded" | ||
| ? entry.truncated | ||
| ? `${entry.version}… (truncated)` | ||
| : entry.version | ||
| : entry.status === "not_listed" | ||
| ? "Not listed in this event's package metadata" | ||
| : "Version not recorded"; | ||
| output += `- ${formatPackageText(entry.name)}: ${formatPackageText(value)}\n`; |
There was a problem hiding this comment.
These nested ternaries are blowing my mind. I feel like this calls for a switch block to be clear?
| function formatPackageText(value: string): string { | ||
| return value | ||
| .replace(/[\r\n\t]/g, " ") | ||
| .replace(/&/g, "&") | ||
| .replace(/</g, "<") | ||
| .replace(/([\\`*_[\]|>])/g, "\\$1"); | ||
| } |
There was a problem hiding this comment.
What is this doing? Don't we already have proper markdown/HTML escaping and building blocks in the repo?
…me (#1607) Two places where what the library SDK accepts doesn't match what commands actually get: - **Scalar values for variadic flags.** Stricli always passes variadic flags to a handler as arrays, but the SDK forwards the caller's flags as-is. An untyped caller passing `{ field: "title" }` to `explore` crashed with `e.find is not a function` ([CLI-28C](https://sentry.sentry.io/issues/7602736942/), [CLI-2B4](https://sentry.sentry.io/issues/7630797537/)). getsentry/cli#1648 fixed the generated types. `applyFlagDefaults` now also wraps scalar values in an array at runtime, so plain JS callers work. - **Streaming overloads.** The `AsyncIterable` overload for `log list --follow` and `dashboard view --refresh` didn't accept trailing positionals, so `sdk.log.list({ follow: "5" }, "org/project")` failed to type-check even though the runtime accepts it. This replaces three getsentry/cli PRs that patched `explore` directly. #1293's `parse: (v: string[]) => v` was wrong because Stricli calls `parse` once per value. #1218 and #1294 coerced the arrays inside `explore`. The variadic fix here is at the SDK boundary, which is the only path that can pass a scalar. Ported from getsentry/cli#1218, getsentry/cli#1293, getsentry/cli#1294, and the SDK part of getsentry/cli#1655. All are being closed with the repo archive. <!-- junior-request-attribution:start --> via **BYK**. <!-- junior-request-attribution:end --> <!-- junior-session-footer:start --> <!-- junior-conversation-id:local%3Aweb%3Ad9c5b0de1ecf3c7114be7025 --> -- [View Junior Session in Sentry](https://sentry.sentry.io/explore/conversations/local%3Aweb%3Ad9c5b0de1ecf3c7114be7025/?project=4510944073809921) <!-- junior-session-footer:end --> Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com> Co-authored-by: BYK <burak.kaya@sentry.io>
Summary
Adds optional
packageNamesselection to exact-event reads throughget_sentry_resourceandget_issue_details, so dependency compatibility diagnosis can use versions recorded with the event. Returns up to 10 selected packages instructuredContentwhen Sentry supplies JSON, and in Markdown fallback responses, with distinct states for unavailable metadata and unlisted packages and bounded version lengths. Calls without a selection retain their existing output, with no additional API requests.Fixes #1292.
Before / After