-
Notifications
You must be signed in to change notification settings - Fork 24
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
Client server updates are attempted in full #422
Conversation
✅ All required contributors have signed the F5 CLA for this PR. Thank you! |
I have hereby read the F5 CLA and agree to its terms |
…t to update all servers and return a combined error Previously these methods would return as soon as an error was encountered. Now they attempt to apply all the server updates and collect all errors encountered along the way. The reasoning behind this is that we want to apply as many of the desired changes as we possibly can and don't want any transitory errors that may affect a single server update to cause all the rest of the updates to be skipped.
This looks pretty good to me. |
Hey @arussellf5, do all tests pass when you run LGTM |
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.
🚀
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.
The one downside I could see with this is that if there's some error connecting to the API, and you're trying to update 1000 upstreams, you're going to get a massive error message.
@sjberman I agree that this situation sucks. But consider another scenario where there is a single malformed upstream server in the update list. The current behavior might prevent all other 999 servers from getting updated, because of a problem updating a single server. I think that this change will be worth it to address that scenario, even if there are some downsides. |
@arussellf5 That's fair. |
Proposed changes
Client's UpdateHTTPServers and UpdateStreamServers methods now attempt to update all servers and return a combined error
Previously these methods would return as soon as an error was encountered. Now they attempt to apply all the server updates and collect all errors encountered along the way. The reasoning behind this is that we want to apply as many of the desired changes as we possibly can and don't want any transitory errors that may affect a single server update to cause all the rest of the updates to be skipped.
Use case:
I work for the NGINXaaS for Azure team and we using the plus client to apply on-the-fly upstream server updates to deployments linked with kubernetes clusters. Our aim is to react to scaling and other events on the cluster by applying the server updates to the customer's dynamic upstreams. We want to apply as many of the server updates as we can through a single call to
UpdateHTTPServers()
orUpdateStreamServers()
.Checklist
Before creating a PR, run through this checklist and mark each as complete.