Skip to content

xds-k8s: Fix incorrect type hint in the baseline test #29577

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

Merged
merged 1 commit into from
May 4, 2022

Conversation

sergiitk
Copy link
Member

@sergiitk sergiitk commented May 4, 2022

Minor fix: noticed test_servers should've been a List[_XdsTestServer], but instead of fixing the type I renamed the variable from test_servers to test_server instead, and grabbed the first element.

@sergiitk sergiitk added the release notes: no Indicates if PR should not be in release notes label May 4, 2022
@sergiitk sergiitk enabled auto-merge (squash) May 4, 2022 21:15
@sergiitk
Copy link
Member Author

sergiitk commented May 4, 2022

Did a manual test run of this single test, all passed.

Copy link
Contributor

@lidizheng lidizheng left a comment

Choose a reason for hiding this comment

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

Good catch!

@sergiitk sergiitk merged commit f36e84f into grpc:master May 4, 2022
with self.subTest('7_start_test_client'):
test_client = self.startTestClient(test_servers[0])
test_client: _XdsTestClient = self.startTestClient(test_server)
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's lift the declaration two lines up? Variable "test_client" is expected to be used later in other sub tests.

Copy link
Member Author

@sergiitk sergiitk May 4, 2022

Choose a reason for hiding this comment

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

IRRC with doesn't create separate variable scope (that's python's quirk) - so declarations inside with are equivalent to the declarations outside.

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

No strong opinion here. Asking this because #29476 (comment).

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh - that comment was referring to breaking it for readability - otherwise the line break made it less readable.

Copy link
Contributor

Choose a reason for hiding this comment

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

Then I completely misunderstood that 🤦 I thought it's about variable type annotation.

@sergiitk sergiitk deleted the xds-k8s-baseline-minor-fix branch May 4, 2022 23:01
@copybara-service copybara-service bot added the imported Specifies if the PR has been imported to the internal repository label May 5, 2022
lidizheng pushed a commit to lidizheng/grpc that referenced this pull request May 24, 2022
ctiller added a commit that referenced this pull request May 27, 2022
sergiitk added a commit to sergiitk/grpc that referenced this pull request Dec 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
imported Specifies if the PR has been imported to the internal repository release notes: no Indicates if PR should not be in release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants