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

Add iOS CI back in #599

Closed
wants to merge 42 commits into from
Closed

Add iOS CI back in #599

wants to merge 42 commits into from

Conversation

adam-fowler
Copy link
Member

No description provided.

adam-fowler and others added 30 commits August 12, 2023 10:05
* make Credential Provider tests async

* Make all AWSClient tests async

* Make endpoint, service, middleware logging tests async

* Make paginate, payload and waiter tests async

* Last non async call
* Remove SotoCrypto

* Remove @available/format
* Remove eventLoop from execute commands

* Remove commented out code
* Remove EventLoop paginate

* Remove Async from PaginateTests

* Remove @available(macOS...
* Remove EventLoop version of waiters

* Speed up waiter tests
* Add ExpiringValue actor

* Replace EventLoop endpoint discovery

* Rename AWSClient+EndpointDiscovery+async

* Add tests for ExpiringValue, add comments

* more comments

* Remove Date.now

* Add logging for endpoint discovery

* Update Sources/SotoCore/AWSClient+EndpointDiscovery.swift

Co-authored-by: Tim Condon <[email protected]>

* Add comment about endpoint renewal

---------

Co-authored-by: Tim Condon <[email protected]>
* Remove AWSClient.execute calls with EventLoop

* Fix STSAssumeRole after removing EventLoop execute

* Fix AWSClient waiter code

* Remove commented out code

* Remove EL credential functions

* Merge async files with parent implementations

* Delete AWSClient+Waiter+async.swift

* Fix up paginate code

* Remove EventLoop from execute closure

* Changes requested in PR

* Update Sources/SotoCore/Waiters/AWSClient+Waiter.swift

Co-authored-by: Tim Condon <[email protected]>

---------

Co-authored-by: Tim Condon <[email protected]>
* Make credential providers async

* Fix tests

Also add support for initialising an ExpiringValue with an updating closure. Needed to add another state to get this working.

* getTaskProviderTask -> getCredentialProviderTask

* Format copyright 2023

* validation changes

* Fix issues with credential providers

Add error state for ExpiringValue where previous getValue returned an error

* Don't throw error during credential provider selection

If credential provider fails to provide a credential don't throw an error when you are shutting it down

* Shutdown test for rotating credential provider

And fixed a bug

* Added testDeferredCredentialProviderSetupShutdown
* Use async HTTPClient calls

Currently streaming is not working

* Comments

* Extract HTTPBody out so it can be used in request

* Flush body, when not expecting anything

* Remove eventLoop from function comment headers
* Add support for returning streamed responses

* Remove old response streaming fiunctions

* Remove unused function

* Comment update
* Add support for request streaming

* Remove commented out code
* S3 signed requests

* Remove old streaming code and AWSPayload

* comments

* Add todo comment

* bufferSequence -> asyncSequence

* compile fix

* Make HTTPBody(asyncSequence:length:) public

* Add helper init for AWSResponseError

* Make ByteBufferAsyncSequence public

* if response body is buffer then print as string

* Compile fix
* Rename HTTPBody to AWSHTTPBody

* Add AWSResponse to Codable userInfo

* Add decode functions for AWSResponse

* ResponseContainer for decoding

* Fix tests after userInfo changes

* Remove DictionaryDecoder

Now we pass the response via uesrInfo to the decoder and decode header, body and payload in the init(from) function, we can use the JSONDecoder for decoding responses.

* Fix tests

* Re-organise root element code

* Fix after merge

* Update Sources/SotoCore/Encoder/ResponseContainer.swift

Co-authored-by: Tim Condon <[email protected]>

---------

Co-authored-by: Tim Condon <[email protected]>
* Add EventStream type

* Split event stream code into two files

* If response is chunked assume it is raw

* Fix test errors

* Fix a couple strict concurrency issues I missed

* Add tests for EventStreams

* Changes from PR review
* reorder execute

* process response in execute

* Collapse AWSHTTPResponse and AWSResponse into one

* Collpase AWSRequest and AWSHTTPRequest into one

* Add HTTP to request and response type names

* Remove new middleware until we need it

No need to include in this PR

* Remove re-org to make PR review easier

* Changes from PR comments

* Another fix
* import SotoXML as implementation only

* formatting
* Re-org request and response middleware

So these are applied in same function

* MiddlewareStack

* Multiple AWSClient inits

* Add Error handling middleware

* Add retry middleware

* Add fix up for S3 notFound errors

* Add endpoint discovery middleware

* Endpoint middleware fixes

* Add streaming parameter to stop collation of body

* Add fixup for getBucketLocation

* @preconcurrency import struct Foundation.CharacterSet

* formatting

* Update Sources/SotoCore/AWSClient.swift

Co-authored-by: Tim Condon <[email protected]>

* comments

---------

Co-authored-by: Tim Condon <[email protected]>
* Tracing middleware with basic attributes

* Add test for tracing

* Update TracingMiddleware.swift
* Add RequestEncodingContainer, pass to encoders

* Fixup checksum tests

* Get rid of all uses of Mirror, fix Payloads

* Fix requests with payload and headers

* Move URL building to RequestEncoderContainer

* Changes to get services woking

* Add EventPayload

* Fix up tests

* Conform AWSEventStream to decodable

* Make RequestContainer code inlinable

* Rename decode functions to align with RequestContainer

* comments

* Remove unused code

* Add SingleValueEncodingContainer.encodeNil

* add file header

* Add more tests

* More tests
Given we have removed SotoCrypto maybe we should remove the tests
Copy link

codecov bot commented Dec 12, 2023

Codecov Report

Attention: Patch coverage is 81.59014% with 433 lines in your changes missing coverage. Please review.

Project coverage is 80.43%. Comparing base (9f5a1b7) to head (71aa248).
Report is 55 commits behind head on 7.x.x.

Files with missing lines Patch % Lines
Sources/SotoXML/XMLEncoder.swift 46.52% 77 Missing ⚠️
Sources/SotoXML/XMLDecoder.swift 46.01% 61 Missing ⚠️
Sources/SotoCore/Encoder/QueryEncoder.swift 40.00% 51 Missing ⚠️
Sources/SotoCore/Encoder/EventStreamDecoder.swift 77.85% 31 Missing ⚠️
Sources/SotoCore/HTTP/AWSHTTPBody.swift 60.65% 24 Missing ⚠️
Sources/SotoCore/HTTP/AWSHTTPRequest.swift 90.04% 23 Missing ⚠️
.../SotoCore/Middleware/Middleware/S3Middleware.swift 62.50% 18 Missing ⚠️
Sources/SotoCore/Encoder/ResponseContainer.swift 75.00% 15 Missing ⚠️
Sources/SotoCore/Encoder/RequestContainer.swift 90.37% 13 Missing ⚠️
...eware/Middleware/EndpointDiscoveryMiddleware.swift 78.18% 12 Missing ⚠️
... and 25 more
Additional details and impacted files
@@            Coverage Diff             @@
##            7.x.x     #599      +/-   ##
==========================================
+ Coverage   77.14%   80.43%   +3.29%     
==========================================
  Files          87       77      -10     
  Lines        8557     6465    -2092     
==========================================
- Hits         6601     5200    -1401     
+ Misses       1956     1265     -691     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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

Successfully merging this pull request may close these issues.

2 participants