-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
[Serve] warn when serve.start() with different options #21562
Conversation
All failed client tests were successful locally (macOS Monterey 12.1). |
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.
Great work! Left few comments for cleaner error messages
different_fields = [] | ||
all_http_option_fields = new_http_options.__dict__ | ||
for field in all_http_option_fields: | ||
if getattr(new_http_options, field) != getattr( |
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.
Since we don't know what middlewares are used, we do a shallow check for each item in the list assuming that the ordering cannot be changed.
Hi @simon-mo, thank you for your review! I updated this PR. (I will make another PR to add the update approach.) Please let me know your feedback and comments when you have time to review it again. Thanks! (Failed mac tests were successful locally. Other tests were successful in the previous commit.) |
Hi @simon-mo, just want to follow up 😄 Do you have any comments and suggestions on the latest commit? |
Sorry if I should have point this out easier. Would you mind add a test in test_standalone? |
@simon-mo Thanks for your suggestion! Will add a test soon 😄 |
Hi @simon-mo, I just added a warning test. Please let me know if I missed anything when you have time to take a look. Thanks a lot! (Tests passed locally.) |
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.
Looks great! Thank you
@simon-mo Thank you for your review! |
If you can merge master and push again that would be great! There was recently a dependency outage and master branch fixed it |
Hi @simon-mo, I merged the master branch. It seems the builder were okay. But some tests get stuck and have been running for hours. Could you take a look? Or I can simply make an empty commit and re-trigger the check. Thanks! |
ah that's because our mac builds were lagging. since windows and linux both passed, i went ahead and merged the PR. |
Thank you for the check! I will go ahead and work on the update implementation. Thanks again for your review! |
Why are these changes needed?
This PR implements a short-term simple solution to #19868.
Related issue number
(partially) Closes #19868.
Checks
scripts/format.sh
to lint the changes in this PR.(Will add tests later once the implementation plan is finalized.)