Skip to content

dropbox: propagate caller contexts to SDK requests - #9712

Merged
ncw merged 1 commit into
rclone:masterfrom
DebadityaHait:fix/dropbox-context-cancellation
Aug 2, 2026
Merged

ncw merged 1 commit into
rclone:masterfrom
DebadityaHait:fix/dropbox-context-cancellation

Conversation

@DebadityaHait

@DebadityaHait DebadityaHait commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Fixes #9688.

Switch the Dropbox backend’s stored SDK clients to their context-aware variants and pass caller contexts through the API call sites.

Batch upload finalization continues to use its independently owned batcher context, so its lifecycle is unchanged. Add a regression test that verifies an in-flight metadata request returns promptly when its caller context is cancelled.

Tests:

  • go test -count=1 -v ./backend/dropbox (including real TestDropbox integration)
  • go test -count=1 -run '^TestInternalGetMetadataCancellation$' ./backend/dropbox
  • go build

@ncw ncw left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great - thank you :-)

The regression test is a nice touch.

I verified there are no remaining non-context SDK calls in the package, and build, vet and the unit tests all pass locally. CI is green.

One small thing I will tidy when merging: the commit summary should be user-facing and reference the issue, per CONTRIBUTING.md, e.g. "dropbox: fix Ctrl-C and --max-duration not stopping in-flight requests - fixes #9688". Nothing needed from you on that.

@ncw

ncw commented Aug 1, 2026

Copy link
Copy Markdown
Member

Can you fix the conflict for this (maybe update the commit message while you are doing so?)

Thank you

@DebadityaHait
DebadityaHait force-pushed the fix/dropbox-context-cancellation branch from ae9aedd to 590e1e5 Compare August 1, 2026 14:51
@ncw
ncw merged commit c97ab80 into rclone:master Aug 2, 2026
9 checks passed
@ncw

ncw commented Aug 2, 2026

Copy link
Copy Markdown
Member

Thank you :-)

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.

dropbox: backend SDK calls do not propagate caller cancellation

2 participants