Skip to content

protondrive: use volume-scoped v2 drive routes - #4

Draft
ClaudiuSchuster wants to merge 4 commits into
masterfrom
oss-oo/bridge-v2-volume-routes-16trayproton
Draft

ClaudiuSchuster wants to merge 4 commits into
masterfrom
oss-oo/bridge-v2-volume-routes-16trayproton

Conversation

@ClaudiuSchuster

Copy link
Copy Markdown
Member

Proton has deprecated the share-scoped /drive/shares/{shareId}/links*, folders* and files* routes (removal announced within ~12 months, see the rclone forum notice).

Switch every drive call to the volume-scoped v2 routes through MainShare.VolumeID (based on the new volume-route layer in oss-singularity/go-proton-api#1):

  • children listings become ID listing + batched metadata (100 IDs per batch, matching the official SDK)
  • draft creation, revisions, move, checkAvailableHashes, trash and block uploads move to /drive/v2/volumes/{volumeID}/...
  • draft deletion uses the volume delete_multiple route the official SDK uses for drafts
  • the main share resolution verifies the share's volume matches the active volume it was found through
  • moveToTrash drops the now-meaningless parent folder argument

Build, vet and the test suite are green offline; live validation against a real account is in progress. Upstream contribution is planned after live validation.

Receive every block upload result before returning the first error so all workers can release their semaphore slots. Buffer the result channel and return immediately when slot acquisition fails.

Add a regression test which repeats failing batches and then acquires the full semaphore capacity.
Retry only failed encrypted blocks with fresh upload links and bounded context-aware backoff. Preserve successful blocks and return terminal or exhausted errors without replaying the complete file stream.

Refs oss-singularity/proton-drive-linux#42
Proton has deprecated the share-scoped /drive/shares/{shareID}/links*,
folders*, files* and events* routes and will remove them. Switch every
drive call to the volume-scoped v2 routes through MainShare.VolumeID:
ID-based children listings with batched metadata, volume-scoped draft
creation, revisions, move, checkAvailableHashes, trash and block
uploads. The main share resolution now also verifies that the share
volume matches the active volume it was found through.
The volume-scoped client methods live in the oss-singularity go-proton-api
fork. Replace the dependency so the branch builds and lints standalone
until the routes land upstream.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant