Conversation
…erRawFiles class attribute access Co-Authored-By: lucas.leadbetter@airbyte.io <lucas.leadbetter@gmail.com>
Contributor
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Co-Authored-By: lucas.leadbetter@airbyte.io <lucas.leadbetter@gmail.com>
Contributor
👋 Greetings, Airbyte Team Member!Here are some helpful tips and reminders for your convenience. 💡 Show Tips and TricksPR Slash CommandsAirbyte Maintainers (that's you!) can execute the following slash commands on your PR:
📚 Show Repo GuidanceHelpful Resources
|
Contributor
|
Contributor
|
Deploy preview for airbyte-docs ready! ✅ Preview Built with commit de4ccb7. |
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
Fixes a bug where
source-gcscrashes withtype object 'DeliverRawFiles' has no attribute 'delivery_type'whenever a.zipfile is encountered during file listing. This means zip file extraction has never worked in this connector.Related discussion: #73292
How
DeliverRawFilesis a Pydantic v1BaseModel. Itsdelivery_typeis a model field (defined viaField(...)), not a class attribute — soDeliverRawFiles.delivery_typeraisesAttributeError. The broadexcept Exceptioninget_matching_filescatches and logs it, preventing the entire file listing from succeeding.The fix replaces:
with:
This is semantically equivalent (checking "is the delivery method NOT raw file transfer?") and avoids the invalid class attribute access.
Review guide
airbyte-integrations/connectors/source-gcs/source_gcs/stream_reader.py— the one-line fix (line 112)docs/integrations/sources/gcs.md— changelog entrymetadata.yamlandpyproject.toml(0.10.5 → 0.10.6)Key review items:
isinstancecheck correctly captures the original intent (skip zip expansion only when using raw file transfer mode)delivery_methodisairbyte_hidden=Truein the GCS config, defaulting toDeliverRecords, so in practice the zip expansion path should always be taken for GCS users todayUser Impact
Users can now sync
.zipfiles from GCS buckets. Previously, any bucket containing.zipfiles would fail during file listing with anAttributeError.Can this PR be safely reverted and rolled back?
Link to Devin run: https://app.devin.ai/sessions/079661b7286a46be813512095ce5d4a9
Requested by: @lleadbet