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(Core): Updating to AWS SDK for Swift 1.0.0 #3858

Merged
merged 11 commits into from
Sep 18, 2024
Merged

Conversation

ruisebas
Copy link
Member

@ruisebas ruisebas commented Sep 11, 2024

Description

This PR upgrades the underlying AWS SDK for Swift dependency to their GA version: 1.0.0.

The vast majority of changes are just types being renamed or moved to different packages, but some business logic had to change here and there. Some of them include:

  • Pretty much all SDK clients now need a signingRegion besides the region, so that parameter has been added.
  • CredentialsProviding has been replaced with AWSCredentialIdentityResolver for all SDK clients, so our types have been modified accordingly
  • As per usual, our customPresignURL extension to UploadPartInput had to be re-tweaked to generate a valid URL.
  • All SDK Models lost their conformance to Codable, so we had to manually add it back for some types, mainly Pinpoint and Transcribe, as our operations relied on that.
    • This also pretty much broke AmplifyStringConvertible, which had to be fully re-written. It's a non-public debug-only utility anyways.
  • While running Storage's integration tests, some issues were discovered with multipart uploads:
    • If a part failed to upload, instead of it being re-tried or the operation failing, nothing would happen and the execution would remain stuck waiting.
    • If an upload was aborted, awaiting for its value would still return a valid key instead of throwing, even though the upload was not completed.
    • I've wrapped all test uploads in Tasks that wait for expectations, so we don't hang the test if something goes wrong and instead just fail it with missing expectation, allowing for easy retries without having to wait for the 30 minutes timeout.

General Checklist

  • Added new tests to cover change, if needed
  • Build succeeds with all target using Swift Package Manager
  • All unit tests pass
  • All integration tests pass
    • Integration Tests | API - All
    • Integration Tests | DataStore - All
    • Integration Tests (Except DataStore & API)
  • Security oriented best practices and standards are followed (e.g. using input sanitization, principle of least privilege, etc)
  • Documentation update for the change if required
  • PR title conforms to conventional commit style
  • New or updated tests include Given When Then inline code documentation and are named accordingly testThing_condition_expectation()
  • If breaking change, documentation/changelog update with migration instructions

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@ruisebas ruisebas requested a review from a team as a code owner September 11, 2024 15:11
@ruisebas ruisebas changed the title feat(Core): Updating to AWS SDK for Swift 0.77.0 feat(Core): Updating to AWS SDK for Swift 1.0.0 Sep 18, 2024
@harsh62 harsh62 merged commit aa18599 into main Sep 18, 2024
137 checks passed
@harsh62 harsh62 deleted the feat/upgrade-sdk branch September 18, 2024 15:43
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