Add type annotations to Airbyte API, service, and schema#1328
Add type annotations to Airbyte API, service, and schema#1328Harsh06-afk wants to merge 1 commit intoDalgoT4D:mainfrom
Conversation
WalkthroughThis PR adds explicit type annotations to Airbyte API endpoints and service functions across three files. New response schema classes are defined, service functions receive return type hints, and API route decorators now declare their response schemas for type safety and documentation. ChangesType Annotation for Airbyte APIs and Services
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. 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. Review rate limit: 0/1 reviews remaining, refill in 60 minutes.Comment |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
ddpui/ddpairbyte/airbyte_service.py (1)
1122-1130:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winRemove the stray debug print.
print()here bypasses the project logger and will leak every version lookup to stdout. Please switch this tologger.debug(...)or remove it entirely.♻️ Suggested fix
- print(res, "AIRBYTE RESPONSE") + logger.debug("AIRBYTE RESPONSE: %s", res)🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@ddpui/ddpairbyte/airbyte_service.py` around lines 1122 - 1130, The stray print in get_current_airbyte_version prints sensitive info to stdout; replace the print(res, "AIRBYTE RESPONSE") with a logger.debug call or remove it entirely so version lookups use the project's logger. Update the call near get_current_airbyte_version (and any similar debug prints around abreq usage) to use logger.debug(...) with a concise message and the res variable if needed.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Outside diff comments:
In `@ddpui/ddpairbyte/airbyte_service.py`:
- Around line 1122-1130: The stray print in get_current_airbyte_version prints
sensitive info to stdout; replace the print(res, "AIRBYTE RESPONSE") with a
logger.debug call or remove it entirely so version lookups use the project's
logger. Update the call near get_current_airbyte_version (and any similar debug
prints around abreq usage) to use logger.debug(...) with a concise message and
the res variable if needed.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: e8561921-fb74-4c36-8601-56e52d8d369a
📒 Files selected for processing (3)
ddpui/api/airbyte_api.pyddpui/ddpairbyte/airbyte_service.pyddpui/ddpairbyte/schema.py
Closes #1015
Changes
ddpui/ddpairbyte/schema.pyAdded 14 new response schemas:
AirbyteSourceDefinition,AirbyteSourceReadAirbyteDestinationDefinition,AirbyteDestinationReadAirbyteSourceIdResponse,AirbyteDestinationIdResponseAirbyteCheckConnectionResponseAirbyteJobStatusResponse,AirbyteJobStatusWithoutLogsResponseAirbyteSuccessResponse,AirbyteTaskResponseAirbyteSyncHistoryItemResponse,AirbyteSyncHistoryResponseAirbyteSchemaChangeResponse,AirbyteCancelJobResponseddpui/api/airbyte_api.pyAdded
response=type annotations to all 31 previously untyped endpoints.ddpui/ddpairbyte/airbyte_service.pyget_source_definitions,get_sources(List[Dict]→dict),get_jobs_for_connection(int | None→dict)get_workspaces,delete_workspace,create_custom_source_definition,check_source_connection_for_update,check_destination_connection_for_update,get_current_airbyte_versionSummary by CodeRabbit
Release Notes