fix(service): restore services package imports - #834
Draft
LucStr wants to merge 2 commits into
Draft
Conversation
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Co-Authored-By: luca@rapidata.ai <25279790+LucStr@users.noreply.github.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Co-Authored-By: luca@rapidata.ai <25279790+LucStr@users.noreply.github.com>
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.
What
src/rapidata/service/services/__init__.pystill importedpipeline_serviceandworkflow_service, which were deleted in #830 (refactor!: remove order flow and pipeline/workflow APIs from the SDK). It also never listedpayment_service/translation_service, which do exist and are used.Why this breaks every API call, not just pipelines
openapi_service.pyreaches each backend service through a lazyfrom rapidata.service.services.<name>_service import .... That import runs the package__init__first, so one dead name there takes down every service accessor:Reproduced on
mainand against the published 3.21.0 wheel.Found in production traces —
rapidata-testingE2E on 3.21.0:Changes
PaymentService,TranslationService).tests/service/test_services_package.py— asserts every__all__name resolves and every*_service.pyon disk is exported, so the next removal that forgets__init__fails CI instead of shipping.Verified the guard catches the regression: reverting
__init__.pyturns the new test into a collection error.Test
The 4 failures are in
tests/rapidata_client/audience/and reproduce unchanged onmain— unrelated to this PR.Why CI didn't catch it
Two independent gaps, both closed here:
pyright never looked at it.
pyrightconfig.jsonincluded onlysrc/rapidata/rapidata_client, and the workflow pinnedworking-directoryto the same path — sosrc/rapidata/service/was never type-checked. Widening the config to include it reports the bug directly:src/rapidata/service/is already clean under pyright, so this adds a guard without adding noise:uv run pyright→ 0 errors.There is no pytest workflow.
.github/workflows/runs pyright, docs and release only, so the new test in this PR will not gate a future PR until a test job exists. I left that out deliberately —pytest testsis currently red onmain(4 pre-existing failures intests/rapidata_client/audience/), so adding the job belongs in a PR that also fixes or quarantines those. Worth doing next.🔗 Session: https://poseidon.rapidata.internal/chat/node-18f661b70117