-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Use client settings in repository-gcs #28575
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
Conversation
4b2fc3c to
699cc7e
Compare
Similarly to what has been done for s3 and azure, this commit removes the repository settings `application_name` and `connect/read_timeout` in favor of client settings. It introduce a GoogleCloudStorageClientSettings class (similar to S3ClientSettings) and a bunch of unit tests for that, it aligns the documentation to be more coherent with the S3 one, it documents the connect/read timeouts that were not documented at all and also adds a new client setting that allows to define a custom endpoint.
|
@rjernst Would you like to review this please? I'd like to move forward on this, as exposing the endpoint setting will help to test the plugin using a fixture. |
699cc7e to
5d1ff1d
Compare
ywelsch
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM (some super minor nits)
docs/plugins/repository-gcs.asciidoc
Outdated
| // TEST[skip:we don't have gcs setup while testing this] | ||
|
|
||
| Some settings are sensitive and must be stored in the | ||
| {ref}/secure-settings.html[elasticsearch keystore]. This is the case of the service account file: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the case for the ...?
docs/plugins/repository-gcs.asciidoc
Outdated
| `endpoint`:: | ||
|
|
||
| The Google Cloud Storage service endpoint to connect to. This will be automatically | ||
| figured out by the Google Cloud Storage client but can be specified explicitly. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
automatically determined by the ...
| ==== Google Cloud Storage Repository plugin | ||
|
|
||
| * The repository settings `application_name`, `connect_timeout` and `read_timeout` have been removed and | ||
| must now be specified in the client settings instead. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
link to the docs here?
| } | ||
|
|
||
| private final Map<String, GoogleCredential> credentials; | ||
| private final Map<String, GoogleCloudStorageClientSettings> clientsSettings; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clientsSettings -> clientSettings?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There can be multiple client settings keyed by their name so I chose the plural form :)
| The client used to connect to S3 has a number of settings available. Client setting names are of | ||
| the form `s3.client.CLIENT_NAME.SETTING_NAME` and specified inside `elasticsearch.yml`. The | ||
| default client name looked up by an s3 repository is called `default`, but can be customized | ||
| default client name looked up by a `s3` repository is called `default`, but can be customized |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe instead "The default client name used by the "s3" repository is called default ...
rjernst
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
docs/plugins/repository-gcs.asciidoc
Outdated
|
|
||
| [source,sh] | ||
| ---- | ||
| bin/elasticsearch-keystore add gcs.client.default.credentials_file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The subcommand is add-file, not add.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch
docs/plugins/repository-gcs.asciidoc
Outdated
| [source,sh] | ||
| ---- | ||
| bin/elasticsearch-keystore add gcs.client.default.credentials_file | ||
| bin/elasticsearch-keystore add gcs.client.default.credentials_file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And this line seems to be duplicated?
Similarly to what has been done for s3 and azure, this commit removes the repository settings `application_name` and `connect/read_timeout` in favor of client settings. It introduce a GoogleCloudStorageClientSettings class (similar to S3ClientSettings) and a bunch of unit tests for that, it aligns the documentation to be more coherent with the S3 one, it documents the connect/read timeouts that were not documented at all and also adds a new client setting that allows to define a custom endpoint.
|
This change has been backported to 6.x in 240aa34 along with a deprecation log and updated migration documentation. |
Similarly to what has been done for s3 and azure, this commit removes the repository settings `application_name` and `connect/read_timeout` in favor of client settings. It introduce a GoogleCloudStorageClientSettings class (similar to S3ClientSettings) and a bunch of unit tests for that, it aligns the documentation to be more coherent with the S3 one, it documents the connect/read timeouts that were not documented at all and also adds a new client setting that allows to define a custom endpoint.
Similarly to what has been done for s3 and azure, this pull request removes
the repository settings
application_nameandconnect/read_timeoutin favour of settings at the client level.
It introduces a
GoogleCloudStorageClientSettingsclass (similar to
S3ClientSettings) and a bunch of unit tests for that,it aligns the documentation to be more coherent with the S3 one, it
documents the connect/read timeouts that were not documented at all
and also adds a new client setting that allows to define a custom
endpoint.