-
Notifications
You must be signed in to change notification settings - Fork 180
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
ProxyStrategies: code cleanup and improve test coverage. #604
Conversation
jkh52
commented
Apr 2, 2024
- Validate the "no strategies" case (such a server would be non-functional).
- Improves pkg/server/backend_manager.go code coverage from 72.6% to 86.3%.
Test flake:
|
/retest |
1 similar comment
/retest |
3ad8ed5
to
64edc83
Compare
The linter is failing despite my attempt to fix it (see second commit here). Note that this PR uses go1.21 feature 'slices.Contains', I think that's the trigger. @tallclair or @liangyuanpeng - EDIT: I side-stepped this and moved the lint update to #605 |
ad0e7b9
to
c328988
Compare
Test flake for "e2e / e2e (dual, v1.28.7)":
/retest |
Lint error:
|
pkg/server/backend_manager.go
Outdated
case ProxyStrategyDefaultRoute: | ||
return "defaultRoute" | ||
} | ||
panic("unhandled ProxyStrategy 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.
If we're going to panic we need to have a very clear error/log message first. Some clue about what ps is set to is pretty essential.
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.
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cheftako, jkh52 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |