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

API protobuf generation #2099

Closed
wlynch opened this issue Apr 20, 2021 · 1 comment
Closed

API protobuf generation #2099

wlynch opened this issue Apr 20, 2021 · 1 comment
Labels
lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.

Comments

@wlynch
Copy link
Contributor

wlynch commented Apr 20, 2021

Expected Behavior

I'd like to be able to embed knative/pkg types as protobufs. This is common with kubernetes types recently using go-to-protobuf, autogenerating the proto from the base Go type. (example - core/v1).

Actual Behavior

No protobufs exist. :(

Additional Info

I've tried playing around with go-to-protobuf generation for knative.dev/pkg/apis, but the automatic generation seems to have trouble with the apis.URL type, since it tries to generate the underlying url.URL struct. I tried to resolve this with a custom marshaller, but ran into issues (likely related to gogo/protobuf#678).

Sample command:

go-to-protobuf -p knative.dev/pkg/apis --go-header-file=../hack/boilerplate/boilerplate.go.txt --proto-import=../vendor

Changing the apis.URL type to a string with helper methods to convert into a url.URL might help ease proto generation while being compatible with exist API json/yaml formats, but I'm not sure if this will be considered a breaking change subject to the deprecation policy.

@github-actions
Copy link
Contributor

This issue is stale because it has been open for 90 days with no
activity. It will automatically close after 30 more days of
inactivity. Reopen the issue with /reopen. Mark the issue as
fresh by adding the comment /remove-lifecycle stale.

@github-actions github-actions bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jul 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.
Projects
None yet
Development

No branches or pull requests

1 participant