Skip to content

Bump API schema to {"messag - #19999

Merged
sentry-api-schema-updater[bot] merged 1 commit into
masterfrom
bot/bump-api-schema-to-{"messag
Oct 15, 2026

Hidden character warning

The head ref may contain hidden characters: "bot/bump-api-schema-to-{"messag"
Merged

sentry-api-schema-updater[bot] merged 1 commit into
masterfrom
bot/bump-api-schema-to-{"messag

Conversation

@sentry-api-schema-updater

Copy link
Copy Markdown
Contributor

No description provided.

@vercel

vercel Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
develop-docs Error Error Oct 15, 2026 2:08pm UTC
sentry-docs Error Error Oct 15, 2026 2:08pm UTC

Request Review

@sentry-api-schema-updater
sentry-api-schema-updater Bot merged commit 78e811d into master Oct 15, 2026
13 of 17 checks passed
@sentry-api-schema-updater
sentry-api-schema-updater Bot deleted the bot/bump-api-schema-to-{"messag branch October 15, 2026 14:08
@github-actions github-actions Bot added the Priority: Needs Triage The PR description is missing valid priority information label Oct 15, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Please update the IS YOUR CHANGE URGENT? section of the PR description:

  • Select exactly one option.
  • If you selected an urgent or other deadline, provide the date as YYYY-MM-DD.

This information helps the Docs team prioritize your review.

@cursor

cursor Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

The change rebuilds generated API reference pages from a new schema pin. The plan checks API page loads, API not-found counts, and production errors. An issue escalates when API page loads fall or API not-found counts rise. The new pin is not a git commit SHA, so those pages may fail to generate.

Rollout complete

Services: sentry-docs, develop-docs.

Plan

What changed

Build now fetches OpenAPI from a new schema pin in resolveOpenAPI.ts.
Generated category and endpoint pages under /api/ then render that schema.
The pin value is a GitHub rate-limit error body, not a commit SHA.
sentry-docs must deploy before product API pages change.
develop-docs also ships this shared source file.
Developer docs do not fetch OpenAPI when they generate pages.

Risk

An invalid pin can throw during product-docs static generation.
That can fail the whole sentry-docs build.
If a deploy succeeds with a bad schema, generated /api/ pages can 404.
Static API guide pages can remain.
The shared page module also ships to develop-docs.

Intended effect

Generated API reference pages must keep loading from the new pin.
Absent looks like API page loads falling while other docs pages still load.
The 24h API load query timed out, so the share uses the 2d pool.

Signal Baseline Window Rule Source
docs.page.load with page_type api, as a share of all docs.page.load 1588 API loads and 38841 total loads, share 4.1% 2026-10-13T14:09Z to 2026-10-15T14:09Z Hold near 4.1%. Absent if the share falls toward 0 while total loads hold. Sentry metrics, org sentry, project docs, production. sum of docs.page.load with page_type:api versus all docs.page.load

Regression watch

A bad pin can drop generated API pages or break the product-docs build.
Watch API not-found events first.
Watch site-wide not-found events and production errors on the same ship path.

Signal Baseline Window Rule Source
docs.page.not_found on requested_path that contains api, as a share of API page loads 21 API not-found events and 1588 API loads, share 1.3%. 24h counts 5 then 16 2026-10-13T14:09Z to 2026-10-15T14:09Z Hold near 1.3% and in 5-16 events per 24h. Detected if the share or 24h count rises above this band while API loads hold. Sentry metrics, org sentry, project docs, production. sum of docs.page.not_found with requested_path:api
docs.page.not_found on all paths, as a share of all page loads 145 not-found events and 38841 total loads, share 0.37%. 24h counts 54 then 91 2026-10-13T14:09Z to 2026-10-15T14:09Z Hold near 0.37% and in 54-91 events per 24h. Detected if the share or 24h count rises above this band. Sentry metrics, org sentry, project docs, production. sum of docs.page.not_found
Production error events in project docs 295 events per 24h, about 1.5 errors per 100 page loads using the 2d average load volume 2026-10-14T14:09Z to 2026-10-15T14:09Z Hold near 295 events per 24h. The prior 24h error count is unknown. Sentry errors, org sentry, project docs, production
Production error events in project develop-docs 26-28 events per 24h 2026-10-13T14:09Z to 2026-10-15T14:09Z Hold in 26-28 events per 24h. Detected if the 24h count rises above this band. Sentry errors, org sentry, project develop-docs, production

Not observable

The new schema text is not in telemetry, so added or changed endpoints cannot be confirmed.
page_type api also counts static API guide pages. The generated-only split was not measured.
Sentry traces for /api/ latency and HTTP status timed out.
The 2d error count for project docs timed out, so the prior 24h error band is unknown.

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 4873c1a. Configure here.

// SENTRY_API_SCHEMA_SHA is used in the sentry-docs GHA workflow in getsentry/sentry-api-schema.
// DO NOT change variable name unless you change it in the sentry-docs GHA workflow in getsentry/sentry-api-schema.
const SENTRY_API_SCHEMA_SHA = 'b342621e5125399429df4b22093675fd3259add9';
const SENTRY_API_SCHEMA_SHA = '{"message":"API rate limit exceeded for 20.15.163.105. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)","documentation_url":"https://docs.github.com/rest/overview/resources-in-the-rest-api#rate-limiting"}';

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Invalid API schema SHA committed

High Severity

SENTRY_API_SCHEMA_SHA was set to a GitHub API rate-limit error payload instead of a commit SHA. The schema fetch URL is therefore invalid, and the unescaped apostrophe in the error text also breaks the string literal.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 4873c1a. Configure here.

@cursor

cursor Bot commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

Verified in production

  • Generated API pages kept loading after this ship, and not-found counts stayed normal.

sergical added a commit that referenced this pull request Oct 15, 2026
…ng (#20001)

## DESCRIBE YOUR PR

The Bump API Schema SHA workflow got rate-limited by the GitHub API and
wrote the error body (`{"message":"API rate limit exceeded for ..."}`)
into `SENTRY_API_SCHEMA_SHA`. It then admin-merged the change
([#19999](#19999)). That
broke `master` for about 10 minutes, until the next run
([#20000](#20000)) replaced
it with a real SHA.

The workflow called the commits API without authentication and never
checked what came back. It now:

- Sends the GitHub App token it already creates. That token has access
to `sentry-api-schema`, so the request gets the much higher
authenticated rate limit.
- Uses `curl --fail`, so an HTTP error fails the job instead of
returning the error body.
- Fails the job unless the response is a 40-character hex SHA, so
nothing else gets written into the file or merged.

It also fixes `-sSl` to `-sSL`. Lowercase `-l` is curl's FTP
`--list-only` flag; `-L` follows redirects, which is what was meant.

## IS YOUR CHANGE URGENT?

- [x] No deadline: Not urgent, can wait up to 1 week+

## PRE-MERGE CHECKLIST

- [ ] Checked Vercel preview for correctness, including links
- [ ] PR was reviewed and approved by any necessary SMEs (subject matter
experts)
- [ ] PR was reviewed and approved by a member of the [Sentry docs
team](https://github.com/orgs/getsentry/teams/docs)

<!-- junior-request-attribution:start -->
via @sergical.
<!-- junior-request-attribution:end -->

<!-- junior-session-footer:start -->
<!-- junior-conversation-id:slack%3AC8H0BQRDJ%3A1792070558.468179 -->

--

[View Junior
Session](https://junior-prod.sentry.dev/conversations/slack%3AC8H0BQRDJ%3A1792070558.468179)
[[Sentry]](https://sentry.sentry.io/explore/conversations/slack%3AC8H0BQRDJ%3A1792070558.468179/?project=4510944073809921)

<!-- junior-session-footer:end -->

Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>
Co-authored-by: Sergiy Dybskiy <sergiy.dybskiy@sentry.io>

This branch had an error being deployed

2 failed deployments
Preview – develop-docs — 4873c1a2 Deployed Oct 15, 2026 by vercel[bot]
Preview – sentry-docs — 4873c1a2 Deployed Oct 15, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Priority: Needs Triage The PR description is missing valid priority information

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants