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

Use github.com/golang/protobuf/descriptor ForMessage and fix CI from not rebasing #857

Merged
merged 4 commits into from
Jan 23, 2019

Conversation

mechinn
Copy link
Contributor

@mechinn mechinn commented Jan 23, 2019

@johanbrandhorst this is the fix because I didn't rebase on master before you merged, also stumbled on https://godoc.org/github.com/golang/protobuf/descriptor as a replacement for the function I built to extract Descriptor

…cting FileDescriptorProto ourselves and fixing generated stream.swagger.json
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.

There should be an unused function now to delete as well, right?

Gopkg.toml Outdated
@@ -1,4 +1,5 @@
required = [
"github.com/golang/protobuf/descriptor",
Copy link
Collaborator

Choose a reason for hiding this comment

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

You shouldn't need to explicitly add this as we're importing it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

you would think wouldn't you:

"github.com/golang/protobuf/descriptor" is not imported by your project, and has been temporarily added to Gopkg.lock and vendor/. If you run "dep ensure" again before actually importing it, it will disappear from Gopkg.lock and vendor/.

Copy link
Collaborator

Choose a reason for hiding this comment

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

That doesn't sound right at all

Copy link
Contributor Author

Choose a reason for hiding this comment

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

agreed, maybe it's because there are no go files in the root of the repo? dep is weird sometimes...

Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't think that should matter. I've never had to add a package explicitly like this. Let me try checking out this branch.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

huh you're right, if I get rid of the requires everything still works fine, I guess I just confused dep by doing dep ensure -add github.com/golang/protobuf/descriptor

@johanbrandhorst
Copy link
Collaborator

Hm, I figured our CI tests would have flagged that up 🤔.

@johanbrandhorst
Copy link
Collaborator

johanbrandhorst commented Jan 23, 2019

There should be an unused function now to delete as well, right?

By this I mean the function where we set the sourceCodeInfo explicitly before.

@mechinn mechinn changed the title Use github.com/golang/protobuf/descriptor ForMessage instead of extra… Use github.com/golang/protobuf/descriptor ForMessage and fix CI from not rebasing Jan 23, 2019
@mechinn
Copy link
Contributor Author

mechinn commented Jan 23, 2019

There should be an unused function now to delete as well, right?

By this I mean the function where we set the sourceCodeInfo explicitly before.

yeah good catch, removed

@codecov-io
Copy link

codecov-io commented Jan 23, 2019

Codecov Report

Merging #857 into master will increase coverage by 0.1%.
The diff coverage is 86.66%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master     #857     +/-   ##
=========================================
+ Coverage   52.98%   53.08%   +0.1%     
=========================================
  Files          39       39             
  Lines        3905     3888     -17     
=========================================
- Hits         2069     2064      -5     
+ Misses       1636     1630      -6     
+ Partials      200      194      -6
Impacted Files Coverage Δ
protoc-gen-swagger/genswagger/template.go 53.54% <ø> (-0.09%) ⬇️
protoc-gen-swagger/genswagger/generator.go 15.11% <86.66%> (+15.11%) ⬆️

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 f336fbc...7586e8a. Read the comment docs.

@johanbrandhorst johanbrandhorst merged commit f52ac10 into grpc-ecosystem:master Jan 23, 2019
@mechinn
Copy link
Contributor Author

mechinn commented Jan 23, 2019

Hm, I figured our CI tests would have flagged that up 🤔.

considering another change that was merged before my other one changed the ABitOfEverything message and we had never generated the stream.swagger.json before my change I would have been impressed if the CI picked up this issue before the merge into master

@johanbrandhorst
Copy link
Collaborator

Thanks for this, I will confirm master builds successfully and release 1.7.0 🎉

@mechinn mechinn deleted the useForMessage branch January 23, 2019 16:26
adasari pushed a commit to adasari/grpc-gateway that referenced this pull request Apr 9, 2020
…not rebasing (grpc-ecosystem#857)

* Use github.com/golang/protobuf/descriptor ForMessage instead of extracting FileDescriptorProto ourselves and fixing generated stream.swagger.json

* Fixing bazel and removing dead code

* remove required github.com/golang/protobuf/descriptor

* revert removing github.com/go-resty/resty
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants