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

Introduce strict deprecation mode for low-level REST client #33534

Closed
jasontedor opened this issue Sep 7, 2018 · 4 comments
Closed

Introduce strict deprecation mode for low-level REST client #33534

jasontedor opened this issue Sep 7, 2018 · 4 comments
Labels
:Clients/Java Low Level REST Client Minimal dependencies Java Client for Elasticsearch >enhancement help wanted adoptme

Comments

@jasontedor
Copy link
Member

jasontedor commented Sep 7, 2018

We want to surface deprecation warnings on the client side more visibly, as today they come back as headers which might not be being examined by an application developer using the Java low-level REST client. This issue proposes that we add a strict deprecation mode to the low-level REST client with the following properties:

  • if strict mode is off (default for 6.x), we log all deprecation warning headers
  • if strict mode is on, a deprecation warning header in the response fails the request
  • we can consider in the future changing the default to strict mode being enabled
@jasontedor jasontedor added >enhancement help wanted adoptme :Clients/Java Low Level REST Client Minimal dependencies Java Client for Elasticsearch labels Sep 7, 2018
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra

@nik9000
Copy link
Member

nik9000 commented Sep 7, 2018

+1

I'd like to be able to use this strict mode in the high level rest client's tests as well.

@javanna
Copy link
Member

javanna commented Sep 17, 2018

Note that we intended to log all warnings whenever log level is set to WARN, but I am afraid that does not work anymore as the format of warnings responses header has changed. Would be nice to also expose warning headers as well as other headers (out of the scope of this issue) to the high-level REST client too, it should be possible now that we are duplicating response objects.

@javanna
Copy link
Member

javanna commented Sep 17, 2018

I was wrong above, warnings still get logged. Not sure if anything has to change on that end.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Clients/Java Low Level REST Client Minimal dependencies Java Client for Elasticsearch >enhancement help wanted adoptme
Projects
None yet
Development

No branches or pull requests

4 participants