Closed NarekA closed 8 months ago
Attention: 6 lines
in your changes are missing coverage. Please review.
Comparison is base (
f2085a9
) 75.98% compared to head (bf3cbe2
) 76.89%. Report is 3 commits behind head on master.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
I am not sure if I would prefer to keep the 2 endpoints separate and fix the underlying issue. @alaeddine-13 is the integration with SSE as in documentation possible still?
@JoanFM I'm just taking the existing endpoint and allowing it to accept either parameters or a request body. I'm happy to add a post endpoint as well, but I need your help with the gateway.
Here is a branch on my fork that will reproduce the gateway error
@NarekA why do you want to change the GET endpoint method ? I thought the agreement was that, if you have basic requirements and would like to use client libraries, you use GET endpoint and if you need customized schemas and long input, you use the POST method. What is wrong with this approach ?
@NarekA why do you want to change the GET endpoint method ? I thought the agreement was that, if you have basic requirements and would like to use client libraries, you use GET endpoint and if you need customized schemas and long input, you use the POST method. What is wrong with this approach ?
Actually now I realize you want to allow passing either of body or query parameters. I'm not sure if that's a good practice when building HTTP services but I think it's a nice idea actually. Yes @JoanFM this should keep compatibility with the documentation section where we use a standard js client. A test would be great to have though or at least we need to try out the documentation on this PR before merging
@alaeddine-13 The current implementation with the POST method is fine, but it seems to break when using a deployment with a gateway. The stream all comes out at once. I modified this test (and am changing it back) not realizing that I was fixing the very thing it was testing for. The parameterized test passes for all the scenarios except for http+gateway. Using get instead of post seems to fix the gateway and we have only one endpoint so it's less confusing.
If we do allow post, I like the idea of just using the same route with 2 methods: methods=['GET', 'POST'],
. That way we have consistency between the endpoints, and don't have to maintain 2 routes.
Only one test job failing, and I can't find a clear stack trace in it so it might be flakiness.
Making a new PR that follows conventions to replace https://github.com/jina-ai/jina/pull/6091 and https://github.com/jina-ai/jina/pull/6093
Http streaming breaks when the input doc schema has fields which are not str, int, or float. This includes dicts, bools, and nested objects (See Issue 6090). In addition it caps the input size to 2000 characters (Much less when you factor in URL encoding)
This PR changes the get endpoints to have the data passed in the request body rather than the params.
Goals:
Also related: https://github.com/jina-ai/jina/pull/6097