-
Notifications
You must be signed in to change notification settings - Fork 25
AUTH /api/clusters returns response with panic error #734
AUTH /api/clusters returns response with panic error #734
Comments
This panic seems to be a result of using our |
@alexeykazakov may I ask: what is the initial reason for having this |
I mean, AFAICT, using the regular response writer seems to work fine: the client will get the response body compressed, but it's its own responsibility to decompress it upon reception, isn't it? |
isn't it because we need to gunzip the response to not have it gzipped twice? |
why would it be gzipped twice? ah, because the middleware on auth would gzip it again, of course! (🤦♂️ ) |
return lenght of the original compressed body to avoid panic
yes - the gzip middleware is used for all endpoints in auth service: https://github.com/fabric8-services/fabric8-auth/blob/master/main.go#L135 But looking at the code of middleware: https://github.com/goadesign/goa/blob/master/middleware/gzip/middleware.go#L277 |
yes, that's exactly what I just found as well, and I confirm I can get the clean response (decoded with |
Good job with it @alexeykazakov @xcoulon - it's great that we got rid of the |
reopening, since #735 did not correctly fixed the issue. |
The issue seems to be fixed by fabric8-services/fabric8-common#80 and #736 but we need to investigate if we can get rid of our custom gunzip writer in the proxy at all. |
Call to https://auth.prod-preview.openshift.io/api/clusters
Returns response with below invalid json format:
Where errors contains panic error stack trace as below:
The text was updated successfully, but these errors were encountered: