Skip to content

Add context propagation to rclone - #3267

Merged
ncw merged 2 commits into
rclone:masterfrom
ajankovic:ajankovic/propagate_context
Jun 19, 2019
Merged

ncw merged 2 commits into
rclone:masterfrom
ajankovic:ajankovic/propagate_context

Conversation

@ajankovic

Copy link
Copy Markdown
Contributor

Changes:

  • Change rclone/fs interfaces to accept context.Context
  • Update interface implementations to use context.Context
  • Change top level usage to propagate context to lover level functions

Context propagation is needed for stopping transfers and passing other request-scoped values.

Fixes: #3257

Comment thread cmd/info/info.go Outdated

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

File is not goimports-ed (from goimports)

Comment thread backend/cache/cache_internal_test.go Outdated

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

File is not goimports-ed (from goimports)

Comment thread backend/crypt/cipher_test.go Outdated

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

File is not goimports-ed (from goimports)

Comment thread backend/onedrive/onedrive.go Outdated

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

File is not goimports-ed (from goimports)

- Change rclone/fs interfaces to accept context.Context
- Update interface implementations to use context.Context
- Change top level usage to propagate context to lover level functions

Context propagation is needed for stopping transfers and passing other
request-scoped values.
@ajankovic
ajankovic force-pushed the ajankovic/propagate_context branch from 83b86d4 to b38fc40 Compare June 17, 2019 09:07
@ncw

ncw commented Jun 19, 2019

Copy link
Copy Markdown
Member

Thank you for this, will merge now :-)

Alas it is going to break a lot of pending changes, but that can't be helped :-(

@ncw
ncw merged commit f78cd1e into rclone:master Jun 19, 2019
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.

Add context propagation to rclone

3 participants