-
Notifications
You must be signed in to change notification settings - Fork 35
Refactor NIOHTTPClient to SwiftNIOHTTPClient in SmithySwiftNIO #1002
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
Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
d208926
Refactor NIO HTTP Client to SwiftNIO prefix in its own target
dayaffe 6cc6593
swiftlint
dayaffe f91fd18
Merge branch 'feat/async-http' into day/refactor-swift-nio
dayaffe 5ff2c93
swiftlint
dayaffe 21530d9
remove header
dayaffe 0e0f62f
swiftlint
dayaffe 3dc7fdf
swiftlint more
dayaffe c8e18b2
refactor into 3 modules
dayaffe 48aea8c
swiftlint
dayaffe 42def12
refactor more and more
dayaffe 80ad1ed
fix broken test
dayaffe 95812a7
test exact version async v1.22.0
dayaffe 5d1c704
major refactor per PR comments
dayaffe 9cf7174
Change codegen for DefaultTelemetry refs
jbelkins 2507525
Trigger CI
jbelkins 2bd4de5
Revert "Change codegen for DefaultTelemetry refs"
jbelkins fcb21d4
Add DefaultTemetry typealias in ClientRuntime
jbelkins File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -53,13 +53,16 @@ let package = Package( | |
| .library(name: "SmithyCBOR", targets: ["SmithyCBOR"]), | ||
| .library(name: "SmithyWaitersAPI", targets: ["SmithyWaitersAPI"]), | ||
| .library(name: "SmithyTestUtil", targets: ["SmithyTestUtil"]), | ||
| .library(name: "SmithySwiftNIO", targets: ["SmithySwiftNIO"]), | ||
| .library(name: "SmithyTelemetryAPI", targets: ["SmithyTelemetryAPI"]), | ||
| .library(name: "SmithyHTTPClientAPI", targets: ["SmithyHTTPClientAPI"]), | ||
| ], | ||
| dependencies: { | ||
| var dependencies: [Package.Dependency] = [ | ||
| .package(url: "https://github.com/awslabs/aws-crt-swift.git", exact: "0.54.2"), | ||
| .package(url: "https://github.com/apple/swift-log.git", from: "1.0.0"), | ||
| .package(url: "https://github.com/open-telemetry/opentelemetry-swift", from: "1.13.0"), | ||
| .package(url: "https://github.com/swift-server/async-http-client.git", from: "1.26.0"), | ||
| .package(url: "https://github.com/swift-server/async-http-client.git", exact: "1.22.0"), | ||
| ] | ||
|
|
||
| let isDocCEnabled = ProcessInfo.processInfo.environment["AWS_SWIFT_SDK_ENABLE_DOCC"] != nil | ||
|
|
@@ -75,10 +78,27 @@ let package = Package( | |
| .product(name: "Logging", package: "swift-log"), | ||
| ] | ||
| ), | ||
| .target( | ||
| name: "SmithyTelemetryAPI", | ||
| dependencies: [ | ||
| "Smithy", | ||
| ] | ||
| ), | ||
| .target( | ||
| name: "SmithyHTTPClientAPI", | ||
| dependencies: [ | ||
| "Smithy", | ||
| "SmithyHTTPAPI", | ||
| "SmithyTelemetryAPI", | ||
| .product(name: "AwsCommonRuntimeKit", package: "aws-crt-swift"), | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This CRT dependency is not needed & should be removed. (also, any "API" package shouldn't depend on an external implementation like CRT, per SRA) |
||
| ] | ||
| ), | ||
| .target( | ||
| name: "ClientRuntime", | ||
| dependencies: [ | ||
| "Smithy", | ||
| "SmithyTelemetryAPI", | ||
| "SmithyHTTPClientAPI", | ||
| "SmithyRetriesAPI", | ||
| "SmithyRetries", | ||
| "SmithyXML", | ||
|
|
@@ -98,7 +118,6 @@ let package = Package( | |
| "SmithyChecksums", | ||
| "SmithyCBOR", | ||
| .product(name: "AwsCommonRuntimeKit", package: "aws-crt-swift"), | ||
| .product(name: "AsyncHTTPClient", package: "async-http-client"), | ||
| // Only include these on macOS, iOS, tvOS, watchOS, and macCatalyst (visionOS and Linux are excluded) | ||
| .product( | ||
| name: "InMemoryExporter", | ||
|
|
@@ -125,6 +144,17 @@ let package = Package( | |
| .copy("PrivacyInfo.xcprivacy") | ||
| ] | ||
| ), | ||
| .target( | ||
| name: "SmithySwiftNIO", | ||
| dependencies: [ | ||
| "Smithy", | ||
| "SmithyHTTPAPI", | ||
| "SmithyStreams", | ||
| "SmithyHTTPClientAPI", | ||
| .product(name: "AsyncHTTPClient", package: "async-http-client"), | ||
| ], | ||
| path: "Sources/SmithySwiftNIO" | ||
| ), | ||
| .target( | ||
| name: "SmithyRetriesAPI" | ||
| ), | ||
|
|
@@ -270,6 +300,13 @@ let package = Package( | |
| ], | ||
| resources: [ .process("Resources") ] | ||
| ), | ||
| .testTarget( | ||
| name: "SmithySwiftNIOTests", | ||
| dependencies: [ | ||
| "SmithySwiftNIO", | ||
| "SmithyTestUtil", | ||
| ] | ||
| ), | ||
| .testTarget( | ||
| name: "SmithyCBORTests", | ||
| dependencies: ["SmithyCBOR", "ClientRuntime", "SmithyTestUtil"] | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
Sources/ClientRuntime/Networking/Http/TLSConfiguration.swift
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| // | ||
| // Copyright Amazon.com Inc. or its affiliates. | ||
| // All Rights Reserved. | ||
| // | ||
| // SPDX-License-Identifier: Apache-2.0 | ||
| // | ||
|
|
||
| import SmithyHTTPClientAPI | ||
|
|
||
| /// Typealias for backward compatibility. | ||
| /// The actual implementation is now in SmithyHTTPClientAPI. | ||
| public typealias TLSConfiguration = SmithyHTTPClientAPI.TLSConfiguration |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
just noting that this needs to be switched to
from:for release...IIRC this is
exactfor testing the minimum supported version?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.
yup exactly, will switch it to from since we can see it passed all integration tests