fix(api): add deprecated id alias in schedule list responses#182
fix(api): add deprecated id alias in schedule list responses#182SudipSinha wants to merge 1 commit into
Conversation
|
Warning Review limit reached
More reviews will be available in 18 minutes and 14 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (6)
✨ Finishing Touches🧪 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 |
|
PR image build and manifest generation completed successfully! 📦 PR image: 🗂️ CI manifests |
…st responses The id alias was added to compare_means, kolmogorov_smirnov, and jensen_shannon in PR #182 but missed in mmd.py and kolmogorov_smirnov_streaming.py, causing KeyError: 'id' in integration tests for approxkstest and fouriermmd schedules. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Match PR #182 pattern — include both id and requestId in list response for Java API compatibility. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Sudip Sinha <Sudip.Sinha@RedHat.com>
Match PR #182 pattern — include both id and requestId in list response for Java API compatibility. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Sudip Sinha <Sudip.Sinha@RedHat.com>
Match PR #182 pattern — include both id and requestId in list response for Java API compatibility. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Sudip Sinha <Sudip.Sinha@RedHat.com>
Java clients read the id field from GET .../requests responses, but the Python service only returns requestId. Add id as a deprecated alias (same value) for backward compatibility. Tests accept either field and verify equality when both are present, so removing id later won't break them. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Sudip Sinha <Sudip.Sinha@RedHat.com>
Match PR #182 pattern — include both id and requestId in list response for Java API compatibility. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Sudip Sinha <Sudip.Sinha@RedHat.com>
032f3d9 to
4c044f2
Compare
Summary
Java clients read the
idfield fromGET .../requestsschedule list responses, but the Python service only returnsrequestId. This causesKeyError: 'id'in integration tests.Root cause
The Java
ScheduleRequestclass haspublic UUID idwhich Jackson serializes as"id". The Python service uses"requestId"— a clearer name, but incompatible with existing Java API clients.The schedule creation response (
POST .../request) correctly usesrequestIdin both Java (BaseScheduledResponse.getRequestId()) and Python.The fix
Add
"id"as a deprecated alias in list responses, emitting both fields with the same value:{ "id": str(request_id), # deprecated: use requestId "requestId": str(request_id), "modelId": ..., }This preserves backward compatibility with Java API clients while keeping
requestIdas the preferred field name.Files changed
src/endpoints/metrics/drift/compare_means.pyidalias in list responsesrc/endpoints/metrics/drift/kolmogorov_smirnov.pyidalias in list responsesrc/endpoints/metrics/drift/jensen_shannon.pyidalias in list responsesrc/endpoints/metrics/fairness/group/dir.pyidalias in list responsesrc/endpoints/metrics/fairness/group/spd.pyidalias in list responsetests/endpoints/metrics/drift/factory.pyid/requestIdpresent; verify equality when both existTest plan
idorrequestId, verify equality when both presentruff checkcleanruff formatcleanpyrefly checkclean🤖 Generated with Claude Code