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

config: upgrade envoy.ip_tagging to v3alpha. #9150

Merged
merged 4 commits into from
Nov 27, 2019

Conversation

htuch
Copy link
Member

@htuch htuch commented Nov 26, 2019

This is a manual pilot of the v3 API type upgade inside of Envoy. The IP
tagging filter was picked as its API dependencies are relatively
confined in scope, allowing a self-contained PoC to be written.

This will be followed by automated upgrade via the API type database for
the bulk of Envoy's internals.

Part of #8082

Risk level: Low
Testing: Additional unit and integration tests added
(version_integration_test).

Signed-off-by: Harvey Tuch [email protected]

This is a manual pilot of the v3 API type upgade inside of Envoy. The IP
tagging filter was picked as its API dependencies are relatively
confined in scope, allowing a self-contained PoC to be written.

This will be followed by automated upgrade via the API type database for
the bulk of Envoy's internals.

Part of envoyproxy#8082

Risk level: Low
Testing: Additional unit and integration tests added
  (version_integration_test).

Signed-off-by: Harvey Tuch <[email protected]>
@htuch
Copy link
Member Author

htuch commented Nov 26, 2019

@lizan @mattklein123 this should act as a litmus test for how the automated updates are going to look.

source/common/protobuf/utility.cc Outdated Show resolved Hide resolved
source/common/config/utility.h Outdated Show resolved Hide resolved
Copy link
Member

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

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

At a high level looks reasonable to me. A few questions. Excited to see the progress on this.

source/common/config/BUILD Show resolved Hide resolved
@@ -1,7 +1,8 @@
#pragma once

#include "envoy/config/filter/http/ip_tagging/v2/ip_tagging.pb.h"
#include "envoy/config/filter/http/ip_tagging/v2/ip_tagging.pb.validate.h"
#include "envoy/config/filter/http/ip_tagging/v2/ip_tagging.pb.h" // For proto descriptors only
Copy link
Member

Choose a reason for hiding this comment

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

Will we potentially run into linking dropping needed descriptors like has happened previously when we move to a fully automated/reflection version? Especially in library situations like Envoy Mobile? It would be nice to make sure we avoid this at a system level somehow and don't run into confusing runtime problems? (This is orthogonal to the other discussion about being able to completely disable conversion via compile time option potentially)

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, I want to take this on as a separate PR. Let's say we don't have the API type DB, and we embed annotations inside the v3 APIs to record some of the history. Do we want to be able to avoid including v2 for Envoy Mobile still? I.e. save the space of the proto descriptors.

Copy link
Member

Choose a reason for hiding this comment

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

I think that's fine in that case, but I still worry about dropping descriptors that we need in confusing ways, but I think we can figure that out later.

Copy link
Member Author

Choose a reason for hiding this comment

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

I think we might need to generate some dummy file to reference all of these. As we encounter this during the conversion work, I will add something to do this. Basically, I envisage a tool that is part of fix_format that uses the API type DB (which will be available at format time) that figures out the entire set of API build targets and headers, that generates some C++ file with lots of void casted references to things in these targets. Or we can try and solve the problem of the lost proto descriptors. Either way.

Signed-off-by: Harvey Tuch <[email protected]>
#include "common/config/api_type_db.h"

// For proto descriptors only
#include "envoy/config/filter/http/ip_tagging/v2/ip_tagging.pb.h"
Copy link
Member

Choose a reason for hiding this comment

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

interesting, including header files will include descriptors? only linking isn't enough?

Copy link
Member Author

Choose a reason for hiding this comment

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

This is due to how we are auto-generating the BUILD file deps for APIs based on headers. I will address in the next PR which is dealing with the general solution to type upgrade information.

Copy link
Member Author

Choose a reason for hiding this comment

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

Also, for some proto descriptors, I think those with only service definitions, there are some C++ link issues. This largely shouldn't be an issue for us during API ingestion.

@htuch htuch merged commit 81d3beb into envoyproxy:master Nov 27, 2019
@htuch htuch deleted the ip-tagging-v3-alpha branch November 27, 2019 22:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants