Skip to content

ci(options): Validate sentry-options schema changes on PRs - #669

Merged
NicoHinderling merged 2 commits into
mainfrom
ci/validate-sentry-options-schema
Sep 3, 2026
Merged

ci(options): Validate sentry-options schema changes on PRs#669
NicoHinderling merged 2 commits into
mainfrom
ci/validate-sentry-options-schema

Conversation

@NicoHinderling

Copy link
Copy Markdown
Contributor

Adds the sentry-options schema-validation workflow from the onboarding guide — the piece that was missing after the initial integration (#668).

It runs on PRs that touch sentry-options/schemas/** (or uv.lock) and calls the reusable getsentry/sentry-options/.github/workflows/validate-schema.yml to check two things: that the schema is well-formed, and — the important part — that a change doesn't violate the schema-evolution rules, like changing an option's type or default or making another backward-incompatible edit. Those are the changes that would break already-deployed readers of an option, and the existing test suite can't catch them: init() only validates that a schema is well-formed, with no visibility into the previous version.

Follows seer's two-job pattern: a first job parses the pinned sentry-options version out of uv.lock so validation runs the exact same CLI version the service depends on (1.2.9 today), and the reusable workflow is SHA-pinned to the matching release. The workflow validates its own PR (no schema change here, so it passes cleanly), which confirms the wiring.

Add the sentry-options schema-validation workflow from the onboarding
guide. It runs on PRs that touch sentry-options/schemas, catching both
malformed schemas and illegal schema evolution — changing an option's
type or default, and other backward-incompatible edits — before they
reach the automator and break deployed readers.

The test suite's init() only checks a schema is well-formed; it can't
see the previous schema, so this closes the evolution-safety gap. The
CLI version is parsed from uv.lock so validation runs the same
sentry-options version the service pins.
Comment thread .github/workflows/validate-sentry-options.yml Fixed
Comment thread .github/workflows/validate-sentry-options.yml Fixed
Add an explicit top-level `permissions: contents: read` so the workflow
does not inherit the default broad GITHUB_TOKEN scope (flagged by
CodeQL). Read access is all the checkout and the reusable validation
workflow need.
@NicoHinderling
NicoHinderling merged commit 4db83f7 into main Sep 3, 2026
26 checks passed
@NicoHinderling
NicoHinderling deleted the ci/validate-sentry-options-schema branch September 3, 2026 21:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants