Repository navigation
Conversation
|
@sansynx is attempting to deploy a commit to the Sentry Team on Vercel. A member of the Team first needs to authorize it. |
|
The plan checks that the source-map API returns JSON. It also checks that other API documentation redirects still occur. Page errors and not-found responses must stay in band. An issue escalates when the source-map API still returns HTML or when other API redirects stop. Services: Mention PlanWhat changedGET requests to /api/source-map now reach the JSON route. They no longer redirect to /backend/api/source-map. RiskA wrong path matcher can still send /api/source-map to /backend/api/source-map. A matcher that is too wide can stop redirects for other /api URLs. Those requests would then 404 or hit a JSON handler by mistake. Broken redirects affect every request on this deploy. Intended effectThe source-map route must return JSON with status 200. Absence looks like this: GET /api/source-map spans stay at zero, and fetches still land on HTML for /backend/api/source-map.
Regression watchThis diff can break other /api documentation redirects. It can also raise page errors if the matcher fails to load.
Not observableGitHub Actions lint-404 output is not connected. The JSON body shape is not in traces. Confirm JSON through status 200 on GET /api/source-map. |
|
the branch is up to date. could you approve the pending workflows and authorize the Vercel preview when you review this? |
DESCRIBE YOUR PR
Fixes #19514. Follow-up to #19526, which already fixed cross-site link handling.
The developer docs redirect from
/api/:path*to/backend/api/:path*also intercepts/api/source-map. The checker follows that redirect and receives HTML instead of JSON. Exclude the exact source-map endpoint from this legacy documentation redirect while preserving the other API documentation redirects.Regression tests run the redirect definitions through Next.js routing for both docs sites, and cover legacy API paths, query strings, and similarly named paths.
Validation:
pnpm exec vitest run redirects.test.ts scripts/lint-404s/url.spec.ts scripts/lint-redirect-chains.spec.ts scripts/check-redirects-on-rename.spec.ts: 68 passed. The two developer source-map cases failed before the fix.pnpm exec eslint redirects.js redirects.test.ts: passed.pnpm exec prettier --check redirects.js redirects.test.tsandgit diff --check: passed./api/source-map/changed from a 308 redirect to HTTP 200 withapplication/jsonand 315 source-map entries.No full production build, full-site crawl, or Vercel preview verification was performed. Implementation and tests were AI-assisted, with a separate code review.
IS YOUR CHANGE URGENT?
Help us prioritize incoming PRs by letting us know when the change needs to go live.
Select exactly one option. For deadlines, replace
YYYY-MM-DDwith the due date. You can update this information later by editing the PR description.SLA
Thanks in advance for your help!
PRE-MERGE CHECKLIST
Make sure you've checked the following before merging your changes:
LEGAL BOILERPLATE
Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.
EXTRA RESOURCES