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

Fix HTTP Server errors #498

Merged
merged 2 commits into from
Mar 15, 2024
Merged

Fix HTTP Server errors #498

merged 2 commits into from
Mar 15, 2024

Conversation

mostafa
Copy link
Member

@mostafa mostafa commented Mar 14, 2024

Ticket(s)

Description

This PR fixes two bugs:

  1. The gRPC client in the HTTP server used to use a context with cancel, and it was refactored to add graceful stop functionality, hence the function now returns an http.Server instead. This causes the defer to be called to cancel the context, hence a closed gRPC client will be received by the gateway, which produced HTTP 499 with the message: grpc: the client connection is closing.
  2. The previous code was using koanf, which was causing marshaling issues. Now the already unmarshaled struct is used.

Related PRs

Development Checklist

  • I have added a descriptive title to this PR.
  • I have squashed related commits together.
  • I have rebased my branch on top of the latest main branch.
  • I have performed a self-review of my own code.
  • I have commented on my code, particularly in hard-to-understand areas.
  • I have added docstring(s) to my code.
  • I have made corresponding changes to the documentation (docs).
  • I have updated docs using make gen-docs command.
  • I have added tests for my changes.
  • I have signed all the commits.

Legal Checklist

@mostafa mostafa marked this pull request as ready for review March 15, 2024 00:00
@mostafa mostafa merged commit e88df0a into main Mar 15, 2024
4 checks passed
@mostafa mostafa deleted the fix-api-gateway-errors branch March 15, 2024 00:00
@mostafa mostafa added this to the v0.9.x milestone Mar 15, 2024
smnmna99 pushed a commit that referenced this pull request Apr 2, 2024
* Use unmarshalled struct for reading plugin config
* Use background context to prevent cancellation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant