-
Notifications
You must be signed in to change notification settings - Fork 196
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
WASM example on wasm-unknown-unknown now working e2e #2868
Conversation
A new generated diff is ready to view.
A new doc preview is ready to view. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome!
aws/rust-runtime/clippy.toml
Outdated
@@ -0,0 +1,7 @@ | |||
disallowed-methods = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should there be one of these in rust-runtime/
too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
refactored to have a single file & symlinks
start_time: self.start_time.unwrap_or_else(SystemTime::now), | ||
start_time: self.start_time.unwrap_or_else( | ||
#[allow(clippy::disallowed_methods)] | ||
SystemTime::now, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we make these Option
in the PresigningConfig
and resolve to a default using TimeSource
where they're used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I considered but I think these are actually used in customer code right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe they're only given in the builder when requesting a presigned URL.
A new generated diff is ready to view.
A new doc preview is ready to view. |
Split out a wiremock feature to allow test-util to compile without Hyper
Pulled and built this locally to test and I am still seeing an error from Full error
I've uploaded a repro of my test, you will have to update let shared_config = aws_config::from_env()
.time_source(WasmTimeSource)
.sleep_impl(WasmSleep)
.region(Region::new("us-east-1"))
.credentials_provider(credentials_provider)
.credentials_cache(wasm_credentials_cache())
.http_connector(DynConnector::new(Adapter::new(true)))
.load()
.await; I am not providing a time source directly to the WASM compatible credentials cache (And the code panics if that bit is left out): fn wasm_credentials_cache() -> CredentialsCache {
let shared_sleep = SharedAsyncSleep::new(WasmSleep);
CredentialsCache::lazy_builder()
.sleep(shared_sleep)
.into_credentials_cache()
} But, the I might just be doing this wrong, but if I'm not then this PR doesn't seem to fix the My uneducated guess is that this bit in let credentials_cache = if credentials_provider.is_some() {
Some(self.credentials_cache.unwrap_or_else(|| {
let mut builder =
CredentialsCache::lazy_builder().time_source(conf.time_source());
builder.set_sleep(conf.sleep());
builder.into_credentials_cache()
}))
} The |
these changse have all been merged in separate PRs |
Motivation and Context
This PR will not be merged as is:
wiremock
feature in aws-smithy-asyncDescription
Testing
Checklist
CHANGELOG.next.toml
if I made changes to the smithy-rs codegen or runtime cratesCHANGELOG.next.toml
if I made changes to the AWS SDK, generated SDK code, or SDK runtime cratesBy submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.