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: make endpointOverride configurable by DataAddress #68

Merged

Conversation

maciejkizlich-zf
Copy link
Contributor

What this PR changes/adds

PR adds possibility to specify 'endpointOverride' property in DataAddress.

Why it does that

So that it's possible to push data into different instance of S3 compatible storage than configured via dataplane's properties.

Further notes

Change mostly based on previous PR (eclipse-edc/Connector#1904) by @reisman234, recreated due to changes in project structure.

Linked Issue(s)

Closes #24

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

We are always happy to welcome new contributors ❤️ To make things easier for everyone, please make sure to follow our contribution guidelines, check if you have already signed the ECA, and relate this pull request to an existing issue or discussion.

@codecov-commenter
Copy link

codecov-commenter commented Aug 31, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.33% 🎉

Comparison is base (9741fb4) 72.86% compared to head (a3f05c7) 73.19%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the GitHub App Integration for your organization. Read more.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #68      +/-   ##
==========================================
+ Coverage   72.86%   73.19%   +0.33%     
==========================================
  Files          20       20              
  Lines         479      485       +6     
  Branches       17       17              
==========================================
+ Hits          349      355       +6     
  Misses        129      129              
  Partials        1        1              
Files Changed Coverage Δ
.../connector/dataplane/aws/s3/S3DataSinkFactory.java 100.00% <100.00%> (ø)
...onnector/dataplane/aws/s3/S3DataSourceFactory.java 100.00% <100.00%> (ø)

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

Copy link
Member

@ndr-brt ndr-brt left a comment

Choose a reason for hiding this comment

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

Thanks for taking care, I think there are some issues in the designed proposed:
making the AwsClientProvider mutable would be pretty dangerous, it is a component used by potentially different threads, and so it should never change once is instantiated (immutable).

my suggestion would be to overload the s3Client with a version that accept a custom endpointOverride that will eventually being used instead of the one in the configuration.

note: This could be an occasion to introduce a data object called like S3ClientRequest that contains region, secretToken and endpointOverride, so at the end there'll be only one s3Client method with that parameter. not mandatory but definitely a good refactoring work to be done at the end.

@ndr-brt ndr-brt added the enhancement New feature or request label Aug 31, 2023
@maciejkizlich-zf
Copy link
Contributor Author

@ndr-brt please take a look now - is this what you expected?

@maciejkizlich-zf
Copy link
Contributor Author

@ndr-brt please take a look at newest changes, thanks in advance!

@ndr-brt
Copy link
Member

ndr-brt commented Sep 4, 2023

@maciejkizlich-zf just re-request my review through github without adding a comment, so I will be notified correctly ;)

@maciejkizlich-zf maciejkizlich-zf changed the title 10: feat: make endpointOverride configurable by DataAddress feat: make endpointOverride configurable by DataAddress Sep 4, 2023
@maciejkizlich-zf maciejkizlich-zf marked this pull request as ready for review September 4, 2023 15:06
@ndr-brt ndr-brt merged commit 47e065a into eclipse-edc:main Sep 4, 2023
@ndr-brt
Copy link
Member

ndr-brt commented Sep 4, 2023

thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

S3 endpointOverride needs to be in DataAddess
3 participants