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

Enable gPRC proxy renderer while recording gRPC traffic #143

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

elune1108
Copy link

References

  • TODO

Submitter checklist

  • Recommended: Join WireMock Slack to get any help in #help-contributing or a project-specific channel like #wiremock-java
  • The PR request is well described and justified, including the body and the references
  • The PR title represents the desired changelog entry
  • The repository's code style is followed (see the contributing guide)
  • Test coverage that demonstrates that the change works as expected
  • For new features, there's necessary documentation in this pull request or in a subsequent PR to wiremock.org

@tomakehurst
Copy link
Member

I'm wondering whether this architectural approach is the best one. The requirement to downcast the original request to a GrpcRequest feels like a leaked abstraction, which may have unintended consequences when working with other extensions.

Similarly, the addition of grpc to the mime types the recorder in the core looks for seems like a coupling that shouldn't exist.

Did you consider the option of keeping the proxy response renderer as-is and building a custom HttpClientFactory instead? i.e. one that has the default behaviour when it's a non-gRPC request, but builds and executes a gRPC request when it is.
This would keep WireMock's abstractions more intact - the internal view of the request/response would be plain JSON, and also we could probably avoid having to make changes to the core.

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.

3 participants