chore: build the generator from chat's tools/openapi - #297
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe generation script now builds ChangesOpenAPI Generation
Priority: ⬇️ Low Estimated code review effort: 1 (Trivial) | ~3 minutes Change: Other Merge Risk: ⚪ Minimal · up to The change redirects OpenAPI generation to a dedicated tool. No concrete generation failure or downstream impact is established by the available evidence, so no specific merge-blocking risk is supported. Architecture SummaryArchitecture risk: 🔵 Low · up to The change affects 1 system. Changed systems: Architecture concerns Review detailsSystems and components
Before / after behavior
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Ticket
CHA-5625
Summary
GetStream/chat#17426 moved the OpenAPI generator out of
chat-managerinto its own module,tools/openapi.generate.shnow builds it withmake -C tools/openapi buildand calls./build/openapi generate-clientand./build/openapi generate-webhook-fixturesinstead of./build/chat-manager openapi .... The subcommands and flags are unchanged.chat-manager openapiis only a compatibility path and will be removed in CHA-5626.make openapistays for now because it still generates the specs. A follow-up switches it to the new tool too, and after that it no longer builds./build/chat-manager.Verification
Both scripts ran end to end, including
ruff check --fixandruff format, against the same chat commit (75d154f053, latestmaster).make openapigeneratedreleases/v2/serverside-api.yamleach time, and both runs got the same file (sha256831a2dfa…c7267):generate.shunderbash -x.build/openapidid not exist before this run. The trace showsmake -C tools/openapi buildcreating it, then./build/openapi generate-client --language python ...and./build/openapi generate-webhook-fixtures ... --time-format=unix-nsrunning. I copied every file the run changed: 14 files, all modified.generate.sh, which uses./build/chat-manager openapi .... It changed the same 14 files.cmp. All 14 files are byte-identical.make openapidoes not produce exactly the same spec every time. This is a separate problem in chat:AsyncExportErrorEventis registered under several event types, and itstypedefault switches between them from one run to the next. So I also ran a check against one fixed spec. I ran the rawgenerate-client --language pythonandgenerate-webhook-fixtures --time-format=unix-nscommands on a frozen copy of the spec into two clean worktrees, once with./build/chat-manager openapiand once with./build/openapi. Both changed the same 17 paths before ruff, anddiff -rqfound no differences.A note on running this locally: with uv 0.9.9, a plain
uv runre-resolvesuv.lock(it rewrites theexclude-newer-spanoptions block and upgrades packages) and installs ruff 0.16.9. That ruff version failsruff checkwith 256 errors on existing code, soset -estops the script beforeruff format. That happens with the original script too. I ran both scripts withUV_FROZEN=1so they used the locked ruff 0.15.5, which passes onmaster. A newer uv is probably fine.I then reverted the regenerated output. This PR contains only the
generate.shchange. Regenerating shows unrelated spec drift, which is not part of this PR.Summary by CodeRabbit