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

feat/autogenerate-proto-imports #122

Merged
merged 9 commits into from
Oct 26, 2021
Merged

Conversation

roivaz
Copy link
Member

@roivaz roivaz commented Oct 26, 2021

Context: There is a list of imports in pkg/envoy/serializer/v3/serializer.go that is required so the serialization/deserialization code is able to handle proto messages of the Any type. This is a dynamic list of imports as the files containing protobuffer definitions in go-control-plane can change from version to version. So far this list of imports was manually maintained, which is problematic as the list could end up being out of date.

This PR automates the process of generating the list of imports:

  • The list is now maintained in a separate package pkg/envoy/protos/v3 that can be imported from other packages.
  • A generator has been written that performs the following tasks:
    • Inspects the project's go.mod to determine the go-control-plane release in use.
    • Clones the specific tag of the go-control-plane repository into memory and looks for the .pb.go files that belong to the v3 api version (though the generator is already able to look for other api versions).
    • Generates the file with all the imports within the pkg/envoy/protos/v3 package.
  • go generate is used to trigger the execution of the code generator from the Makefile when the binary is built.

Currently the list of imports is out of date in marin3r-v0.9.0 so a new patch release will be required after this PR as some proto message definitions are missing, resulting in an error if a user tries to use them.

/kind feature
/kind bug
/priority important-soon
/assign

@3scale-robot 3scale-robot added kind/feature Categorizes issue or PR as related to a new feature. kind/bug Categorizes issue or PR as related to a bug. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next sprint. needs-size Indicates a PR or issue lacks a `size/foo` label and requires one. labels Oct 26, 2021
@3scale-robot 3scale-robot added size/L Requires few days to complete the PR or the issue. and removed needs-size Indicates a PR or issue lacks a `size/foo` label and requires one. labels Oct 26, 2021
@slopezz
Copy link
Member

slopezz commented Oct 26, 2021

/lgtm

@3scale-robot 3scale-robot added the lgtm Indicates that a PR is ready to be merged. label Oct 26, 2021
@3scale-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: cd463602ebf07342dbfa1334dc2db0cd7f280a8c

@3scale-robot 3scale-robot removed the lgtm Indicates that a PR is ready to be merged. label Oct 26, 2021
@3scale-robot 3scale-robot added the lgtm Indicates that a PR is ready to be merged. label Oct 26, 2021
@3scale-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 04ca43bf538e137b629c1333b4ff369697fa6426

@3scale-robot 3scale-robot removed the lgtm Indicates that a PR is ready to be merged. label Oct 26, 2021
@3scale-robot 3scale-robot added the lgtm Indicates that a PR is ready to be merged. label Oct 26, 2021
@3scale-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 3bfd53428a237c09ea1424f0c8810d5c938137b4

@roivaz
Copy link
Member Author

roivaz commented Oct 26, 2021

/ok-to-test

@3scale-robot 3scale-robot added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label Oct 26, 2021
@3scale-robot
Copy link
Contributor

New changes are detected. LGTM label has been removed.

@3scale-robot 3scale-robot removed the lgtm Indicates that a PR is ready to be merged. label Oct 26, 2021
@roivaz
Copy link
Member Author

roivaz commented Oct 26, 2021

/remove-label ok-to-test

@3scale-robot
Copy link
Contributor

@roivaz: The label(s) /remove-label ok-to-test cannot be applied. These labels are supported: size/xs, size/s, size/m, size/l, size/xl, size/xxl, env/legacy, env/common, env/dev-eng, env/stg-saas, env/pro-base, env/pro-saas

In response to this:

/remove-label ok-to-test

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@roivaz roivaz removed the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label Oct 26, 2021
@roivaz
Copy link
Member Author

roivaz commented Oct 26, 2021

/ok-to-test

@3scale-robot 3scale-robot added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label Oct 26, 2021
@roivaz roivaz added the lgtm Indicates that a PR is ready to be merged. label Oct 26, 2021
@roivaz
Copy link
Member Author

roivaz commented Oct 26, 2021

/approve

@3scale-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: roivaz

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@3scale-robot 3scale-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 26, 2021
@3scale-robot 3scale-robot merged commit 37bf1ef into main Oct 26, 2021
@3scale-robot 3scale-robot deleted the feat/autogenerate-proto-imports branch October 26, 2021 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/bug Categorizes issue or PR as related to a bug. kind/feature Categorizes issue or PR as related to a new feature. lgtm Indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next sprint. size/L Requires few days to complete the PR or the issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants