Skip to content

Regenerate SDK from latest OpenAPI spec and move changelog to GitHub Releases - #25

Open
kwent wants to merge 4 commits into
masterfrom
devin/1791355020-regenerate-client
Open

kwent wants to merge 4 commits into
masterfrom
devin/1791355020-regenerate-client

Conversation

@kwent

@kwent kwent commented Oct 7, 2026 •

Copy link
Copy Markdown
Member

Summary

Regenerates rootly_sdk/ from the latest Rootly OpenAPI spec and makes regeneration reproducible. Past regens flip-flopped between Union[Unset, str] and str | Unset, and between with and without quote() on path params, because each was run with whatever openapi-python-client happened to be installed. Versions before 0.27 produce the old style. #14 was generated with one of those, after #6 and #11 had used a newer version.

API changes

  • Added: alert configuration, private agents, problems and problem action items, status page teams, phone number verify and resend verification.
  • BREAKING: removed the alert re-trigger rule endpoints and their models. They're no longer in the published spec.

Reproducible regeneration

fetch-spec:  curl … -o tools/swagger.json   # gitignored
             uv run python tools/fix_openapi_escalation_paths.py tools/swagger.json  # was documented but never wired in
             uv run python tools/fix_nullable_severity.py tools/swagger.json         # new
generate:    uv run --python 3.12 --group dev openapi-python-client generate --path tools/swagger.json --meta none --output-path rootly_sdk …
             fix_nullable_enums.py, then `uv run --group dev ruff check --fix / ruff format`
regenerate:  fetch-spec generate
  • pyproject.toml adds [dependency-groups] dev = ["openapi-python-client==0.29.0; python_version >= '3.11'", "ruff==0.16.3"], locked in uv.lock. Dependabot now has a uv entry, so bumps to these come in as their own PRs.
  • The marker is there because openapi-python-client 0.29.0 requires Python 3.11+. The SDK itself still supports 3.10.
  • --meta none --output-path rootly_sdk stops the generator from overwriting pyproject.toml and README.md.
  • tools/config.yaml sets post_hooks: []. Previously the post hooks ran whatever ruff was on PATH, sometimes before [tool.ruff] config (line-length 120) was in place.
  • fix_openapi_escalation_paths.py is needed because without it PUT /v1/escalation_paths/{id} (update_escalation_path) silently goes missing. It now also drops the title on each variant.
  • fix_nullable_severity.py extracts the inline nullable_severity_response.data into its own component. Without that, the generator emits a duplicate NullableSeverityResponseType0Data and drops the model, which breaks tests/test_incident_response.py (the Fix incident severity null deserialization #19 regression test).
  • The move to 0.29.0 explains most of the churn in untouched files: URL-escaped path params and X | Unset docstrings. That is now the stable style.
  • Reproducibility check: running make generate twice on the same spec produced byte-identical trees, and there's no diff against the committed output.

Release flow, aligned with rootly-ts / rootly-swift

  • CHANGELOG.md now points to GitHub Releases. Older entries are kept under "Older releases".
  • The pyproject Changelog URL now points to Releases.
  • make bump-* no longer edits CHANGELOG.md.
  • publish.yml gains a release job that runs after the PyPI publish. It checks out the repo and fetches the annotated tag. It then promotes the most recent Release Drafter draft, whatever tag the draft resolved to, and renames it to the pushed tag. The annotated tag message is prepended under ## Highlights. Without a draft, it falls back to gh release create --verify-tag --generate-notes. This is the same logic as rootly-swift, and rootly-ts gets it in rootly-ts#43. .github/PUBLISHING.md now recommends annotated tags.
  • release-drafter.yml uses the breaking and enhancement version resolvers and the v$RESOLVED_VERSION tag.

Validation

  • ruff check and ruff format --check pass (0.16.3).
  • Tests pass on Python 3.10, 3.12 and 3.14.
  • uv build passes.
  • actionlint reports no new findings; the only one is the existing unknown blacksmith-* runner label.

Risk: low. This is a generated SDK refresh and doesn't touch any deployed service. Anyone using the removed endpoints will break when they upgrade, so the release should be a major bump.

Link to Devin session: https://rootly.devinenterprise.com/sessions/af696ad13f4e47a09908c76ef0b67191
Open in Devin Desktop: https://rootly.devinenterprise.com/desktop/session/af696ad13f4e47a09908c76ef0b67191?variant=devin
Requested by: @kwent

@kwent
kwent requested a review from a team October 7, 2026 07:52
@devin-ai-integration

Copy link
Copy Markdown

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Oct 7, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant