-
Notifications
You must be signed in to change notification settings - Fork 95
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
Refactor ClusterMap #785
Refactor ClusterMap #785
Conversation
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size. |
af7ec10
to
fb10779
Compare
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size. |
fb10779
to
380f3f0
Compare
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size. |
380f3f0
to
cf5acd4
Compare
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size. |
Lemme know if you want me to take a look, but also reminding you that we have: Lines 418 to 425 in d8e93b6
In case you want to try debugging in here. |
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size. |
1 similar comment
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size. |
I added it but it doesn't seem to be working? 🤔 |
agones/src/xds.rs
Outdated
@@ -57,6 +57,7 @@ mod tests { | |||
/// for this test, we should only have single Agones integration test in this suite, since they | |||
/// could easily collide with each other. | |||
async fn agones_token_router() { | |||
quilkin::test_utils::enable_log("agones=debug"); |
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.
Depending on what aspect you want to debug, you will nee to also include a call to debug_pods(client: &Client, labels: String)
to actually get logs and events about those pods.
For example, debug_pods(client, "role=proxy")
will output debug information about the proxy instances. You can see the labels they have here:
Line 374 in c0d5ca5
let labels = BTreeMap::from([("role".to_string(), "proxy".to_string())]); |
(This would be good to add to the doc on debug_pods)
Lines 418 to 425 in d8e93b6
// Output the events and logs for each pod that matches this label selector. | |
// Useful for determining why something is failing in CI without having to run a cluster. | |
// Requires quilkin::test_utils::enable_log("agones=debug"); to enable debug logging within | |
// the test | |
pub async fn debug_pods(client: &Client, labels: String) { | |
debug!(labels, "🪓 Debug output for Selector"); | |
let pods: Api<Pod> = client.namespaced_api(); | |
let events: Api<Event> = client.namespaced_api(); |
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.
Also looking at the build log, it's not failing because something failed to come up (as far as I can tell anyway), it's failing here:
Line 201 in c0d5ca5
assert!(failed, "Packet should have failed"); |
So the existing debug_pod
statements aren't going to help in this moment - they have to be conditionally put in.
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size. |
agones/src/xds.rs
Outdated
@@ -181,7 +182,7 @@ filters: | |||
.as_mut() | |||
.map(|annotations| annotations.remove(token_key).unwrap()); | |||
gameservers.replace(name.as_str(), &pp, &gs).await.unwrap(); | |||
|
|||
debug_pods(client, "role=proxy"); |
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.
My suggestion might be to change line 201 from
assert!(failed, "Packet should have failed");
to something like:
if failed {
// proxies
debug_pods(client, "role=proxy");
// xds server
debug_pods(client, "role=xds");
panic!("Packet should have failed");
}
Then the condition can always stay in the test in case of future debugging requirements.
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.
SGTM
6a156e1
to
935558d
Compare
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size. |
1 similar comment
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size. |
Ah, Lines 412 to 424 in de49889
|
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size. |
6 similar comments
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size. |
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size. |
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size. |
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size. |
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size. |
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size. |
1f4d587
to
c2400bb
Compare
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size. |
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size. |
Build Succeeded 🥳 Build Id: a2976a9a-4d56-4064-9187-c4149131653b The following development images have been built, and will exist for the next 30 days: To build this version:
|
This PR refactors our internal storage of transmission of clusters over xDS to be more focused on endpoints rather than mimicking Envoys layout. We weren't using basically any of it, and having all of those extra fields was creating a lot of extra bytes and made the encoding logic more complicated.
This PR moves to using a simpler map of locality -> endpoints, as that was the only part we were using, and uses our own proto types for xDS discovery. We still use the core discovery request and response wrapper, it's just the types inside are now Quilkin types rather than envoy types.
We don't have a xDS benchmark, but I wrote a small micro benchmark of just the time and size of discovery responses, and there's a significant improvement to using this implementation, being roughly 30%-250% faster depending on the endpoint amounts (being faster for smaller amounts of endpoints where the message size overhead is more noticeable), and being 12% smaller.
Old
New
Diff