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 S3Client listObjects support in S3Template #831

Merged
merged 2 commits into from
Aug 14, 2023

Conversation

alexisgra
Copy link
Contributor

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring

📜 Description

I've added the listObjects operation in S3Template.

💡 Motivation and Context

It fixes the issue : #767

💚 How did you test it?

I added an integration test in S3TemplateIntegrationTests.

📝 Checklist

  • I reviewed submitted code
  • I added tests to verify changes
  • I updated reference documentation to reflect the change
  • All tests passing
  • No breaking changes

🔮 Next steps

@github-actions github-actions bot added the component: s3 S3 integration related issue label Jun 2, 2023
@maciejwalkowiak
Copy link
Contributor

Thanks @alexisgra for contribution and @kunalvarpe for taking your time to review!


/**
* Returns some or all (up to 1,000) of the objects in a bucket.
* Does not handle pagination. If you need pagination you should use {@link S3PathMatchingResourcePatternResolver} or {@link S3Client}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should include a paginator request since it will paginate if there are more than 1000 objects internally ->
https://sdk.amazonaws.com/java/api/latest/software/amazon/awssdk/services/s3/S3Client.html#listObjectsV2Paginator(software.amazon.awssdk.services.s3.model.ListObjectsV2Request)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to the issue I used as a reference: #767 . It is specified that in the S3Template, pagination would not be managed on the list objects. If you need pagination, you should use the S3Client or S3PathMatchingResourcePatternResolver according to the issue.
I can manage the pagination if required. Thanks.

@maciejwalkowiak maciejwalkowiak merged commit 6716eb7 into awspring:main Aug 14, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: s3 S3 integration related issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants