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

testing: update Go to 1.19 #5717

Merged
merged 7 commits into from
Oct 17, 2022
Merged

testing: update Go to 1.19 #5717

merged 7 commits into from
Oct 17, 2022

Conversation

dfawley
Copy link
Member

@dfawley dfawley commented Oct 12, 2022

RELEASE NOTES: none

@dfawley dfawley added this to the 1.51 Release milestone Oct 12, 2022
@dfawley dfawley requested review from easwars and zasweq October 12, 2022 16:57
easwars
easwars previously approved these changes Oct 12, 2022
Comment on lines 121 to 129
// - 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
Copy link
Contributor

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?

Copy link
Member Author

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 /.

security/authorization/engine/engine.go Show resolved Hide resolved
status/status.go Show resolved Hide resolved
Comment on lines 94 to 104
// ┌────────┐
// │priority│
// └┬──────┬┘
// │ │
//
// ┌──────────▼─┐ ┌─▼──────────┐
// │cluster_impl│ │cluster_impl│
// └──────┬─────┘ └─────┬──────┘
// │ │
//
// │ │
//
Copy link
Contributor

Choose a reason for hiding this comment

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

ASCII art fiasco.

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed?

Comment on lines 55 to 67
// - 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
Copy link
Contributor

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.

Copy link
Member Author

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

Comment on lines 218 to 222
// - 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”
Copy link
Contributor

Choose a reason for hiding this comment

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

Sub-bullets

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed??

Comment on lines 298 to 301
// - 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.
Copy link
Contributor

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.

Copy link
Member Author

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
Copy link
Contributor

Choose a reason for hiding this comment

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

This was sub-bullet

Copy link
Member Author

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
Copy link
Contributor

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

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

Comment on lines 328 to 334
// - 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.
Copy link
Contributor

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.

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 honestly don't understand this. I changed it to use tabs which is how code blocks get formatted.

Comment on lines 118 to 146
// / 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
Copy link
Contributor

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.

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 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.

@easwars easwars assigned dfawley and unassigned easwars Oct 12, 2022
Comment on lines 130 to 136
// - `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
Copy link
Contributor

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.

Copy link
Member Author

Choose a reason for hiding this comment

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

Whoops; my mistake. Fixed

@easwars easwars assigned dfawley and unassigned dfawley and zasweq Oct 13, 2022
@dfawley dfawley merged commit 778860e into grpc:master Oct 17, 2022
@dfawley dfawley deleted the go119 branch October 17, 2022 22:04
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants