Skip to content

fix(source-gcs): fix zip file extraction crash due to incorrect DeliverRawFiles class attribute access#73332

Open
lleadbet wants to merge 3 commits intomasterfrom
devin/1771003995-fix-source-gcs-zip-delivery-type
Open

fix(source-gcs): fix zip file extraction crash due to incorrect DeliverRawFiles class attribute access#73332
lleadbet wants to merge 3 commits intomasterfrom
devin/1771003995-fix-source-gcs-zip-delivery-type

Conversation

@lleadbet
Copy link
Contributor

@lleadbet lleadbet commented Feb 13, 2026

What

Fixes a bug where source-gcs crashes with type object 'DeliverRawFiles' has no attribute 'delivery_type' whenever a .zip file is encountered during file listing. This means zip file extraction has never worked in this connector.

Related discussion: #73292

How

DeliverRawFiles is a Pydantic v1 BaseModel. Its delivery_type is a model field (defined via Field(...)), not a class attribute — so DeliverRawFiles.delivery_type raises AttributeError. The broad except Exception in get_matching_files catches and logs it, preventing the entire file listing from succeeding.

The fix replaces:

self.config.delivery_method.delivery_type != DeliverRawFiles.delivery_type

with:

not isinstance(self.config.delivery_method, DeliverRawFiles)

This is semantically equivalent (checking "is the delivery method NOT raw file transfer?") and avoids the invalid class attribute access.

Review guide

  1. airbyte-integrations/connectors/source-gcs/source_gcs/stream_reader.py — the one-line fix (line 112)
  2. docs/integrations/sources/gcs.md — changelog entry
  3. Version bumps in metadata.yaml and pyproject.toml (0.10.5 → 0.10.6)

Key review items:

  • Confirm isinstance check correctly captures the original intent (skip zip expansion only when using raw file transfer mode)
  • Note that delivery_method is airbyte_hidden=True in the GCS config, defaulting to DeliverRecords, so in practice the zip expansion path should always be taken for GCS users today
  • No tests were added — the existing code path was never reachable due to this bug, so there was no test coverage for it. A reviewer may want to consider whether a unit test should be added.

User Impact

Users can now sync .zip files from GCS buckets. Previously, any bucket containing .zip files would fail during file listing with an AttributeError.

Can this PR be safely reverted and rolled back?

  • YES 💚

Link to Devin run: https://app.devin.ai/sessions/079661b7286a46be813512095ce5d4a9
Requested by: @lleadbet

…erRawFiles class attribute access

Co-Authored-By: lucas.leadbetter@airbyte.io <lucas.leadbetter@gmail.com>
@devin-ai-integration
Copy link
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Co-Authored-By: lucas.leadbetter@airbyte.io <lucas.leadbetter@gmail.com>
@github-actions
Copy link
Contributor

👋 Greetings, Airbyte Team Member!

Here are some helpful tips and reminders for your convenience.

💡 Show Tips and Tricks

PR Slash Commands

Airbyte Maintainers (that's you!) can execute the following slash commands on your PR:

  • 🛠️ Quick Fixes
    • /format-fix - Fixes most formatting issues.
    • /bump-version - Bumps connector versions, scraping changelog description from the PR title.
  • ❇️ AI Testing and Review:
    • /ai-docs-review - Provides AI-powered documentation recommendations for PRs with connector changes.
    • /ai-prove-fix - Runs prerelease readiness checks, including testing against customer connections.
    • /ai-canary-prerelease - Rolls out prerelease to 5-10 connections for canary testing.
    • /ai-review - AI-powered PR review for connector safety and quality gates.
  • 🚀 Connector Releases:
    • /publish-connectors-prerelease - Publishes pre-release connector builds (tagged as {version}-preview.{git-sha}) for all modified connectors in the PR.
    • /bump-progressive-rollout-version - Bumps connector version with an RC suffix (2.16.10-rc.1) for progressive rollouts (enableProgressiveRollout: true).
      • Example: /bump-progressive-rollout-version changelog="Add new feature for progressive rollout"
  • ☕️ JVM connectors:
    • /update-connector-cdk-version connector=<CONNECTOR_NAME> - Updates the specified connector to the latest CDK version.
      Example: /update-connector-cdk-version connector=destination-bigquery
    • /bump-bulk-cdk-version bump=patch changelog='foo' - Bump the Bulk CDK's version. bump can be major/minor/patch.
  • 🐍 Python connectors:
    • /poe connector source-example lock - Run the Poe lock task on the source-example connector, committing the results back to the branch.
    • /poe source example lock - Alias for /poe connector source-example lock.
    • /poe source example use-cdk-branch my/branch - Pin the source-example CDK reference to the branch name specified.
    • /poe source example use-cdk-latest - Update the source-example CDK dependency to the latest available version.
  • ⚙️ Admin commands:
    • /force-merge reason="<REASON>" - Force merges the PR using admin privileges, bypassing CI checks. Requires a reason.
      Example: /force-merge reason="CI is flaky, tests pass locally"
📚 Show Repo Guidance

Helpful Resources

📝 Edit this welcome message.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 13, 2026

source-gcs Connector Test Results

40 tests   33 ✅  37s ⏱️
 2 suites   6 💤
 2 files     1 ❌

For more details on these failures, see this check.

Results for commit de4ccb7.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 13, 2026

Deploy preview for airbyte-docs ready!

✅ Preview
https://airbyte-docs-lwu9o5z9v-airbyte-growth.vercel.app

Built with commit de4ccb7.
This pull request is being automatically deployed with vercel-action

@lleadbet lleadbet marked this pull request as ready for review February 18, 2026 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments