✨feat(source-google-drive): Introduce File Based Stream Permissions Reader#55689
Merged
Aldo Gonzalez (aldogonzalez8) merged 6 commits intomasterfrom Mar 14, 2025
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
| config=config, | ||
| state=state, | ||
| cursor_cls=DefaultFileBasedCursor, | ||
| stream_permissions_reader=SourceGoogleDriveStreamPermissionsReader(), |
Contributor
Author
There was a problem hiding this comment.
I will adjust this in the future to use class members with less complexity and with looser coupling between classes constructing objects of other classes. But for now, this is enough to decouple ACL/Identities method from general reader so we don't block CDK bump/updates on other file-based connectors for which permissions streams are not relevant at the moment.
Natik Gadzhi (natikgadzhi)
approved these changes
Mar 14, 2025
Sven Pöche (Valgard)
pushed a commit
to mayflower/airbyte
that referenced
this pull request
Mar 25, 2025
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
Refactors the Google Drive source connector by moving permissions-related functionality from
SourceGoogleDriveStreamReaderto a dedicatedSourceGoogleDriveStreamPermissionsReaderclass.This change follows the separation of concerns principle and aligns with the abstract base classes provided by the Airbyte CDK.
TL;DR: we don't need to do things like this in other connectors and want to fix this once CDK PR is merged.
Changes in CDK: https://github.com/airbytehq/airbyte-python-cdk/pull/402/files
How
SourceGoogleDriveStreamPermissionsReaderclass that implementsAbstractFileBasedStreamPermissionsReaderSourceGoogleDriveStreamReader:get_file_acl_permissionsload_identity_groupsfile_permissions_schemaidentities_schemaReview guide
source_google_drive/stream_permissions_reader.py- New file containing all permissions-related functionalitysource_google_drive/stream_reader.py- removal of permissions-related codeUser Impact
Can this PR be safely reverted and rolled back?
This is a pure refactoring PR that moves code without changing its behavior. Rolling back would simply move the code back to its original location without affecting functionality.