-
Notifications
You must be signed in to change notification settings - Fork 0
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
gRPC Client Library Migrator #11
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #11 +/- ##
===========================================
- Coverage 89.97% 86.09% -3.88%
===========================================
Files 135 199 +64
Lines 5284 9641 +4357
===========================================
+ Hits 4754 8299 +3545
- Misses 530 1342 +812
Continue to review full report at Codecov.
|
…rt (and a bit why)
…f messages. Added the basis for handling the other changes as well
…rator into feature/grpc-migrator
To reflect on the state of the PR. It may be considered finished apart from the following points.
|
With the PR on the |
gRPC Client Library Migrator
♻️ Current situation & Problem
The REST Migrator is the only supported migrator by the ApdoiniMigrator as of now.
We want to explore how automated client library migration fits other API types.
💡 Proposed solution
We implement a GRPCMigrator for generating and migration gRPC clients for
ApodiniGRPC
web services, to demonstrate the feasibility of automated machine-readable migration guide for RPC-based API types.⚙️ Release Notes
rest
andgrpc
forgenerate
/migrate
subcommands + renames-p
option to-n
).2.1.0
.GRPCMigrator
adds support for generating and migration client libraries forApodiniGRPC
-based web services. Use it with themigrator genreate/migrate grpc
subcommands. You need to supply theAPIDocument
, the proto file (retrieved from the respective endpoint of the ApodiniGRPC reflection service), and optionally theMigrationGuide
.➕ Additional Information
This PR currently doesn't handle the installation of the
protoc-gen-grpc-migrator
protoc plugin. Currently, you need to add this binary to thePATH
yourself. You may also use the according command line option to specify the path to the executable.Related PRs
Testing
Testing was added. Primarily, end 2 end tests and additional tests which weren't perfectly covered by the QONEQTIC example.
Reviewer Nudging
Well, I assume this is rather a huge PR and a hell to review. You may just want to start at the entry point, the ApdoiniMigratorCLI. From that point on you may explore GRPCMethod (method generation and migration), GRPCMessage and GRPCEnum and their child types (fields/enum cases). Furthermore,
MigrationContext.swift
has some important processing you might want to check out, as it handles parameter combination, response type wrapping and everything which is required to ensure that ApodinIGRPC supplied identifiers (GRPCName, GRPCNumber, ...) are updated/encoded properly.Code of Conduct & Contributing Guidelines
By submitting creating this pull request, you agree to follow our Code of Conduct and Contributing Guidelines: