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

Credentials: use aggressive IAM timeout #55

Closed
matthewkmayer opened this issue Aug 28, 2015 · 4 comments
Closed

Credentials: use aggressive IAM timeout #55

matthewkmayer opened this issue Aug 28, 2015 · 4 comments

Comments

@matthewkmayer
Copy link
Member

If the credentials chain fails on finding environment or file based credentials, say from providing a bad credentials profile name, we're calling the IAM metadata service to find creds. If we're running on a dev laptop it will sit until it times out which is probably 60 seconds.

Let's drop that timeout to say 15 seconds.

@matthewkmayer
Copy link
Member Author

This will be either set_write_timeout or set_read_timeout:

https://github.com/hyperium/hyper/blob/d32d35bbea947172224082e1f9b711022ce75e30/src/client/request.rs#L49

@matthewkmayer matthewkmayer self-assigned this Sep 2, 2015
@matthewkmayer
Copy link
Member Author

Looks like this feature in Rust, thus seen in Hyper, hasn't settled down quite yet: rust-lang/rust#27773 .

src/lib.rs:4:1: 4:22 error: #[feature] may not be used on the stable release channel
src/lib.rs:4 #![feature(duration)]

@matthewkmayer matthewkmayer removed their assignment Sep 2, 2015
@matthewkmayer
Copy link
Member Author

The rust-lang issue has been fixed and closed: I'm not sure if it's coming in Rust 1.4 or 1.5. Then Hyper will need to be updated to allow timeout to be specified and handled.

@matthewkmayer
Copy link
Member Author

Our time crate is deprecated: https://github.com/rust-lang-deprecated/time . We should switch to the standard library: https://doc.rust-lang.org/std/time/struct.Duration.html .

This also means we'll need to bump our docs (README and/or CONTRIBUTING) to show we need Rust 1.5+.

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

No branches or pull requests

1 participant