-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
testing: update Go to 1.19 #5717
Conversation
balancer/rls/config.go
Outdated
// - within each entry: | ||
// - must have at least one `Name` | ||
// - must not have a `Name` with the `service` field unset or empty | ||
// - within each `headers` entry: | ||
// - must not have `required_match` set | ||
// - must not have `key` unset or empty | ||
// - across all `headers`, `constant_keys` and `extra_keys` fields: | ||
// - must not have the same `key` specified twice | ||
// - no `key` must be the empty string |
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.
Some of these are sub bullet points. How do we handle these with the new formatting?
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.
Missed this. It looks really bad without a marker at the start of the line. I used /
.
// ┌────────┐ | ||
// │priority│ | ||
// └┬──────┬┘ | ||
// │ │ | ||
// | ||
// ┌──────────▼─┐ ┌─▼──────────┐ | ||
// │cluster_impl│ │cluster_impl│ | ||
// └──────┬─────┘ └─────┬──────┘ | ||
// │ │ | ||
// | ||
// │ │ | ||
// |
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.
ASCII art fiasco.
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.
Fixed?
// - For any of the following cases: | ||
// - If balancer is not started (not built), this is either a new child with | ||
// high priority, or a new builder for an existing child. | ||
// - If balancer is Connecting and has non-nil initTimer (meaning it | ||
// transitioned from Ready or Idle to connecting, not from TF, so we | ||
// should give it init-time to connect). | ||
// - If balancer is READY or IDLE | ||
// - If this is the lowest priority | ||
// - If balancer is not started (not built), this is either a new child with | ||
// high priority, or a new builder for an existing child. | ||
// - If balancer is Connecting and has non-nil initTimer (meaning it | ||
// transitioned from Ready or Idle to connecting, not from TF, so we | ||
// should give it init-time to connect). | ||
// - If balancer is READY or IDLE | ||
// - If this is the lowest priority | ||
// - do the following: | ||
// - if this is not the old childInUse, override picker so old picker is no | ||
// longer used. | ||
// - switch to it (because all higher priorities are neither new or Ready) | ||
// - forward the new addresses and config | ||
// - if this is not the old childInUse, override picker so old picker is no | ||
// longer used. | ||
// - switch to it (because all higher priorities are neither new or Ready) | ||
// - forward the new addresses and config |
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.
Same here, sub bullet points need to be handled.
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.
Fixed as a code block
// - A match is better if it’s matching pattern type is better | ||
// - Exact match > suffix match > prefix match > universal match | ||
// - If two matches are of the same pattern type, the longer match is better | ||
// - This is to compare the length of the matching pattern, e.g. “*ABCDE” > | ||
// “*ABC” |
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.
Sub-bullets
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.
Fixed??
balancer/grpclb/grpclb.go
Outdated
// - It's OK to consider IDLE as Connecting. SubConns never stay in IDLE, | ||
// they start to connect immediately. But there's a race between the overall | ||
// state is reported, and when the new SubConn state arrives. And SubConns | ||
// never go back to IDLE. |
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 one was a sub-bullet earlier. Sorry, missed this in the last 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.
Fixed
// - service config update | ||
// - address update | ||
// - subConn state change | ||
// - find the corresponding balancer and forward |
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 sub-bullet
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.
Done
// - sub-pickers are sent to an aggregator provided by the parent, which | ||
// - new/remove SubConn | ||
// - picker update and health states change | ||
// - sub-pickers are sent to an aggregator provided by the parent, which |
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 a sub-bullet
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.
Done
// - the new state is TransientFailure, to update the error message | ||
// - it's possible that this is a noop, but sending an extra update is easier | ||
// than comparing errors | ||
// than comparing errors | ||
// | ||
// - the aggregated state is changed | ||
// - the same picker will be sent again, but this update may trigger a re-pick | ||
// for some RPCs. | ||
// for some RPCs. |
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.
Interesting that gofmt didnt reformat this as single list. Should we just rewrite this comment as:
// UpdateSubConnState updates the per-SubConn state stored in the ring, and also
// the aggregated state.
//
// It triggers an update to cc when:
// - the new state is TransientFailure to update the error message.
// It's possible that this is a noop, but sending an extra update is easier
// than comparing errors
// - the aggregated state has changed. The same picker will be sent again,
// but this update may trigger a re-pick for some RPCs.
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 honestly don't understand this. I changed it to use tabs which is how code blocks get formatted.
balancer/rls/config.go
Outdated
// / routeLookupConfig: | ||
// / grpc_keybuilders field: | ||
// / must have at least one entry | ||
// / must not have two entries with the same `Name` | ||
// / within each entry: | ||
// / must have at least one `Name` | ||
// / must not have a `Name` with the `service` field unset or empty | ||
// / within each `headers` entry: | ||
// / must not have `required_match` set | ||
// / must not have `key` unset or empty | ||
// / across all `headers`, `constant_keys` and `extra_keys` fields: | ||
// / must not have the same `key` specified twice | ||
// / no `key` must be the empty string | ||
// / `lookup_service` field must be set and must parse as a target URI | ||
// / if `max_age` > 5m, it should be set to 5 minutes | ||
// / if `stale_age` > `max_age`, ignore it | ||
// / if `stale_age` is set, then `max_age` must also be set | ||
// / ignore `valid_targets` field | ||
// / `cache_size_bytes` field must have a value greater than 0, and if its | ||
// value is greater than 5M, we cap it at 5M | ||
// | ||
// - routeLookupChannelServiceConfig: | ||
// - if specified, must parse as valid service config | ||
// | ||
// - childPolicy: | ||
// - must find a valid child policy with a valid config | ||
// | ||
// - childPolicyConfigTargetFieldName: | ||
// - must be set and non-empty |
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.
Should we just reformat this as a code block. The /
make the whole thing harder to read. And it does not keep routeLookupConfig
, routeLookupChannelServiceConfig
, childPolicy
and childPolicyConfigTargetFieldName
at the same indent level.
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 is a code block; the slash prevents it from being detected as a list instead. But I found another workaround which I will try here and elsewhere.
balancer/rls/config.go
Outdated
// - `lookup_service` field must be set and must parse as a target URI | ||
// - if `max_age` > 5m, it should be set to 5 minutes | ||
// - if `stale_age` > `max_age`, ignore it | ||
// - if `stale_age` is set, then `max_age` must also be set | ||
// - ignore `valid_targets` field | ||
// - `cache_size_bytes` field must have a value greater than 0, and if its | ||
// value is greater than 5M, we cap it at 5M |
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.
Sorry, these should be sub-bullets inside of routeLookupConfig
. They are fields in the route lookup config. This should be the last one.
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.
Whoops; my mistake. Fixed
RELEASE NOTES: none