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 GCSSettings to make endpointUrl + basePath configurable #2726

Merged
merged 1 commit into from
Sep 6, 2021

Conversation

mdedetrich
Copy link
Contributor

@mdedetrich mdedetrich commented Sep 3, 2021

This PR adds a GCSSettings for google-cloud-stroage in order to give the ability to configure the host and the basePath. This is mainly done due to the fact that its currently not possible to test GCS using an implementation such as https://github.com/fsouza/fake-gcs-server since the endpoints are hardcoded at

private val baseUrl = "https://storage.googleapis.com/"
private val basePath = "/storage/v1"
.

Of note is there was a previous GCStorageSettings which was deprecated beforehand since there are a lot of settings that are shared between Google services. In order to not create conflicts/confusion, a seperate GCSSettings was created and it contains settings that are only specific to Google Cloud Storage so from a design PoV there shouldn't be any issues (common settings go into GoogleSettings, google service specific settings i.e. endpoints for a specific service go into the projects specific settings).

Tests were also made to make sure that the settings were correctly loaded. Afaik no binary incompatible changes were introduced.

If this PR is accepted/merged it means its also possible to use https://github.com/fsouza/fake-gcs-server to test GCS in alpakka in a similra fashion to how S3 is being tested with https://min.io/ (currently the tests just an in memory mock which is arguably not ideal).

Copy link
Member

@ennru ennru left a comment

Choose a reason for hiding this comment

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

Thank you for keeping up with all that config ceremony.

@mdedetrich
Copy link
Contributor Author

@ennru I have just done as request, the main config is now under alpakka.google.cloud-storage and I have fixed the old class reference.

Also adjusted the commit message so its shorter, let me know if anything else is needed.

Copy link
Member

@ennru ennru left a comment

Choose a reason for hiding this comment

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

LGTM.

@ennru ennru changed the title Add GCSSettings in order to make endpointUrl + basePath configurable Add GCSSettings to make endpointUrl + basePath configurable Sep 6, 2021
@ennru ennru merged commit f22cb55 into akka:master Sep 6, 2021
@ennru ennru added this to the 3.0.4 milestone Sep 6, 2021
@ennru
Copy link
Member

ennru commented Sep 6, 2021

Thank you!

@mdedetrich mdedetrich deleted the add-gcssettings branch September 6, 2021 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants