Repository navigation
refactor: split GDriveConnection into a Drive client, layout, and one class per job - #9600
Merged
Merged
Conversation
The batch callback ignored any error whose text contained "alreadyShared". Tested live on real Drive: sharing a folder with a user who already has access returns that permission with status 200, in single and batch requests. Drive never sends an "alreadyShared" error, so the text check could only hide real errors.
…eckpoint Nothing called it: ConnectionRouter.get_events_count_since_checkpoint counts through OwnerStore.count_events_since, which parses each event name. This method matched the name prefix by hand instead, so the two could disagree.
Resolve the overlap with the transport PRs on dev (#9594, #9595, #9597, #9599): - The manager builds the transport at init, as on dev. as_transport, the router's connection list and transport_for_thread are gone. - Each Drive component holds the DriveLayout and its own Drive code, as on this branch. - Each component copies itself for another thread with clone_for_thread, as on dev. The copy runs over a layout clone with a new Drive service, which GDriveClient builds with its new_service factory. - Inbox and outbox reading move into DriveP2PConnection, with dev's parallel receive and batched archive. delete_all moves into DriveOwnerStore. GDriveConnection only logs in and builds the layout. - Tests reach Drive through drive_layout_of(transport), which replaces gdrive_connection_of.
GDriveConnection only logged in and built the DriveCachedClient, so the login constructors (from_config, from_token_path, from_service) now live on DriveCachedClient and gdrive_transport.py is gone. build_drive_service and SCOPES move to gdrive_client.py. SyftboxPlatformConnection and GdriveConnectionConfig.connection_type had no other users and are removed.
koenvanderveen
approved these changes
Oct 30, 2026
koenvanderveen
marked this pull request as ready for review
October 30, 2026 12:16
koenvanderveen
approved these changes
Oct 30, 2026
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.
Summary
Third connsplit v1.1 PR: the Drive code moves out of
GDriveConnectioninto a shared client, a folder layout and one class pertransport job, and this fixes the Drive bugs found along the way. Base:pjwerneck/drive-transport-fixes.Changes
GDriveClientholds the Drive service and the raw calls (files, permissions, paged listing).DriveLayoutholds syft's folder names, version rules and folder-id caches.DriveOwnerStore,DriveCollections,DrivePeeringandDriveP2PConnectionnow hold their job's Drive code under the contract names.GDriveConnectiongoes from 2,472 to about 450 lines: setup, message reading and account cleanup.transport_for_thread()for thread copies).Testing
Asana task