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(storage): update Storage APIs with StoragePath parameter #3585

Merged
merged 14 commits into from
Apr 26, 2024

Conversation

phantumcode
Copy link
Contributor

@phantumcode phantumcode commented Mar 25, 2024

Issue #

Description

  • Introduce new data type that provides path to S3 buckets called StoragePath
  • Update Storage category and AWSS3StoragePlugin APIs to use StoragePath parameter. The following APIs are udpated: getURL, list, remove, downloadData, downloadFile, uploadData, uploadFile
  • Units test and integration tests are also updated

All code changes have been previously reviewed and approved:

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
  • 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.

@phantumcode phantumcode requested a review from a team as a code owner March 25, 2024 20:03
@codecov-commenter
Copy link

codecov-commenter commented Mar 28, 2024

Codecov Report

Attention: Patch coverage is 47.01087% with 195 lines in your changes are missing coverage. Please review.

Project coverage is 71.05%. Comparing base (358699c) to head (8c85096).
Report is 19 commits behind head on main.

Files Patch % Lines
...lugin/AWSS3StoragePlugin+AsyncClientBehavior.swift 0.00% 63 Missing ⚠️
Amplify/Core/Support/AmplifyTaskExecution.swift 0.00% 15 Missing ⚠️
...ories/Storage/StorageCategory+ClientBehavior.swift 0.00% 14 Missing ⚠️
...e/Operation/Request/StorageUploadDataRequest.swift 0.00% 13 Missing ⚠️
...e/Operation/Request/StorageUploadFileRequest.swift 0.00% 13 Missing ⚠️
...Operation/Request/StorageDownloadFileRequest.swift 0.00% 10 Missing ⚠️
...orage/Operation/Request/StorageGetURLRequest.swift 0.00% 10 Missing ⚠️
...Operation/Request/StorageDownloadDataRequest.swift 0.00% 9 Missing ⚠️
.../Categories/Storage/Result/StorageListResult.swift 0.00% 9 Missing ⚠️
...ugin/Support/Internal/StoragePath+Extensions.swift 73.52% 9 Missing ⚠️
... and 7 more

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3585      +/-   ##
==========================================
+ Coverage   68.47%   71.05%   +2.57%     
==========================================
  Files        1077     1012      -65     
  Lines       36282    33463    -2819     
==========================================
- Hits        24844    23777    -1067     
+ Misses      11438     9686    -1752     
Flag Coverage Δ
API_plugin_unit_test 67.50% <ø> (ø)
AWSPluginsCore 66.90% <ø> (ø)
Amplify 47.33% <0.94%> (-0.79%) ⬇️
Analytics_plugin_unit_test 81.16% <ø> (ø)
Auth_plugin_unit_test 79.00% <ø> (-0.12%) ⬇️
CoreMLPredictions_plugin_unit_test 59.44% <ø> (ø)
DataStore_plugin_unit_test 81.99% <ø> (-0.46%) ⬇️
Geo_plugin_unit_test 70.75% <ø> (ø)
Logging_plugin_unit_test 62.87% <ø> (ø)
Predictions_plugin_unit_test ?
PushNotifications_plugin_unit_test 87.13% <ø> (ø)
Storage_plugin_unit_test 76.57% <65.64%> (-1.05%) ⬇️
unit_tests 71.05% <47.01%> (+2.57%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

harsh62
harsh62 previously approved these changes Apr 15, 2024
@phantumcode phantumcode merged commit 162847a into main Apr 26, 2024
78 checks passed
@phantumcode phantumcode deleted the feature/gen2_storage branch April 26, 2024 17:44
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.

4 participants