Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

provide hooks for custom backends #401

Merged
merged 14 commits into from
Jul 19, 2021
Merged

provide hooks for custom backends #401

merged 14 commits into from
Jul 19, 2021

Conversation

ericphanson
Copy link
Member

Instead of adding a whole new backend as in #396, I thought it would be better to just start with an AbstractBackend to provide hooks to use alternate backends. This way we don't need to bump the Julia requirements to start trying out alternate backends downstream. It also provides a smaller incremental step than having AbstractBackends + a specific alternate backend in the same PR.

This also provides what is hopefully a useful feature: you could do

using AWS
AWS.DEFAULT_BACKEND[] = HTTPBackend(custom_http_options)

to specify custom HTTP options globally in your application (which can still be overwritten per-request); I would have found this useful when trying experiments like tweaking the pipelining and connection pooling settings.

In the same way, a Downloads.jl-based backend could pass a Downloads.Downloader along inside the backend object instead of requiring adding more fields to Request for the downloader like in #396.

@ericphanson
Copy link
Member Author

This still needs tests for the new functionality but I'll kick off bors to see if I correctly updated the tests.

bors try

bors bot added a commit that referenced this pull request Jul 13, 2021
@bors
Copy link
Contributor

bors bot commented Jul 13, 2021

try

Build failed:

@ericphanson
Copy link
Member Author

bors try

bors bot added a commit that referenced this pull request Jul 13, 2021
@bors
Copy link
Contributor

bors bot commented Jul 13, 2021

@ericphanson
Copy link
Member Author

bors try

bors bot added a commit that referenced this pull request Jul 16, 2021
@bors
Copy link
Contributor

bors bot commented Jul 16, 2021

try

Build failed:

@ericphanson
Copy link
Member Author

bors try

bors bot added a commit that referenced this pull request Jul 16, 2021
@bors
Copy link
Contributor

bors bot commented Jul 16, 2021

@ericphanson
Copy link
Member Author

bors try

bors bot added a commit that referenced this pull request Jul 19, 2021
@bors
Copy link
Contributor

bors bot commented Jul 19, 2021

@ericphanson
Copy link
Member Author

bors try

bors bot added a commit that referenced this pull request Jul 19, 2021
@bors
Copy link
Contributor

bors bot commented Jul 19, 2021

@ericphanson ericphanson requested a review from omus July 19, 2021 16:48
@omus
Copy link
Member

omus commented Jul 19, 2021

bors r+

@ericphanson
Copy link
Member Author

Awesome, thanks! Can we get a release with it when it goes through? Excited to use this downstream

@bors
Copy link
Contributor

bors bot commented Jul 19, 2021

@bors bors bot merged commit afb9a38 into JuliaCloud:master Jul 19, 2021
@ericphanson ericphanson deleted the eph/abstractbackend branch July 19, 2021 17:21
bors bot added a commit that referenced this pull request Jul 19, 2021
405: Bump version for feature release r=mattBrzezinski a=ericphanson

to get in #401 

Co-authored-by: Eric Hanson <5846501+ericphanson@users.noreply.github.com>
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.

2 participants