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

feat: S3 Express support #1906

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ extension AWSEndpointResolverMiddleware: ApplyEndpoint {
let authScheme = try authSchemeResolver.resolve(authSchemes: schemes)
signingAlgorithm = authScheme.name
switch authScheme {
case .sigV4(let param):
case .sigV4(let param), .sigV4S3Express(let param):
signingName = param.signingName
signingRegion = param.signingRegion
case .sigV4A(let param):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,17 @@ extension CRTFileBasedConfiguration: FileBasedConfiguration {
configFilePath: String? = nil,
credentialsFilePath: String? = nil
) async throws -> CRTFileBasedConfiguration {
let task = Task {
try CRTFileBasedConfiguration.make(
configFilePath: configFilePath,
credentialsFilePath: credentialsFilePath
)
try await withCheckedThrowingContinuation { continuation in
do {
let fileBasedConfig = try CRTFileBasedConfiguration.make(
configFilePath: configFilePath,
credentialsFilePath: credentialsFilePath
)
continuation.resume(returning: fileBasedConfig)
} catch {
continuation.resume(throwing: error)
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This just fixes a concurrency issue; the nonconcurrent code called here should be called using withCheckedThrowingContinuation.

}
return try await task.value
}

public func section(
Expand Down
Loading
Loading