Skip to content

bug: airbyte-api 1.0.0 has forward-reference errors and breaking API changes vs 0.53.0 #178

Description

@devin-ai-integration

Summary

airbyte-api==1.0.0 introduces three categories of breaking changes that prevent PyAirbyte from upgrading. Full regression test results are in airbytehq/PyAirbyte#1048.

1. Forward-reference errors in generated models (code generation bug)

Two models have forward-reference issues where classes/enums are used before they are defined:

SourceResponseNameError on import

from airbyte_api.models import SourceResponse
# NameError: name "SourceGoogleAnalyticsDataAPISchemasCustomReportsArrayDimensionFilter
# DimensionsFilter2ExpressionsFilterFilter4ToValueValueType" is not defined

Root cause: In source_google_analytics_data_api_schemas_custom_reports_array_int64value.py, the enum ...Filter4ToValueValueType is referenced at line 1422 (inside a class body) but defined at line 1457. Python evaluates class bodies eagerly, so the name is not yet available.

ConnectionResponsePydanticUserError on construction

models.ConnectionResponse(connection_id="x", ...)
# pydantic.errors.PydanticUserError: `ConnectionResponse` is not fully defined;
# you should define `RowFilteringOperationNot`, then call `ConnectionResponse.model_rebuild()`.

Root cause: Same class of issue — a Pydantic model references RowFilteringOperationNot as a forward reference, but it has not been resolved when the model is first used.

Both are code-generation ordering bugs — the Speakeasy generator is emitting class definitions in the wrong order.

2. API method signatures changed to keyword-only arguments

All SDK resource methods (e.g., Workspaces.get_workspace, Sources.create_source, Jobs.list_jobs, etc.) now require request= to be passed as a keyword argument. In 0.53.0, positional passing was allowed. This is a breaking change for all existing callers.

Example — this worked in 0.53.0 but fails in 1.0.0:

# 0.53.0 (works)
api_instance.workspaces.get_workspace(api.GetWorkspaceRequest(workspace_id="..."))

# 1.0.0 (requires keyword)
api_instance.workspaces.get_workspace(request=api.GetWorkspaceRequest(workspace_id="..."))

Pyrefly reports 39 type errors across airbyte/_util/api_util.py: [unexpected-positional-argument], [bad-argument-count], and [bad-argument-type].

3. Response type changes break duck-typing protocols

Response objects (e.g., CreateWorkspaceResponse, ListJobsResponse, PatchSourceResponse) have a changed .raw_response type that is no longer structurally compatible with PyAirbyte's AirbyteApiResponseDuckType protocol. Pyrefly reports these as [bad-argument-type] errors.

Impact

Reproduction

pip install airbyte-api==1.0.0
python -c "from airbyte_api.models import SourceResponse"  # NameError

Environment

  • Python 3.10, 3.11, 3.12 (all affected)
  • Ubuntu and Windows (all affected)
  • airbyte-api 0.53.0 → 1.0.0

Devin session

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions