-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Add manual implementation of APIv3 HTTP endpoints #5054
Add manual implementation of APIv3 HTTP endpoints #5054
Conversation
Signed-off-by: Yuri Shkuro <[email protected]>
Signed-off-by: Yuri Shkuro <[email protected]>
Signed-off-by: Yuri Shkuro <[email protected]>
Signed-off-by: Yuri Shkuro <[email protected]>
Signed-off-by: Yuri Shkuro <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5054 +/- ##
==========================================
+ Coverage 95.55% 95.58% +0.03%
==========================================
Files 313 314 +1
Lines 18160 18321 +161
==========================================
+ Hits 17352 17513 +161
Misses 647 647
Partials 161 161
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Signed-off-by: Yuri Shkuro <[email protected]>
@@ -60,6 +61,9 @@ const ( | |||
// REGENERATE_SNAPSHOTS=true go test -v ./cmd/query/app/apiv3/... | |||
var regenerateSnapshots = os.Getenv("REGENERATE_SNAPSHOTS") == "true" | |||
|
|||
// The tests in http_gateway_test.go set this to true to use manual gateway implementation. | |||
var useHTTPGateway = false |
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.
not the cleanest way, but hopefully we'll just delete grpc-gateway based implementation soon and simplify/consolidate the tests
// Unwrap the 'result' container generated by the gateway. | ||
// See https://github.com/grpc-ecosystem/grpc-gateway/issues/2189 | ||
type resultWrapper struct { | ||
Result json.RawMessage `json:"result"` |
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.
to avoid this ugliness use the new helper types from IDL and marshal in one go.
Signed-off-by: Yuri Shkuro <[email protected]>
Signed-off-by: Yuri Shkuro <[email protected]>
Signed-off-by: Yuri Shkuro <[email protected]>
Signed-off-by: Yuri Shkuro <[email protected]>
Signed-off-by: Yuri Shkuro <[email protected]>
Signed-off-by: Yuri Shkuro <[email protected]>
Signed-off-by: Yuri Shkuro <[email protected]>
Signed-off-by: Yuri Shkuro <[email protected]>
Signed-off-by: Yuri Shkuro <[email protected]>
## Which problem is this PR solving? - Part of #5052 - Continues #5054 - Closes #4911 ## Description of the changes - Replace grpc-gateway based implementation with manual HTTP implementation from #5054 - Clean up spurious grpc-gateway usage (e.g. all-in-one test that did not need it) - Delete grpc-gateway step from `make proto` and remove the corresponding generated file - `go mod tidy` removes grpc-gateway and github.com/golang/protobuf ## How was this change tested? - CI --------- Signed-off-by: Yuri Shkuro <[email protected]>
Which problem is this PR solving?
Description of the changes
Follow-ups
How was this change tested?