-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Fix unused proto import warnings in api #13401
Conversation
CC @envoyproxy/api-shepherds: Your approval is needed for changes made to |
To fix the CI failure you need to generate the API shadow with |
great @cheister i started to do this, but didnt get very far. (see #13284) ill close my PR in favour of yours it might be a bit more complex than it first seems, i hit some errors removing some of the imports, but i might just have been a bit sloppy about how i did it. It will be good to see if tests pass |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great. Please follow the advice in the comments to fix format. Also, I think it would be great having a CI check to ensure that we don't regress after these improvements. Would you be able to add this or maybe just file an issue if you don't have cycles? Thanks.
/wait
d9f7ba2
to
7935e21
Compare
Thanks, I didn't know about |
A CI check would be nice. The easiest thing would be protocolbuffers/protobuf#3980 if it was done. I probably won't have any time soon to write something for CI. |
7935e21
to
9d2a198
Compare
I can't tell if this error is related to this PR or not?
|
i hit similar problems - ie errors that were hard to track - so i started removing the lines one by one - which was why it was taking so long |
This pull request has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in 7 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions! |
@cheister anything we can do to unblock? |
So I started looking at this again and now I'm getting an error when I try to run
on the latest main branch. It fails when it runs
and gives the error
I'm not sure why |
9d2a198
to
b5229bb
Compare
b5229bb
to
02caf59
Compare
Sorry no idea about the build error. cc @htuch @adisuissa @lizan /wait |
@cheister this works fine for me on latest main. I'm not sure if there is some strange artifact of being on Mac OS for you or the local environment. Does The other thing you might want to try is ensuring you are starting with a clean build cache, |
02caf59
to
9e5efed
Compare
bb6f218
to
1ae5185
Compare
Signed-off-by: Chris Heisterkamp <[email protected]>
1ae5185
to
18c522e
Compare
@htuch Do you mind taking a look at the test failure?
I don't know how to access the test log from CI. Is there a link I'm missing?
but passes if I add |
Not sure, I kicked the job again, could be a flake. I don't think I can help much with Mac OS specific link issues, best to work through the existing issue. |
@@ -37,8 +37,23 @@ def AdjustReservedRange(target_proto, previous_reserved_range, skip_reserved_num | |||
target_proto.reserved_range.add().MergeFrom(rr) | |||
|
|||
|
|||
# Add dependencies for envoy.annotations.disallowed_by_default | |||
def AddDeprecationDependencies(target_proto_dependencies, proto_field, is_enum): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this part of this PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This part is needed when the shadow proto brings a deprecated field that uses envoy.annotations.disallowed_by_default
and the original proto does include the import for envoy/annotations/deprecation.proto
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense. What about the struct.proto
below?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
struct.proto
was needed when the merge shadow added something like
map<string, google.protobuf.Struct> hidden_envoy_deprecated_per_filter_config = 12
[deprecated = true];
e.g. from api/envoy/config/route/v3/route_components.proto
to generated_api_shadow/envoy/config/route/v3/route_components.proto
and struct was not already in the imports.
Looks like on the rerun that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks! I kicked the tests, I think this failure is unrelated.
@@ -37,8 +37,23 @@ def AdjustReservedRange(target_proto, previous_reserved_range, skip_reserved_num | |||
target_proto.reserved_range.add().MergeFrom(rr) | |||
|
|||
|
|||
# Add dependencies for envoy.annotations.disallowed_by_default | |||
def AddDeprecationDependencies(target_proto_dependencies, proto_field, is_enum): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense. What about the struct.proto
below?
/lgtm v2-freeze |
For an explanation of how to fill out the fields, please see the relevant section
in PULL_REQUESTS.md
Commit Message: api: fix unused proto import warnings
Additional Description: Fixing "warning: Import ... but not used" warnings from protoc
Risk Level: Low
Testing: manually built protos
Docs Changes: None
Release Notes: None