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

tough: Genericize file transport #488

Merged
merged 5 commits into from
Nov 8, 2019
Merged

tough: Genericize file transport #488

merged 5 commits into from
Nov 8, 2019

Conversation

iliana
Copy link
Contributor

@iliana iliana commented Nov 7, 2019

Issue #, if available: n/a

Description of changes:
This makes the file transport for tough generic, instead of only using a combination of std::fs::File::open and reqwest::Client::get depending on the URL scheme.

This enables us to override the transport in updog to add host status telemetry for monitoring how updates are actually going (we'd create something similar to tough's new impl Transport for reqwest::Client but we'd add query parameters to the end of the URL).

updog works:

bash-5.0# updog check-update -a
aws-k8s-0.1.6 (v0.0)
aws-k8s-0.1.5 (v0.0)
aws-k8s-0.1.4 (v0.0)
aws-k8s-0.1.2 (v0.0)
aws-k8s-0.1.1 (v0.0)

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Signed-off-by: iliana destroyer of worlds <[email protected]>
This allows users of tough to add additional functionality when making
requests, such as authenticating requests or adding additional HTTP
headers.

Signed-off-by: iliana destroyer of worlds <[email protected]>
@iliana iliana requested a review from sam-aws November 7, 2019 17:51
Copy link
Contributor

@tjkirch tjkirch left a comment

Choose a reason for hiding this comment

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

Nice. No blockers from me, just waiting for the final testing to be in the description.

workspaces/updater/tough/src/fetch.rs Show resolved Hide resolved
workspaces/updater/tough/src/lib.rs Outdated Show resolved Hide resolved
workspaces/updater/updog/src/main.rs Outdated Show resolved Hide resolved
Signed-off-by: iliana destroyer of worlds <[email protected]>
Signed-off-by: iliana destroyer of worlds <[email protected]>
Copy link
Contributor

@sam-aws sam-aws left a comment

Choose a reason for hiding this comment

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

🚋

@iliana iliana merged commit cb17aef into develop Nov 8, 2019
@iliana iliana deleted the tough-generic-transport branch November 8, 2019 00:57
@iliana iliana added this to the v0.2.0 milestone Nov 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.

3 participants