-
Notifications
You must be signed in to change notification settings - Fork 33
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
Migrate all v2 resources to v3. #177
Conversation
@@ -519,8 +521,13 @@ protected static void assertThatWatchReceivesSnapshot(WatchAndTracker watchAndTr | |||
|
|||
assertThat(response).isNotNull(); | |||
assertThat(response.version()).isEqualTo(snapshot.version(watchAndTracker.watch.request().getTypeUrl())); | |||
assertThat(response.resources().toArray(new Message[0])) | |||
.containsExactlyElementsOf(snapshot.resources(watchAndTracker.watch.request().getTypeUrl()).values()); | |||
Message[] responseValues = response.resources().toArray(new Message[0]); |
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.
I do not know why but the containsExactlyElementsOf
stopped working :/ even though the values underneath are the same. I converted this to an equivalent assertion but please pay attention here.
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.
I think debugging using a breakpoint, line by line, will tell us where where the problem is.
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.
Maybe the lack of toArray
for snapshot.resources is the problem?
@@ -45,13 +45,13 @@ fun RouteAction.hasCustomRequestTimeout(requestTimeout: Duration): RouteAction { | |||
return this | |||
} | |||
|
|||
fun RouteAction.autoHostRewriteHeaderIsEmpty(): RouteAction { | |||
assertThat(this.autoHostRewriteHeader).isEmpty() | |||
fun RouteAction.hostRewriteHeaderIsEmpty(): RouteAction { |
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 was renamed with backwards compatiblity: https://github.com/envoyproxy/envoy/blob/d321ede4d262cc2259064337be7b407e463ede24/generated_api_shadow/envoy/api/v2/route/route_components.proto#L869-L872
@@ -95,7 +95,7 @@ class SnapshotDebugController(controlPlane: ControlPlane) { | |||
.add(Struct.getDescriptor()) | |||
.add(Value.getDescriptor()) | |||
.add(RBAC.getDescriptor()) | |||
.add(FilterRBAC.getDescriptor()) | |||
.add(RBACFilter.getDescriptor()) |
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.
Renamed for consistency in RBAC filter factory.
@@ -21,22 +21,6 @@ class EnvoyCurrentVersionHttpsDependencyTest : EnvoyHttpsDependencyTest() { | |||
} | |||
} | |||
|
|||
// TODO(https://github.com/allegro/envoy-control/issues/97) - remove when envoy < 1.14.0-dev will be not supported |
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.
We no longer have any Envoy-s with this version on production.
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.
There is also a code that needs to be removed in EnvoyClustersFactory.kt
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.
You can also add "Fixes #97" to the description
756cb90
to
430508c
Compare
Looks like this PR got quite outdated. How about we close this one and get back to it with a fresh one when we're ready? |
Fixes #97