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

Moved to buf; Added buf lint; Fixed ping service to match standards; … #383

Merged
merged 2 commits into from
Jan 22, 2021

Conversation

bwplotka
Copy link
Collaborator

…Moved auth to interceptors.

Chained with #321

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

@bwplotka
Copy link
Collaborator Author

PTAL @johanbrandhorst @yashrsharma44

@codecov-io
Copy link

codecov-io commented Jan 17, 2021

Codecov Report

Merging #383 (e0ea420) into v2 (a79558a) will decrease coverage by 27.48%.
The diff coverage is 37.96%.

Impacted file tree graph

@@             Coverage Diff             @@
##               v2     #383       +/-   ##
===========================================
- Coverage   83.58%   56.09%   -27.49%     
===========================================
  Files          30       37        +7     
  Lines         932     1321      +389     
===========================================
- Hits          779      741       -38     
- Misses        114      511      +397     
- Partials       39       69       +30     
Impacted Files Coverage Δ
chain.go 0.00% <ø> (-90.91%) ⬇️
interceptors/auth/auth.go 100.00% <ø> (ø)
interceptors/auth/metadata.go 100.00% <ø> (ø)
interceptors/tags/fieldextractor.go 13.79% <0.00%> (-71.51%) ⬇️
testing/testpb/interceptor_suite.go 0.00% <0.00%> (ø)
testing/testpb/test.manual_extractfields.pb.go 0.00% <0.00%> (ø)
testing/testpb/test.manual_validator.pb.go 0.00% <0.00%> (ø)
testing/testpb/test.pb.go 36.92% <36.92%> (ø)
interceptors/logging/payload.go 67.18% <42.30%> (-15.43%) ⬇️
testing/testpb/test_grpc.pb.go 45.55% <45.55%> (ø)
... and 45 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 c1f1e53...e0ea420. Read the comment docs.

Comment on lines +102 to +104
proto: ## Generate testing protobufs
proto: $(BUF) $(PROTOC_GEN_GO) $(PROTOC_GEN_GO_GRPC) $(PROTO_TEST_DIR)/test.proto
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should we have two targets name proto? I'm not familiar with this Makefile pattern, if it is one.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I can see this being confusing, but it's totally ok. It's to ensure make help works (and shows this command)

Comment on lines +108 to +113
@PATH=$(GOBIN):$(TMP_GOPATH) $(BUF) protoc \
-I $(PROTO_TEST_DIR) \
--go_out=$(PROTO_TEST_DIR)/../ \
--go-grpc_out=$(PROTO_TEST_DIR)/../ \
$(PROTO_TEST_DIR)/*.proto
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is awesome, next step would be to just use buf generate: https://docs.buf.build/tour-6/. If you're feeling keen it should be possible to do here already with buf.gen.yaml:

version: v1beta1
plugins:
  - name: go
    out: testing/testpb/v1
  - name: go-grpc
    out: testing/testpb/v1

You may want opt: paths=source_relative if the files aren't going in the right place.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

uuu nice, let's try it (or in sep PR)

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.

Looks good! 😎

@@ -0,0 +1,68 @@
syntax = "proto3";

package testing.testpb.v1;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Looks solid 💪

@@ -23,6 +23,12 @@ $(BINGO): $(BINGO_DIR)/bingo.mod
@echo "(re)installing $(GOBIN)/bingo-v0.3.0"
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=bingo.mod -o=$(GOBIN)/bingo-v0.3.0 "github.com/bwplotka/bingo"

BUF := $(GOBIN)/buf-v0.35.1
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why are we adding buf dependency? Wanted to know for info purpose 😛

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Because we use now buf as a tool! (:

@bwplotka
Copy link
Collaborator Author

Look like this is ok to be merged (:

Let's make sure we merge after #321 is approved

Base automatically changed from update-proto-yash to v2 January 22, 2021 14:30
…Moved auth to interceptors.

Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
@bwplotka
Copy link
Collaborator Author

Rebased, rdy to merge (:

Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
@bwplotka bwplotka merged commit 468f615 into v2 Jan 22, 2021
@bwplotka bwplotka deleted the buf branch January 22, 2021 20:43
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

4 participants