chore(pretalx): pin OpenAPI spec to local snapshot#230
Open
rileychh wants to merge 1 commit intofix-fringe-ci-envfrom
Open
chore(pretalx): pin OpenAPI spec to local snapshot#230rileychh wants to merge 1 commit intofix-fringe-ci-envfrom
rileychh wants to merge 1 commit intofix-fringe-ci-envfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
pan93412
approved these changes
May 5, 2026
The generator's input was the live URL https://docs.pretalx.org/schema.yml, run on every `postinstall`. That meant the committed `loaders/pretalx/oapi/*.gen.ts` files were rewritten every time someone ran `pnpm install`, picking up whatever pretalx published that day (new endpoints, renamed path params, JSDoc tweaks). Deploy CI dodged it with `pnpm install --ignore-scripts`, but every developer install and the code-quality CI install caused churn. - Snapshot the upstream spec into `loaders/pretalx/schema.yml`. - Point `openapi-ts.config.ts` at the local snapshot. - Remove the `postinstall` hook. Add `gen:pretalx` (regen from the snapshot) and `gen:pretalx:refresh` (re-fetch the spec then regen) scripts. - Regenerate `*.gen.ts` once so the committed output matches the pinned snapshot. Now `pnpm install` is a no-op for the SDK, and refreshing pretalx becomes one explicit command whose schema and SDK changes land in the same commit.
bbd990d to
e9f0ae2
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The pretalx OpenAPI generator was set to fetch
https://docs.pretalx.org/schema.ymlon everypostinstall, so the committedloaders/pretalx/oapi/*.gen.tsfiles were rewritten every time anyone ranpnpm install— picking up whatever pretalx published that day (new endpoints, renamed path params, doc tweaks). Deploy CI dodged it with--ignore-scripts, but developer installs and the code-quality CI run kept producing dirtygit statusand noisy diffs.This PR pins the spec so the SDK is reproducible:
loaders/pretalx/schema.yml.openapi-ts.config.tsat the local snapshot.postinstall: openapi-ts. Add two explicit scripts:pnpm gen:pretalx— regenerate from the snapshotpnpm gen:pretalx:refresh— re-fetch upstream then regenerate*.gen.tsonce so the committed output matches the pinned schema.After this,
pnpm installno longer touches the generated files. Refreshing pretalx becomes one explicit command, and the schema + SDK changes land together in one reviewable commit.Test plan
pnpm install— no changes appear underloaders/pretalx/oapi/.pnpm gen:pretalx— runs cleanly; running it twice in a row produces zero diff (deterministic).pnpm type-check— passes against the regenerated files.pnpm dev— agenda page (/2025/sessions/) and topics page (/2025/topics/) render real pretalx data, no console errors. Verified against both the cache CDN andhttps://pretalx.coscup.orgdirectly.