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

Upgraded proto related deps: grpc and protobuf; removed gogo from core. #321

Merged
merged 3 commits into from Jan 22, 2021

Conversation

bwplotka
Copy link
Collaborator

Signed-off-by: Bartlomiej Plotka bwplotka@gmail.com

@googlebot
Copy link

All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter.

We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only @googlebot I consent. in this pull request.

Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

go.mod Outdated Show resolved Hide resolved
@bwplotka bwplotka force-pushed the update-proto-yash branch 2 times, most recently from d709847 to ed34491 Compare July 24, 2020 14:38
@bwplotka bwplotka force-pushed the update-proto-yash branch 3 times, most recently from aafc980 to d16a4d2 Compare July 24, 2020 15:28
@bwplotka
Copy link
Collaborator Author

bwplotka commented Jul 24, 2020

LOL. Next level error messages in generated code via new gRPC protoc-gen-go-grpc: 😄

*TestPingService does not implement testpb.TestServiceServer (missing testpb.mustEmbedUnimplementedTestServiceServer method)

XD

@yashrsharma44
Copy link
Collaborator

@googlebot I consent

@googlebot
Copy link

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

@bwplotka
Copy link
Collaborator Author

bwplotka commented Dec 3, 2020

Just to remind the goals of this PR:

  • Update grpc and protobuf deps to latest, use the new API

Given the gogo getting... obsolete (is that right?) maybe we can just stop depending on gogo completely.

@johanbrandhorst
Copy link
Collaborator

Gogo is indeed unlikely to recover, though Kubernetes just reached out to ask what's going on: https://twitter.com/dims/status/1334219405069258753.

@bwplotka
Copy link
Collaborator Author

Ok, getting back to this! (:

cc @yashrsharma44

Let's move this forward. Upgrading both protobuf and grpc to latest

@bwplotka
Copy link
Collaborator Author

Should be fine now (:

PTAL @yashrsharma44 @johanbrandhorst

@codecov-io
Copy link

codecov-io commented Jan 17, 2021

Codecov Report

Merging #321 (55f20ac) into v2 (a79558a) will decrease coverage by 20.05%.
The diff coverage is 47.16%.

Impacted file tree graph

@@             Coverage Diff             @@
##               v2     #321       +/-   ##
===========================================
- Coverage   83.58%   63.52%   -20.06%     
===========================================
  Files          30       34        +4     
  Lines         932      913       -19     
===========================================
- Hits          779      580      -199     
- Misses        114      279      +165     
- Partials       39       54       +15     
Impacted Files Coverage Δ
chain.go 0.00% <ø> (-90.91%) ⬇️
grpctesting/interceptor_suite.go 0.00% <0.00%> (ø)
grpctesting/pingservice.go 52.63% <0.00%> (ø)
interceptors/tags/fieldextractor.go 13.79% <0.00%> (-71.51%) ⬇️
interceptors/logging/payload.go 67.18% <42.30%> (-15.43%) ⬇️
interceptors/retry/retry.go 66.66% <70.00%> (-9.58%) ⬇️
interceptors/skip/interceptor.go 71.42% <71.42%> (ø)
interceptors/logging/interceptors.go 100.00% <100.00%> (ø)
interceptors/logging/logging.go 61.53% <100.00%> (-6.21%) ⬇️
interceptors/ratelimit/ratelimit.go 100.00% <100.00%> (ø)
... and 36 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ad3d951...582d3a5. Read the comment docs.

interceptors/logging/payload.go Outdated Show resolved Hide resolved
interceptors/logging/payload.go Outdated Show resolved Hide resolved
interceptors/logging/payload.go Show resolved Hide resolved
interceptors/logging/payload.go Outdated Show resolved Hide resolved
@bwplotka
Copy link
Collaborator Author

Makes sense @yashrsharma44, fixed PTAL 🤗

yashrsharma44 and others added 2 commits January 20, 2021 17:05
Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
@bwplotka
Copy link
Collaborator Author

Rebased, PTAL 🤗

return nil, fmt.Errorf("jsonpb serializer failed: %v", err)
func logProtoMessageAsJson(logger Logger, pbMsg proto.Message, key string, msg string) {
payload, err := protojson.Marshal(pbMsg)
if err != nil {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, we should break it only if it makes sense to do so.

I was thinking about this and since it's only oneliner it does not matter if we do with or without else. WDYT?

I think we could update style guide to mention for multi line bodies? 🤔

Copy link
Collaborator

@yashrsharma44 yashrsharma44 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🔥

Copy link
Collaborator Author

@bwplotka bwplotka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @yashrsharma44

Let's wait for @johanbrandhorst review until tomorrow, then we can merge & iterate if something is wrong!

return nil, fmt.Errorf("jsonpb serializer failed: %v", err)
func logProtoMessageAsJson(logger Logger, pbMsg proto.Message, key string, msg string) {
payload, err := protojson.Marshal(pbMsg)
if err != nil {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, we should break it only if it makes sense to do so.

I was thinking about this and since it's only oneliner it does not matter if we do with or without else. WDYT?

I think we could update style guide to mention for multi line bodies? 🤔

Copy link
Collaborator

@johanbrandhorst johanbrandhorst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work! Sorry for the delay on the review. I think we should be able to remove gogofast now?

Makefile Outdated Show resolved Hide resolved
go.mod Outdated Show resolved Hide resolved
scripts/genproto.sh Outdated Show resolved Hide resolved
Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
@bwplotka
Copy link
Collaborator Author

done! @johanbrandhorst

@bwplotka bwplotka merged commit c1f1e53 into v2 Jan 22, 2021
@bwplotka bwplotka deleted the update-proto-yash branch January 22, 2021 14:30
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.

None yet

5 participants