Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: soto-project/soto-core
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 5.0.0-beta.1
Choose a base ref
...
head repository: soto-project/soto-core
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 5.x.x
Choose a head ref

Commits on Sep 18, 2020

  1. Copy the full SHA
    bac4629 View commit details

Commits on Sep 19, 2020

  1. Sign URL with headers (#367)

    * Add headers param to signURL in AWSSigner
    * Add headers parameter to signURL
    for both AWSService and AWSClient
    adam-fowler authored Sep 19, 2020
    Copy the full SHA
    dc52719 View commit details
  2. Copy the full SHA
    0b4ae74 View commit details

Commits on Sep 20, 2020

  1. Allow for json error messages with capitalized key (#370)

    * Allow for json error messages with capitalized key
    Message key can be capitalized but sometimes it isnt
    * swift format
    adam-fowler committed Sep 20, 2020
    Copy the full SHA
    c758270 View commit details

Commits on Sep 23, 2020

  1. signURL parameter expires no longer has a default (#373)

    Also changed this to a `TimeAmount` instead of an `Int`
    adam-fowler authored Sep 23, 2020
    Copy the full SHA
    4a93d71 View commit details
  2. Copy the full SHA
    c7d4c4a View commit details
  3. Fix documentation generation for main/5.x.x branch (#374)

    * Update .jazzy.yaml with new project name
    * Use 5.x.x path for latest documentation
    adam-fowler authored Sep 23, 2020
    Copy the full SHA
    8c10459 View commit details
  4. Make Region Codable (#375)

    * Make Region Codable
    adam-fowler authored Sep 23, 2020
    Copy the full SHA
    26e9ad6 View commit details
  5. Coding to CustomCoding (#376)

    * Rename Coding to CustomCoding
    
    Coding is too generic a name for a public symbol
    
    * Rename OptionalCoding to OptionalCustomCoding
    
    * DefaultArrayCoder -> StandardArrayCoder
    
    Also DefaultDictionaryCoder -> StandardDictionaryCoder
    adam-fowler authored Sep 23, 2020
    Copy the full SHA
    c4c7a96 View commit details

Commits on Sep 30, 2020

  1. Create new AWSService with updated serviceConfig values (#377)

    * Add ability to edit AWSService.config values
    
    AWSService.with(middlewares:timeout:byteBufferAllocator:options) returns a new version of the AWSService with edited attributes
    
    * Make AWSServiceConfig.with public
    
    * Make AWSService.with() public
    adam-fowler authored Sep 30, 2020
    Copy the full SHA
    d8f9642 View commit details

Commits on Oct 1, 2020

  1. Copy the full SHA
    79abd23 View commit details
  2. Tidy up comment

    adam-fowler committed Oct 1, 2020
    Copy the full SHA
    c5fc3bc View commit details
  3. Query encoder cleanup/performance improvement (#380)

    * Query Encoder returns a String instead of a dictionary
    
    - add ability to prime encoder with keys
    - do url encode, and sorting inside QueryEncoder
    
    * Store keys and values in array instead of dictionary
    
    * Swift format
    adam-fowler authored Oct 1, 2020
    Copy the full SHA
    2e63de5 View commit details

Commits on Oct 6, 2020

  1. Use github actions to benchmark pull requests (#381)

    * Add benchmark workflow
    * Remove on push from benchmark.yml
    * Use GITHUB_REF when it is available
    adam-fowler authored Oct 6, 2020
    Copy the full SHA
    39020dc View commit details
  2. Timestamp to date (#383)

    * Remove TimeStamp, replace TimeStampCoders
    
    * Remove TimeStamp
    
    * Add dateDecodingStrategy to DictionaryDecoder
    
    * Set dateDecodingStrategy based on what we are decoding
    
    * Add Date coding to XML and Query coders
    
    * Add tests
    
    * Sanity
    
    * Fix test on iOS
    adam-fowler authored Oct 6, 2020
    Copy the full SHA
    1287ab0 View commit details

Commits on Oct 12, 2020

  1. Added testAWSProfileConfigFile (#387)

    * Added testAWSProfileConfigFile
    * Update ConfigFileCredentialProviderTests.swift
    adam-fowler authored Oct 12, 2020
    Copy the full SHA
    cb0b477 View commit details
  2. Move Benchmark code into soto-core (#388)

    * Move Benchmark code into soto-core
    
    * Swift Format
    
    * Update sanity.sh to not fail on Benchmark build files
    adam-fowler authored Oct 12, 2020
    Copy the full SHA
    35af9ec View commit details
  3. Copy the full SHA
    be173c7 View commit details
  4. Copy the full SHA
    8a8ff16 View commit details

Commits on Oct 13, 2020

  1. Add Array.reduce style paginate function. (#385)

    * Add Array.reduce style paginate function.
    
    Re-implement original functions using new `reduce` style functions
    
    * swift format
    adam-fowler authored Oct 13, 2020
    Copy the full SHA
    ecc3479 View commit details

Commits on Oct 21, 2020

  1. Use swift format v0.46.3

    adam-fowler authored Oct 21, 2020
    Copy the full SHA
    a9fbcba View commit details
  2. Extend AWSErrorType (#389)

    * Add more details to AWSErrorType
    * Extend error to return a Context struct
    Context contains message, response status code and requestId
    
    * Add full set of headers to errors, instead of just requestId
    Different services return the requestId in different forms
    Also S3 needs additional data for identifying a request
    Instead of trying to collate all these I thought it might just be eaiser returns the full set of headers
    
    * Replaced array of possible error types with single optional error type
    adam-fowler authored Oct 21, 2020
    Copy the full SHA
    d981497 View commit details

Commits on Oct 26, 2020

  1. Percent encode path again after extracting from URLComponents (#390)

    * Percent encode path again when setting up URL
    * Add percent encoding path test
    * Percent encode {location} paths as well
    * Revert to using URLComponents for URL construction
    adam-fowler authored Oct 26, 2020
    Copy the full SHA
    0cbfc01 View commit details
  2. Copy the full SHA
    af03044 View commit details
  3. Copy the full SHA
    aecde14 View commit details
  4. Copy the full SHA
    8b2adb3 View commit details

Commits on Oct 29, 2020

  1. Add RotatingCredential so we don't need to keep re-implementing it

    We were having to generate a new version of this struct for each module that created a RotatingCredentialProvider. So thought I would centralise it in SotoCore
    adam-fowler committed Oct 29, 2020
    Copy the full SHA
    7ad4dfa View commit details

Commits on Oct 30, 2020

  1. Add additional fields to AWSErrorContext (#392)

    * Added decoding of additional error fields
    
    * Parse errors for additional information
    
    * Swift format
    adam-fowler authored Oct 30, 2020
    Copy the full SHA
    36d582c View commit details
  2. Process AWS Errors before called RetryPolicy.getRetryWaitTime (#394)

    * RetryPolicy is invoked with processed error
    
    Instead of raw HTTPResponseError
    
    * Add support for Retry-After header
    
    * Add throttling error to errors to retry on
    
    * swift format
    adam-fowler authored Oct 30, 2020
    Copy the full SHA
    809e6cb View commit details
  3. Copy the full SHA
    6f7661b View commit details

Commits on Oct 31, 2020

  1. Copy the full SHA
    37e6c32 View commit details
  2. Copy the full SHA
    a7fbe54 View commit details

Commits on Nov 3, 2020

  1. Pass eventLoop to AWSClient.invoke (#398)

    ... and use it to create the promise for the finished invoke instead of using the eventLoopGroup attached to the http client
    adam-fowler authored Nov 3, 2020
    Copy the full SHA
    56e93c5 View commit details
  2. Logger Eventloop parameter ordering (#399)

    * Reorder public function parameters Logger and EventLoop
    
    Place Logger before EventLoop. Will make moving to BaggageContext easier
    
    * Re-order parameters in paginate command closure
    adam-fowler authored Nov 3, 2020
    Copy the full SHA
    1638da0 View commit details

Commits on Nov 7, 2020

  1. Copy the full SHA
    859ff69 View commit details

Commits on Nov 9, 2020

  1. Fix issue with S3 streamer (#400)

    * Fix issue with S3 streamer
    
    Stop streamer sending buffers that are too large when it is fed bytebuffers greater than the chunk buffer size
    
    * Remove commented out code
    adam-fowler authored Nov 9, 2020
    Copy the full SHA
    3a17f27 View commit details
  2. Add streaming request errors

    Throw errors for when a streaming request either provides too much data or not enough data
    adam-fowler committed Nov 9, 2020
    Copy the full SHA
    f088c5b View commit details
  3. Copy the full SHA
    7102aeb View commit details

Commits on Nov 10, 2020

  1. Signer should sort headers by "key" not "key=value" (#401)

    * Signer S should sort headers by key not key=value
    
    * swift format
    adam-fowler authored Nov 10, 2020
    Copy the full SHA
    2cd8cd8 View commit details

Commits on Nov 15, 2020

  1. Allows to create an existing Region from a String (#397)

    * allows to create an existing Region from a String
    
    * apply swiftformat to test
    
    * add license header to test
    
    * includes comments from PR
    
    * add script to automatically generate RegionTests.swift
    
    * auto-generate RegionTests.swift based on SSM's region list
    sebsto authored Nov 15, 2020
    Copy the full SHA
    a3b4dd7 View commit details

Commits on Nov 18, 2020

  1. Copy the full SHA
    5a981a5 View commit details

Commits on Nov 19, 2020

  1. Add internal version of STS AssumeRole credential provider (#406)

    * Add internal version of STS AssumeRole
    
    Used by ConfigFile credential provider
    
    * swift format
    
    * Add Logger to test
    
    * Supply empty credential provider to stsAssumeRole provider
    
    Otherwise it errors saying it cannot find a credential provider
    
    * Added CredentialProviderSelector protocol
    
    This is a credential provider which has to select an internal credential provider. Use the protocol with the RuntimeSelectorCredentialProvider.
    
    * Setup ConfigFile credentials to work with internal provider
    
    AWSConfigFileCredentialProvider now conforms to CredentialProviderSelector. Loading the config file will select a credential provider to use, instead of supplying static credentials
    adam-fowler authored Nov 19, 2020
    Copy the full SHA
    cb5731e View commit details

Commits on Nov 23, 2020

  1. SwiftFormat v0.47.4 (#409)

    Disable extensionAccessControl
    adam-fowler authored Nov 23, 2020
    Copy the full SHA
    3fdebac View commit details

Commits on Nov 28, 2020

  1. Copy the full SHA
    901c39d View commit details

Commits on Dec 2, 2020

  1. Copy the full SHA
    c74aae5 View commit details

Commits on Dec 3, 2020

  1. typo in shutdown not shudown

    Also added test for CredentialProviderSelector shutdown
    adam-fowler committed Dec 3, 2020
    Copy the full SHA
    743e1ef View commit details
  2. Copy the full SHA
    e04ca4b View commit details

Commits on Dec 4, 2020

  1. Copy the full SHA
    ba04770 View commit details

Commits on Dec 7, 2020

  1. 5.x.x docs (#411)

    * Update README.md
    
    * New CONTRIBUTING.md
    
    * Update CONTRIBUTING.md
    adam-fowler authored Dec 7, 2020
    Copy the full SHA
    b24d868 View commit details
  2. Add support for profile configuration files and STS AssumeRole for AI…

    …M roles (#408)
    
    * Allow loading credentials from profile and default
    
    * WIP: Load source_profile when available
    
    * WIP: ConfigFileLoader
    
    * WIP: ConfigFileLoader
    
    * WIP: AWSConfigFileCredentialProvider
    
    * WIP: AWSConfigFileCredentialProvider
    
    * Finish implementation of ConfigFileLoader and ConfigFileCredentialProvider
    
    * Use RotatingCredentialProvider and shutdown STS client after getting credentials
    
    * Move sharedCredentials logic to ConfigFileCredentialProvider
    
    * Move FileIO logic to ConfigFileLoader
    
    * Formatting cleanup
    
    * Make config file path non-optional
    
    * Fixes and unit tests
    
    * PR feedback
    
    * Fix sanity issues
    
    * More cleanup
    
    * Add test for STSAssumeRole via ConfigFileCredentialsProvider
    
    * Update test ordering
    
    * Sanity checks
    
    * Sanity checks
    
    * PR feedback
    
    * Further clarify logic for different file credential configurations
    
    * Fix syntax
    
    * Fix UUID import
    
    * Fix issues
    
    * Fix AWSShape
    eneko authored Dec 7, 2020
    Copy the full SHA
    2159cd1 View commit details
Showing with 8,529 additions and 1,702 deletions.
  1. +2 −0 .dockerignore
  2. +45 −0 .github/workflows/benchmark.yml
  3. +35 −28 .github/workflows/ci.yml
  4. +5 −4 .github/workflows/gen-docs.yml
  5. +1 −1 .github/workflows/sanity.yml
  6. +23 −0 .github/workflows/swift-nightly.yml
  7. +4 −2 .gitignore
  8. +4 −5 .jazzy.yaml
  9. +2 −2 .swiftformat
  10. +18 −0 Benchmark/Package.swift
  11. +3 −0 Benchmark/README.md
  12. +103 −0 Benchmark/Sources/soto-benchmark/AWSClientSuite.swift
  13. +31 −0 Benchmark/Sources/soto-benchmark/AWSSignerV4Suite.swift
  14. +142 −0 Benchmark/Sources/soto-benchmark/EncoderSuites.swift
  15. +26 −0 Benchmark/Sources/soto-benchmark/main.swift
  16. +54 −0 CODE_OF_CONDUCT.md
  17. +46 −5 CONTRIBUTING.md
  18. +2 −0 CONTRIBUTORS.txt
  19. +19 −0 Dockerfile
  20. +1 −1 LICENSE
  21. +40 −24 Package.swift
  22. +3 −16 README.md
  23. +30 −0 SECURITY.md
  24. +1 −1 Sources/INIParser/INIParser.swift
  25. +261 −0 Sources/SotoCore/AWSClient+EndpointDiscovery.swift
  26. +221 −42 Sources/SotoCore/AWSClient+Paginate.swift
  27. +275 −123 Sources/SotoCore/AWSClient.swift
  28. +122 −0 Sources/SotoCore/AWSEndpointDiscovery.swift
  29. +84 −7 Sources/SotoCore/AWSService.swift
  30. +114 −10 Sources/SotoCore/AWSServiceConfig.swift
  31. +44 −0 Sources/SotoCore/AWSShapes/Payload+async.swift
  32. +4 −3 Sources/SotoCore/AWSShapes/Payload.swift
  33. +0 −105 Sources/SotoCore/AWSShapes/TimeStamp.swift
  34. +267 −0 Sources/SotoCore/AsyncAwaitSupport/AWSClient+EndpointDiscovery+async.swift
  35. +92 −0 Sources/SotoCore/AsyncAwaitSupport/AWSClient+Paginate+async.swift
  36. +43 −0 Sources/SotoCore/AsyncAwaitSupport/AWSClient+Waiter+async.swift
  37. +373 −0 Sources/SotoCore/AsyncAwaitSupport/AWSClient+async.swift
  38. +62 −0 Sources/SotoCore/AsyncAwaitSupport/AWSService+async.swift
  39. +40 −0 Sources/SotoCore/AsyncAwaitSupport/CredentialProvider+async.swift
  40. +74 −120 Sources/SotoCore/Credential/ConfigFileCredentialProvider.swift
  41. +327 −0 Sources/SotoCore/Credential/ConfigFileLoader.swift
  42. +18 −5 Sources/SotoCore/Credential/CredentialProvider.swift
  43. +71 −0 Sources/SotoCore/Credential/CredentialProviderSelector.swift
  44. +4 −3 Sources/SotoCore/Credential/DeferredCredentialProvider.swift
  45. +23 −0 Sources/SotoCore/Credential/ExpiringCredential.swift
  46. +6 −6 Sources/SotoCore/Credential/MetaDataCredentialProvider.swift
  47. +3 −1 Sources/SotoCore/Credential/NullCredentialProvider.swift
  48. +9 −8 Sources/SotoCore/Credential/RotatingCredentialProvider.swift
  49. +9 −28 Sources/SotoCore/Credential/RuntimeSelectorCredentialProvider.swift
  50. +140 −0 Sources/SotoCore/Credential/STSAssumeRole.swift
  51. +1 −0 Sources/SotoCore/Credential/StaticCredential+CredentialProvider.swift
  52. +2 −1 Sources/SotoCore/Credential/StaticCredential+Environment.swift
  53. +10 −8 Sources/SotoCore/Doc/AWSShape+Encoder.swift
  54. +20 −12 Sources/SotoCore/Doc/AWSShape.swift
  55. +58 −5 Sources/SotoCore/Doc/Region.swift
  56. +33 −11 Sources/SotoCore/Encoder/CodableProperties/CodableProperties.swift
  57. +4 −4 Sources/SotoCore/Encoder/CodableProperties/CollectionCoders.swift
  58. +14 −10 Sources/SotoCore/Encoder/CodableProperties/{TimeStampCoder.swift → DateCoders.swift}
  59. +114 −26 Sources/SotoCore/Encoder/DictionaryDecoder.swift
  60. +51 −12 Sources/SotoCore/Encoder/QueryEncoder.swift
  61. +22 −7 Sources/SotoCore/Errors/ClientErrors.swift
  62. +40 −13 Sources/SotoCore/Errors/Error.swift
  63. +13 −7 Sources/SotoCore/Errors/ServerErrors.swift
  64. +7 −6 Sources/SotoCore/Exports.swift
  65. +10 −1 Sources/SotoCore/HTTP/AWSHTTPClient.swift
  66. +1 −7 Sources/SotoCore/HTTP/AsyncHTTPClient.swift
  67. +1 −5 Sources/SotoCore/HTTP/ResponseDelegate.swift
  68. +17 −6 Sources/SotoCore/HTTP/S3StreamReader.swift
  69. +1 −5 Sources/SotoCore/HTTP/StreamReader.swift
  70. +10 −2 Sources/SotoCore/HTTP/StreamWriter+write.swift
  71. +25 −12 Sources/SotoCore/Message/AWSMiddleware.swift
  72. +88 −59 Sources/SotoCore/Message/AWSRequest.swift
  73. +4 −4 Sources/SotoCore/Message/AWSResponse+HAL.swift
  74. +109 −45 Sources/SotoCore/Message/AWSResponse.swift
  75. +32 −2 Sources/SotoCore/Message/Body.swift
  76. +22 −6 Sources/SotoCore/RetryPolicy.swift
  77. +156 −0 Sources/SotoCore/Waiters/AWSClient+Waiter.swift
  78. +165 −0 Sources/SotoCore/Waiters/Matcher.swift
  79. +19 −0 Sources/SotoSignerV4/exports.swift
  80. +125 −21 Sources/SotoSignerV4/signer.swift
  81. +28 −0 Sources/SotoTestUtils/Environment.swift
  82. +12 −6 Sources/SotoTestUtils/TestServer.swift
  83. +37 −0 Sources/SotoTestUtils/TestUtils+async.swift
  84. +12 −7 Sources/SotoTestUtils/TestUtils.swift
  85. +1 −1 Sources/SotoXML/Expat.swift
  86. +1 −1 Sources/SotoXML/XML.swift
  87. +32 −1 Sources/SotoXML/XMLDecoder.swift
  88. +32 −16 Sources/SotoXML/XMLEncoder.swift
  89. +2 −0 Tests/INIParserTests/INIParserTests.swift
  90. +187 −0 Tests/SotoCoreTests/AWSClientTests+async.swift
  91. +121 −37 Tests/SotoCoreTests/AWSClientTests.swift
  92. +150 −7 Tests/SotoCoreTests/AWSRequestTests.swift
  93. +159 −40 Tests/SotoCoreTests/AWSResponseTests.swift
  94. +80 −0 Tests/SotoCoreTests/AWSServiceTests+async.swift
  95. +81 −0 Tests/SotoCoreTests/AWSServiceTests.swift
  96. +187 −139 Tests/SotoCoreTests/Credential/ConfigFileCredentialProviderTests.swift
  97. +737 −0 Tests/SotoCoreTests/Credential/ConfigFileLoaderTests.swift
  98. +46 −0 Tests/SotoCoreTests/Credential/CredentialProviderTests+async.swift
  99. +43 −4 Tests/SotoCoreTests/Credential/CredentialProviderTests.swift
  100. +2 −1 Tests/SotoCoreTests/Credential/MetaDataCredentialProviderTests.swift
  101. +7 −6 Tests/SotoCoreTests/Credential/RotatingCredentialProviderTests.swift
  102. +2 −2 Tests/SotoCoreTests/Credential/RuntimeSelectorCredentialProviderTests.swift
  103. +131 −0 Tests/SotoCoreTests/Credential/STSAssumeRoleTests.swift
  104. +12 −12 Tests/SotoCoreTests/DictionaryEncoderTests.swift
  105. +207 −0 Tests/SotoCoreTests/Doc/RegionTests.swift
  106. +221 −0 Tests/SotoCoreTests/EndpointDiscoveryTests+async.swift
  107. +210 −0 Tests/SotoCoreTests/EndpointDiscoveryTests.swift
  108. +1 −1 Tests/SotoCoreTests/JSONCoderTests.swift
  109. +74 −3 Tests/SotoCoreTests/LoggingTests.swift
  110. +240 −0 Tests/SotoCoreTests/PaginateTests+async.swift
  111. +66 −9 Tests/SotoCoreTests/PaginateTests.swift
  112. +1 −1 Tests/SotoCoreTests/PayloadTests.swift
  113. +0 −321 Tests/SotoCoreTests/PerformanceTests.swift
  114. +21 −55 Tests/SotoCoreTests/QueryEncoderTests.swift
  115. +151 −55 Tests/SotoCoreTests/TimeStampTests.swift
  116. +19 −19 Tests/SotoCoreTests/ValidationTests.swift
  117. +82 −0 Tests/SotoCoreTests/WaiterTests+async.swift
  118. +325 −0 Tests/SotoCoreTests/WaiterTests.swift
  119. +87 −25 Tests/SotoSignerV4Tests/AWSSignerTests.swift
  120. +12 −12 Tests/SotoXMLTests/XMLCoderTests.swift
  121. +9 −0 Tests/SotoXMLTests/XMLTests.swift
  122. +0 −5 docker/Dockerfile
  123. +0 −3 docker/Dockerfile.amazon
  124. +0 −42 docker/docker-compose.yml
  125. +1 −1 scripts/build-docs.sh
  126. +5 −1 scripts/generate-errors.swift
  127. +69 −0 scripts/generate-region-test.swift
  128. +1 −4 scripts/generate-region.swift
  129. +10 −4 scripts/sanity.sh
  130. +17 −10 scripts/templates/generate-errors/generate-errors.stencil
  131. +61 −0 scripts/templates/generate-region/Region-Tests.stencil
  132. +37 −4 scripts/templates/generate-region/Region.stencil
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.build
.git
45 changes: 45 additions & 0 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Benchmark

on:
pull_request:
branches:
- main
workflow_dispatch:

jobs:
macos:
runs-on: macOS-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 1
- name: Benchmark
run: |
cd Benchmark
swift run -c release
linux:
runs-on: ubuntu-latest
strategy:
matrix:
tag:
- swift:5.2
- swift:5.3
- swift:5.4
- swift:5.5
container:
image: ${{ matrix.tag }}
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 1
- name: Install dependencies
run: |
apt-get update -qq
apt-get install -q -y tzdata zlib1g-dev curl
- name: Benchmark
run: |
cd Benchmark
swift run -c release
63 changes: 35 additions & 28 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -3,73 +3,80 @@ name: CI
on:
push:
branches:
- "*"
- main
- 5.x.x
pull_request:
branches:
- "*"
- main
- 5.x.x
release:
types: [published]

env:
ENABLE_TIMING_TESTS: "false"
AWS_LOG_LEVEL: "info"
AWS_LOG_LEVEL: "trace"

jobs:
macos:
runs-on: macOS-latest
steps:
- name: Checkout
uses: actions/checkout@v1
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: SPM tests
run: swift test --enable-code-coverage --sanitize=thread
run: swift test --enable-code-coverage
- name: Convert coverage files
run: |
xcrun llvm-cov export -format "lcov" \
.build/debug/soto-corePackageTests.xctest/Contents/MacOs/soto-corePackageTests \
-ignore-filename-regex="\/Tests\/" \
-instr-profile=.build/debug/codecov/default.profdata > info.lcov
-instr-profile=.build/debug/codecov/default.profdata > info.lcov
- name: Upload to codecov.io
run: bash <(curl -s https://codecov.io/bash) -J 'soto-core' -t ${{secrets.CODECOV_TOKEN}}

ios:
runs-on: macOS-latest
steps:
- name: Checkout
uses: actions/checkout@v1
uses: codecov/codecov-action@v3
with:
fetch-depth: 1
- name: Xcodebuild
run: |
xcodebuild -scheme soto-core -quiet -destination 'platform=iOS Simulator,name=iPhone 11'
xcodebuild test -scheme soto-core -destination 'platform=iOS Simulator,name=iPhone 11'
file: info.lcov

# ios:
# runs-on: macOS-latest
# steps:
# - name: Checkout
# uses: actions/checkout@v1
# with:
# fetch-depth: 1
# - name: Xcodebuild
# run: |
# xcodebuild -scheme soto-core-Package -quiet -destination 'platform=iOS Simulator,name=iPhone 11'
# xcodebuild test -scheme soto-core-Package -destination 'platform=iOS Simulator,name=iPhone 11'

linux:
runs-on: ubuntu-latest
strategy:
matrix:
tag:
- swift:5.1
- swift:5.2
tag:
- swift:5.3
- swift:5.4
- swift:5.5
- swift:5.6
- swift:5.7
container:
image: ${{ matrix.tag }}
steps:
- name: Checkout
uses: actions/checkout@v1
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Install dependencies
run: |
apt-get update -qq
apt-get install -q -y tzdata libssl-dev zlib1g-dev curl
- name: Test
run: swift test --enable-test-discovery --enable-code-coverage --sanitize=thread
run: |
swift --version
swift test --enable-test-discovery --enable-code-coverage
- name: Convert coverage files
run: |
llvm-cov export -format="lcov" \
.build/debug/soto-corePackageTests.xctest \
-ignore-filename-regex="\/Tests\/" \
-instr-profile .build/debug/codecov/default.profdata > info.lcov
- name: Upload to codecov.io
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v3
with:
file: info.lcov
9 changes: 5 additions & 4 deletions .github/workflows/gen-docs.yml
Original file line number Diff line number Diff line change
@@ -3,7 +3,8 @@ name: Generate Documentation
on:
release:
types: [published]

workflow_dispatch:

jobs:
build:

@@ -28,9 +29,9 @@ jobs:
git config user.name "${GITHUB_ACTOR}"
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
git checkout ${REMOTE_BRANCH}
rm -rf current/
mv docs/ current/
git add --all current
rm -rf 5.x.x/
mv docs/ 5.x.x/
git add --all 5.x.x
git status
git commit -m "Documentation for https://github.com/${GITHUB_REPOSITORY}/tree/${GITHUB_SHA}" -m "Generated by gen-docs.yml"
2 changes: 1 addition & 1 deletion .github/workflows/sanity.yml
Original file line number Diff line number Diff line change
@@ -16,6 +16,6 @@ jobs:
- name: Install Dependencies
run: |
brew install mint
mint install nicklockwood/swiftformat
mint install nicklockwood/swiftformat@0.47.13 --no-link
- name: run script
run: ./scripts/sanity.sh
23 changes: 23 additions & 0 deletions .github/workflows/swift-nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Swift nightly build

on:
schedule:
- cron: '0 1 * * *'
workflow_dispatch:

env:
AWS_ENABLE_LOGGING : "true"

jobs:
linux:
runs-on: ubuntu-latest
strategy:
matrix:
tag: ['nightly-bionic', 'nightly-focal', 'nightly-centos8', 'nightly-amazonlinux2']
container:
image: swiftlang/swift:${{ matrix.tag }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Test
run: swift test --enable-test-discovery
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
.DS_Store
/.build
/.swiftpm
.build
.swiftpm
.vscode
.devcontainer
/Packages
/*.xcodeproj
Package.resolved
9 changes: 4 additions & 5 deletions .jazzy.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
sourcekitten_sourcefile:
- sourcekitten/AWSSDKSwiftCore.json
author: Yuki Takei, Joe Smith, Jonathan McAllister, Adam Fowler, Fabian Fett
author_url: https://github.com/swift-aws
github_url: https://github.com/swift-aws/aws-sdk-swift-core
copyright: '© Copyright (c) 2019 Yuki Takei(noppoMan), Joe Smith(Yasumoto), Jonathan McAllister(jonnymacs), Adam Fowler (adam-fowler), Fabian Fett (fabianfett)'
- sourcekitten/SotoCore.json
author_url: https://github.com/soto-project
github_url: https://github.com/soto-project/soto-core
copyright: '© Copyright (c) 2020 Soto project authors'
readme: README.md
4 changes: 2 additions & 2 deletions .swiftformat
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Minimum swiftformat version
--minversion 0.45.3
--minversion 0.47.4

# Swift version
--swiftversion 5.1
@@ -8,7 +8,7 @@
--exclude .build

# rules
--disable redundantReturn
--disable redundantReturn, extensionAccessControl

# format options
--ifdef no-indent
18 changes: 18 additions & 0 deletions Benchmark/Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// swift-tools-version:5.2
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
name: "soto-benchmark",
dependencies: [
.package(url: "https://github.com/soto-project/soto-core", .branch("main")),
.package(name: "Benchmark", url: "https://github.com/google/swift-benchmark", from: "0.1.0"),
],
targets: [
.target(name: "soto-benchmark", dependencies: [
.product(name: "SotoCore", package: "soto-core"),
.product(name: "Benchmark", package: "Benchmark"),
]),
]
)
3 changes: 3 additions & 0 deletions Benchmark/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# soto-benchmark

Benchmark testing for soto-core
103 changes: 103 additions & 0 deletions Benchmark/Sources/soto-benchmark/AWSClientSuite.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
//===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2020 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Soto project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

import Benchmark
import Dispatch
import Foundation
import NIO
import SotoCore

struct RequestThrowMiddleware: AWSServiceMiddleware {
struct Error: Swift.Error {}

func chain(request: AWSRequest, context: AWSMiddlewareContext) throws -> AWSRequest {
_ = request.body.asByteBuffer(byteBufferAllocator: ByteBufferAllocator())
throw Error()
}
}

struct HeaderShape: AWSEncodableShape {
static let _encoding: [AWSMemberEncoding] = [
.init(label: "a", location: .header(locationName: "A")),
.init(label: "b", location: .header(locationName: "B")),
]
let a: String
let b: Int
}

struct QueryShape: AWSEncodableShape {
static let _encoding: [AWSMemberEncoding] = [
.init(label: "a", location: .querystring(locationName: "A")),
.init(label: "b", location: .querystring(locationName: "B")),
]
let a: String
let b: Int
}

struct Shape1: AWSEncodableShape {
let a: String
let b: Int
}

struct Shape: AWSEncodableShape {
let a: String
let b: Int
let c: [String]
let d: [String: Int]
}

let awsClientSuite = BenchmarkSuite(name: "AWSClient", settings: Iterations(10000), WarmupIterations(2)) { suite in
// time request construction by throwing an error in request middleware. This means waiting on client.execute should
// take the amount of time it took to construct the request
let client = AWSClient(
credentialProvider: .static(accessKeyId: "foo", secretAccessKey: "bar"),
middlewares: [RequestThrowMiddleware()],
httpClientProvider: .createNew
)
let jsonService = AWSServiceConfig(
region: .useast1, partition: .aws, service: "test-service", serviceProtocol: .json(version: "1.1"), apiVersion: "10-10-2010"
)
let xmlService = AWSServiceConfig(
region: .useast1, partition: .aws, service: "test-service", serviceProtocol: .restxml, apiVersion: "10-10-2010"
)
let queryService = AWSServiceConfig(
region: .useast1, partition: .aws, service: "test-service", serviceProtocol: .query, apiVersion: "10-10-2010"
)

suite.benchmark("empty-request") {
try? client.execute(operation: "TestOperation", path: "/", httpMethod: .GET, serviceConfig: jsonService).wait()
}

let headerInput = HeaderShape(a: "TestString", b: 345_348)
suite.benchmark("header-request") {
try? client.execute(operation: "TestOperation", path: "/", httpMethod: .GET, serviceConfig: jsonService, input: headerInput).wait()
}

let queryInput = QueryShape(a: "TestString", b: 345_348)
suite.benchmark("querystring-request") {
try? client.execute(operation: "TestOperation", path: "/", httpMethod: .GET, serviceConfig: jsonService, input: queryInput).wait()
}

// test json, xml and query generation timing
let input = Shape(a: "TestString", b: 345_348, c: ["one", "two", "three"], d: ["one": 1, "two": 2, "three": 3])
suite.benchmark("json-request") {
try? client.execute(operation: "TestOperation", path: "/", httpMethod: .GET, serviceConfig: jsonService, input: input).wait()
}
suite.benchmark("xml-request") {
try? client.execute(operation: "TestOperation", path: "/", httpMethod: .GET, serviceConfig: xmlService, input: input).wait()
}
suite.benchmark("query-request") {
try? client.execute(operation: "TestOperation", path: "/", httpMethod: .GET, serviceConfig: queryService, input: input).wait()
}
}
Loading