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

Support @ServiceConnection endpoint attribute for S3Presigner #1310

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

kunalvarpe
Copy link
Contributor

@kunalvarpe kunalvarpe commented Dec 21, 2024

Fixes: gh-1289

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring

📜 Description

This change address the issue where endpoint property is not respected for S3Presigner bean auto configuration with @ServiceConnection .

💡 Motivation and Context

It fixes #1289 which reports the issue.

💚 How did you test it?

📝 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 Dec 21, 2024
@@ -88,6 +93,14 @@ void configuresS3ClientWithServiceConnection(@Autowired S3Client client) {
assertThatCode(client::listBuckets).doesNotThrowAnyException();
}

@Test
@Disabled
void configuresS3PresignerWithServiceConnection(@Autowired S3Presigner s3Presigner) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@maciejwalkowiak @MatejNedic
I have disabled this test because I am uncertain how to verify that the S3Presigner correctly references the endpoint property from the ServiceConnection. I noticed that most client tests simply call one of the basic methods and ensure that the call does not result in an exception.

In this case, I attempted to use the presignGetObject method for verification. However, this method requires several parameters to be set up, and it might also necessitate configuring an S3 bucket prior to running the test. This has left me uncertain whether my approach is correct. I would appreciate your opinion or guidance on how to proceed with this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@maciejwalkowiak @MatejNedic @tomazfernandes
I have fixed the test, please let me know if I have validated test correctly.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@maciejwalkowiak @MatejNedic @tomazfernandes
Is there any way to retry the pipeline, because the test which is failing in the CI process is passing locally.

Reason:
- Endpoint override conditions are added as else if blocks
- Removed the Disable test annotation as added correct test for validating aws connection details with s3 presigner.
@kunalvarpe kunalvarpe marked this pull request as ready for review December 23, 2024 13:44
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.

S3Presigner not considering @ServiceConnection endpoint
1 participant