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

Move istio/proxy protos into istio/api #2107

Merged
merged 2 commits into from
Oct 6, 2021

Conversation

howardjohn
Copy link
Member

Fixes istio/istio#35210.

This does two things:

  • Move some protos we have in istio/istio that are manually generating
    the go protos, using an outdated protobuf library and outdated proto.
  • Move some protos we have in istio/proxy that are not generating any go
    protos at all.

A next step will be to have istio/istio import these go libraries, and
istio/proxy to import these as proto_libraries.

@istio-policy-bot
Copy link

🤔 🐛 You appear to be fixing a bug in Go code, yet your PR doesn't include updates to any test files. Did you forget to add a test?

Courtesy of your friendly test nag.

@istio-testing istio-testing added the do-not-merge/work-in-progress Block merging of a PR because it isn't ready yet. label Sep 30, 2021
@istio-testing
Copy link
Collaborator

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@google-cla google-cla bot added the cla: yes Set by the Google CLA bot to indicate the author of a PR has signed the Google CLA. label Sep 30, 2021
@istio-testing istio-testing added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Sep 30, 2021
@howardjohn
Copy link
Member Author

@kyessenov @yangminzhu any concerns with this?

@kyessenov
Copy link
Contributor

Yeah, I think this is just adding overhead. These are not user visible APIs. This does not help proxy build at all (which is all bazel).

@howardjohn
Copy link
Member Author

Yeah, I think this is just adding overhead. These are not user visible APIs. This does not help proxy build at all (which is all bazel).

I wasn't sure if it was use for proxy build but I think it is for istio/istio. This was mostly inspired by your comment, which I agree with: istio/istio#33583 (comment).

We don't have to change istio/proxy if its just annoying. WDYT?

@kyessenov
Copy link
Contributor

You can manually generate and commit protos to istio/istio with standard toolchain. It's not like they change every month. It's just confusing to require TOC approval for machine protos so this repo is not appropriate.

@howardjohn
Copy link
Member Author

howardjohn commented Sep 30, 2021 via email

@howardjohn
Copy link
Member Author

howardjohn commented Sep 30, 2021 via email

@kyessenov
Copy link
Contributor

As I mentioned earlier, this is just pure overhead IMHO. Yes, it can be done, but the value of tooling in istio/api for Envoy build is close to zero if not negative. Some protos in istio/proxy are not even protos, as they are just documentation for Wasm configs (which is not using protobuf).

@howardjohn
Copy link
Member Author

howardjohn commented Sep 30, 2021

I mentioned above "We don't have to change istio/proxy if its just annoying", so it shouldn't impact istio/proxy developers.

We have to put them somewhere else (can be a copy), since istio/istio importing istio/proxy is probably not a good idea. That leaves us istio/api or istio/istio.

IMO istio/api is a better choice, as we already have half the protos here, already have all the tooling setup to generate protos, and it allows folks to import just the protos without all of istio/istio.

What would you prefer as a way to solve istio/istio#35210?

@yangminzhu
Copy link
Contributor

I like this PR for making it auto generated instead of relying on manually generating the proto code. It's always better to be automatic even if these files does not change often.

The tooling changes seems very small in the PR so I guess there should not be too much overhead of it?

@howardjohn howardjohn marked this pull request as ready for review October 1, 2021 23:21
@istio-testing istio-testing removed the do-not-merge/work-in-progress Block merging of a PR because it isn't ready yet. label Oct 1, 2021
@howardjohn howardjohn added the release-notes-none Indicates a PR that does not require release notes. label Oct 4, 2021
@howardjohn
Copy link
Member Author

Blocked by istio/tools#1718

@howardjohn
Copy link
Member Author

@kyessenov do you have concerns if we do not touch istio/proxy?

Fixes istio/istio#35210.

This does two things:
* Move some protos we have in istio/istio that are manually generating
the go protos, using an outdated protobuf library and outdated proto.
* Move some protos we have in istio/proxy that are not generating any go
protos at all.

A next step will be to have istio/istio import these go libraries, and
istio/proxy to import these as proto_libraries.
@kyessenov
Copy link
Contributor

My vote is not binding, feel free to merge. It can always be reverted if it becomes a hassle.

@howardjohn
Copy link
Member Author

/retest

@douglas-reid
Copy link
Contributor

These configs are definitely not meant to be user-facing, but we've stored similar schema in istio/api before (mixer client config).

Is there a way to annotate them, or highlight the implementation-detail-ish nature of them prominently? Would shoving them into internal/... or similar work?

We definitely need to keep them in sync (either through remote deps in istio/proxy, or some sort of sync job if pushing).

Will we need to update whatever is generating the reference docs for them as well (https://istio.io/latest/docs/reference/config/proxy_extensions/) ?

@howardjohn
Copy link
Member Author

Is there a way to annotate them, or highlight the implementation-detail-ish nature of them prominently? Would shoving them into internal/... or similar work?

Do you think a README in envoy/ is sufficient? There are already protos in envoy/ that are the ~same so I am a bit hesitant to change the folder structure or be inconsistent with those

@douglas-reid
Copy link
Contributor

Do you think a README in envoy/ is sufficient? There are already protos in envoy/ that are the ~same so I am a bit hesitant to change the folder structure or be inconsistent with those

SGTM.

plugins:
- name: go
out: .
opt: paths=source_relative
Copy link
Contributor

Choose a reason for hiding this comment

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

missing newline?

@louiscryan
Copy link
Contributor

I think this makes sense. Can you add the README to this CL to help folks contextualize a bit?

Copy link
Contributor

@louiscryan louiscryan left a comment

Choose a reason for hiding this comment

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

Approved. Please add the suggested README prior to commit

@kyessenov
Copy link
Contributor

@douglas-reid Thanks for reminding me of the horrors of mixerclient protos from here used in proxy bazel (with all the gogo crap).

@howardjohn
Copy link
Member Author

README added

@istio-testing istio-testing merged commit 8e91abc into istio:master Oct 6, 2021
@kyessenov
Copy link
Contributor

These have actually diverged now like I was afraid of, so hopefully there's no user facing repercussions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Set by the Google CLA bot to indicate the author of a PR has signed the Google CLA. release-notes-none Indicates a PR that does not require release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Move MX and stats proto definitions to istio/api
7 participants