Closed vytautas-karpavicius closed 3 years ago
Changes Missing Coverage | Covered Lines | Changed/Added Lines | % | ||
---|---|---|---|---|---|
internal/compatibility/thrift/helpers.go | 0 | 15 | 0.0% | ||
internal/compatibility/proto/helpers.go | 17 | 36 | 47.22% | ||
internal/compatibility/proto/decision.go | 125 | 158 | 79.11% | ||
internal/compatibility/proto/error.go | 0 | 50 | 0.0% | ||
internal/compatibility/thrift/response.go | 134 | 258 | 51.94% | ||
internal/compatibility/thrift/decision.go | 0 | 148 | 0.0% | ||
internal/compatibility/adapter.go | 33 | 238 | 13.87% | ||
internal/compatibility/thrift/enum.go | 56 | 283 | 19.79% | ||
internal/compatibility/proto/enum.go | 56 | 295 | 18.98% | ||
internal/compatibility/proto/response.go | 0 | 260 | 0.0% | ||
<!-- | Total: | 1289 | 5010 | 25.73% | --> |
Files with Coverage Reduction | New Missed Lines | % | ||
---|---|---|---|---|
internal/internal_task_pollers.go | 2 | 80.45% | ||
internal/compatibility/adapter.go | 21 | 21.0% | ||
<!-- | Total: | 23 | --> |
Totals | |
---|---|
Change from base Build 824b8973-99ad-4f10-9ea7-7b04277109c0: | -8.4% |
Covered Lines: | 12168 |
Relevant Lines: | 19275 |
What changed? Up to this point, there was one way mapping for thrift to proto types. This was used to create a compatibility layer, such that existing client could communicate in gRPC with server.
Now adding mapping in other direction as well. This will be used to convert internal of client itself to use proto types, but still accept publicly exposed thrift types.
Why? To migrate internals of go client to use proto types.
Only publicly exposed API surface will keep thrift for compatibility.
How did you test it? Added unit tests that ensures the following invariant hold true:
Potential risks New mappers not used yet.