Skip to content

chore(pretalx): pin OpenAPI spec to local snapshot#230

Open
rileychh wants to merge 1 commit intofix-fringe-ci-envfrom
pin-pretalx-spec
Open

chore(pretalx): pin OpenAPI spec to local snapshot#230
rileychh wants to merge 1 commit intofix-fringe-ci-envfrom
pin-pretalx-spec

Conversation

@rileychh
Copy link
Copy Markdown
Member

@rileychh rileychh commented May 4, 2026

Summary

The pretalx OpenAPI generator was set to fetch https://docs.pretalx.org/schema.yml on every postinstall, so the committed loaders/pretalx/oapi/*.gen.ts files were rewritten every time anyone ran pnpm 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 dirty git status and noisy diffs.

This PR pins the spec so the SDK is reproducible:

  • Snapshot the upstream spec into loaders/pretalx/schema.yml.
  • Point openapi-ts.config.ts at the local snapshot.
  • Remove postinstall: openapi-ts. Add two explicit scripts:
    • pnpm gen:pretalx — regenerate from the snapshot
    • pnpm gen:pretalx:refresh — re-fetch upstream then regenerate
  • Regenerate *.gen.ts once so the committed output matches the pinned schema.

After this, pnpm install no 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 under loaders/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 and https://pretalx.coscup.org directly.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 4, 2026

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

Project Deployment Actions Updated (UTC)
2025 Ready Ready Preview, Comment May 10, 2026 8:42am

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.
@rileychh rileychh force-pushed the pin-pretalx-spec branch from bbd990d to e9f0ae2 Compare May 10, 2026 08:40
@rileychh rileychh changed the base branch from main to fix-fringe-ci-env May 10, 2026 08:40
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.

2 participants