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
Deprecate application/json content type in favour of x-ndjson where content streaming is supported #25718
Comments
I don't think we should deprecate For instance, in RFC 6648 the I don't think we should allow only |
good point then we should document that we still support application/json ? I will mark for discussion just to make sure. |
Should we start to support |
No. It's easy to add but hard to take away if it never becomes a thing. |
Discussed in FixitFriday. We agree there is a bug that needs fixing but the discussion so far suggests that we need to do more research in order to find out the proper way to handle the |
If/when you do deprecate application/json for the bulk/msearch requests, can you give the Kibana team a heads up? We're sending application/json for all console requests, and it'd be good to get that implementation updated before or as it gets deprecated so using console doesn't result in a bunch of deprecation logs in elasticsearch. |
my original patch attented to fix an deprecation warnings while sending json related to content type. I however wanted to improve my commit and support the mentioned x-ndjson content type in case of bulk mode. see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-bulk.html However, firstly my patch was wrong, since, in bulk mode, the x-ndjson was set even for connection checks. Secondly I discovered that ES community kind of disagree of what is the correct behavior: in RFC 6648 the x- prefix is already decided as "deprecated" see elastic/elasticsearch#25718 So I decided to put only application/json as content type; it is supported for both simple request or bulk requests containing multiple json. We can improve it when there is a final decision about it. Re-Fixes: rsyslog#1642 Fixes: commit 462be8b (omelasticsearch: avoid ES5 warnings while sending json) Signed-off-by: William Dauchy <w.dauchy@criteo.com>
@javanna is this still something we want to pursue? My original trepidation still stands |
I would think we should do something about it @dakrone but I would discuss this with the core/infra team so that we reach a final decision. |
Pinging @elastic/es-core-infra |
We discussed this today a bit in the core/infra team meeting, but no conclusion we reached, a quick summary of the points/questions:
There will be more discussion about this, so far no definite conclusion. |
Could also affect ML post data. |
This came back to life because of the discussion in #26280.
In my opinion it is not. It will cause extra work and complexity for Kibana, extra work and complexity for the docs snippet framework and extra work and complexity for the language clients. All this time adds up and surely as a company we have something more worthwhile to spend our time on. So while it doesn't hurt to permit |
Given the lack of traction on this change especially due to whether it is worth making this change, I am going to close this issue. |
Endpoints that support content streaming (bulk, msearch) currently supports both
application/json
andapplication/x-ndjson
as content type. We'd like to enforceapplication/x-ndjson
in the future and remove support forapplication/json
, but we first need to deprecate it.This will require some coordination with the clients team and we may need to update the REST spec in order to indicate which APIs support content streaming.
The text was updated successfully, but these errors were encountered: