fix(schema): accept relative permalinks from self-hosted Sentry#1101
fix(schema): accept relative permalinks from self-hosted Sentry#1101n8tron450 wants to merge 1 commit into
Conversation
IssueSchema.permalink used z.string().url(), which rejects the relative permalinks (e.g. "/organizations/<org>/issues/<id>/") that self-hosted Sentry returns. This makes search_issues / get_issue fail with "Invalid url" on self-hosted instances. permalink is display-only and never parsed as a URL, so relax it to z.string(). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Traced through the Sentry source to verify — the bug is real, but there are actually two mechanisms at play: Path 1 — unconfigured
Path 2 —
The Fix is sound: |
|
the above is one of our agents, but fwiw you need to configure the url prefix on a self hosted install or a bunch of other things will break (like outbound emails) i think id rather let this break because otherwise we have all sorts of edge cases we have to handle here that should be handled upstream |
|
going to close as a wontfix but happy to hear arguments otherwise |
Problem
IssueSchema.permalinkis validated withz.string().url(). Self-hosted Sentry returns relative permalinks (e.g./organizations/<org>/issues/<id>/) rather than absolute URLs, so validation throwsInvalid urlon thepermalinkpath. This makessearch_issues(and any tool returning issues) fail entirely against self-hosted instances (e.g.--host localhost:9000 --insecure-http).Fix
Relax
permalinktoz.string(). The field is display-only and never parsed as a URL, so URL validation adds no value while breaking self-hosted users.Testing
Verified against a self-hosted Sentry instance:
search_issuesreturns results instead of erroring on permalink validation.🤖 Generated with Claude Code