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

build: evaluate using protolock in API build #3368

Closed
mattklein123 opened this issue May 13, 2018 · 13 comments
Closed

build: evaluate using protolock in API build #3368

mattklein123 opened this issue May 13, 2018 · 13 comments
Labels
api/v3 Major version release @ end of Q3 2019 area/build

Comments

@mattklein123
Copy link
Member

See https://github.com/nilslice/protolock. Should be able to help us codify avoiding accidental breaking changes. The one thing that comes to mind is we are likely going to need some type of mixed mode where certain messages are locked and others are not locked while they are draft. Not sure if that is supported but probably pretty easy to do via some type of comment annotation.

cc @nilslice @rodaine @twoism @htuch

@nilslice
Copy link

@mattklein123 are your messages/services ever in draft mode on the master branch? If only in another branch as drafts, the proto.lock file would be checked in and compared against at its (git) committed state.

@mattklein123
Copy link
Member Author

@nilslice we do have draft stuff committed to master. The way we do this currently is to use comment annotations: https://github.com/envoyproxy/envoy/blob/master/tools/protodoc/protodoc.py#L51

I'm wondering if potentially we could do something similar with protolock such that given annotations on a message we could set lock status for that message and submessages? That would allow us to lock non-draft protos but allow other ones to float that are draft/alpha status.

@nilslice
Copy link

@mattklein123 if you aren't opposed to dressing up a draft message with a more general annotation, i.e. // @protolock:skip then I'm pretty confident we can make it happen natively in the protolock comparison step.

The behavior there would be that an @protolock:skip annotated message would not be included as an entry to the definitions kept in a proto.lock file. Alternatively, the entry could be included in the lock file for the message, but it has an additional field to indicate that the comparison should skip this message.

@mattklein123
Copy link
Member Author

@nilslice yup that sounds perfect.

@nilslice
Copy link

support for skipping messages and services via comment annotation in: nilslice/protolock#15

@nilslice
Copy link

Just updating the thread -- protolock finally has sufficiently complete support for oneof and map types, with enum coming soon. I've browsed this repo for integration points but am too unfamiliar with bazel and the build process. If anyone could point me in the right direction, I'd be happy to PR something when the enum support is ready for action.

@nilslice
Copy link

protolock now has full support for Enum, Map, and Oneof types within each pertinent rule func. I would be happy to implement the check before builds once I figure out where in Envoy this should occur. cc/ @mattklein123 @rodaine @twoism @htuch any pointers would be much appreciated.

@htuch
Copy link
Member

htuch commented Jun 21, 2018

@nilslice we basically want to apply this over all protos in https://github.com/envoyproxy/envoy/tree/master/api. We would want to ignore any in directories containing v2alpha, and a blacklist of some experimental protos. I think we should run this just before/after https://github.com/envoyproxy/envoy/blob/master/ci/do_ci.sh#L137, i.e. as one of the CI API tests.

@nilslice
Copy link

@htuch - excellent, thank you for the direction. I'll get a branch up and may ask for further assistance once I take an initial swing.

@mattklein123 mattklein123 added this to the 1.11.0 milestone May 2, 2019
@mattklein123 mattklein123 modified the milestones: 1.11.0, 1.12.0 Jul 3, 2019
@htuch htuch added the api/v3 Major version release @ end of Q3 2019 label Sep 23, 2019
@htuch
Copy link
Member

htuch commented Sep 26, 2019

Moving this to post 1.12.0, since this is in the nice-to-have but not needed bucket.

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or "no stalebot" or other activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale stalebot believes this issue/PR has not been touched recently label Jul 22, 2021
@github-actions
Copy link

This issue has been automatically closed because it has not had activity in the last 37 days. If this issue is still valid, please ping a maintainer and ask them to label it as "help wanted" or "no stalebot". Thank you for your contributions.

@htuch htuch reopened this Jul 30, 2021
@htuch
Copy link
Member

htuch commented Jul 30, 2021

@YaseenAlk is working on this.

@htuch htuch removed the stale stalebot believes this issue/PR has not been touched recently label Jul 30, 2021
@htuch htuch closed this as completed in f30c289 Aug 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api/v3 Major version release @ end of Q3 2019 area/build
Projects
None yet
Development

No branches or pull requests

4 participants