feat: adding weighted random host selection strategy#907
Merged
Conversation
52a2d2f to
78be473
Compare
karenc-bq
reviewed
Jun 19, 2025
karenc-bq
reviewed
Jun 19, 2025
karenc-bq
reviewed
Jun 19, 2025
karenc-bq
reviewed
Jun 19, 2025
karenc-bq
reviewed
Jun 19, 2025
karenc-bq
reviewed
Jun 19, 2025
78be473 to
41fda0a
Compare
karenc-bq
reviewed
Jun 19, 2025
karenc-bq
reviewed
Jun 19, 2025
karenc-bq
reviewed
Jun 19, 2025
karenc-bq
reviewed
Jun 19, 2025
2b20e9a to
bcbc617
Compare
karenc-bq
reviewed
Jul 2, 2025
karenc-bq
reviewed
Jul 2, 2025
karenc-bq
approved these changes
Jul 2, 2025
5284e12 to
68180ea
Compare
68180ea to
7e4f6d4
Compare
karenc-bq
reviewed
Jul 3, 2025
Comment on lines
+211
to
+213
| message = "HostSelector.NoHostsMatchingRole" | ||
| logger.error(message, role) | ||
| raise AwsWrapperError(Messages.get_formatted("HostSelector.NoHostsMatchingRole", role)) |
Contributor
There was a problem hiding this comment.
Suggested change
| message = "HostSelector.NoHostsMatchingRole" | |
| logger.error(message, role) | |
| raise AwsWrapperError(Messages.get_formatted("HostSelector.NoHostsMatchingRole", role)) | |
| message = Messages.get_formatted("HostSelector.NoHostsMatchingRole", role) | |
| logger.error(message, role) | |
| raise AwsWrapperError(message) |
Contributor
Author
There was a problem hiding this comment.
logger.error already gets the message formatted:
def error(self, msg, *args, **kwargs):
if not self.logger.isEnabledFor(logging.ERROR):
return
if args is not None and len(args) > 0:
self.logger.error(Messages.get_formatted(msg, *args), **kwargs)
else:
try:
self.logger.error(Messages.get(msg), **kwargs)
except NotInResourceBundleError:
self.logger.error(msg, **kwargs)
karenc-bq
reviewed
Jul 3, 2025
Comment on lines
+246
to
+247
| logger.error(message, pair) | ||
| raise AwsWrapperError(Messages.get_formatted(message, pair)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adding weighed random selection for host selection in order to prepare for future features.
User is able to add weights to different hosts to modify the likeliness of the particular host to be selected.
Manually tested for verification.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.