-
Notifications
You must be signed in to change notification settings - Fork 601
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
Fix: intra.broker.goals cannot be configured as default.goals #2221
base: main
Are you sure you want to change the base?
Conversation
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.
@mhratson would you please review this?
@CCisGG would you review this please if you have some time? |
? |
Hi @imans777, |
// Ensure that default goals are supported inter-broker goals. | ||
if (defaultGoalNames.stream().anyMatch(g -> !interBrokerGoalNames.contains(g))) { | ||
// Ensure that default goals are supported inter-broker or intra-broker goals. | ||
if (defaultGoalNames.stream().anyMatch(g -> !interBrokerGoalNames.contains(g) && !intraBrokerGoalNames.contains(g))) { | ||
throw new ConfigException(String.format("Attempt to configure default goals with unsupported goals (%s:%s and %s:%s).", | ||
AnalyzerConfig.DEFAULT_GOALS_CONFIG, defaultGoalNames, | ||
AnalyzerConfig.GOALS_CONFIG, interBrokerGoalNames)); |
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 like you also need to update the exception logs to make it more clear.
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.
You are right, I have fixed it!
To me, allowing intra broker goals to be added into default goals is a valid intention. I'm just trying to make sure this won't break users who don't use intra broker goals. From the code change, looks like it won't. |
@CCisGG thanks for your feedback. But now it is not possible, just with the mentioned workaround. |
Hey there, I just wanted to pop up this change to be reviewed and merged sooner :) |
Ahh, got it, THX! |
Thank you for the approval @CCisGG! Do you have write access to merge this PR? |
Summary
default.goals
Expected Behavior
I can add (enable) goals to the
default.goals
list from both the intra and inter broker goalsActual Behavior
Sanity checks ensure the following rules:
goals
and theintra.broker.goals
at the same time)default.goals
should be a subset ofgoals
(As a result of this, we could not add intra broker goal to thedefault.goals
)intra.broker.goals
cant be empty (you could not move all the intra broker roles to the goals)We could not add intra goal to the
default.goals
without a trick (see in the workaround section)Steps to Reproduce
Try to enable an intra broker goal by adding it to the
default. goals
Known Workarounds
You can remove 1 intra broker goal from the
intra.broker.goals
config and add that to thegoals
(keep in mind that the other one should be in theintra.broker.goals
as the list cant be empty) this way you can add that 1 goal to thedefault.goals
and enable itNote that this way we still cant enable both of the currently available intra broker goals as 1 have to be in the intra.broker.goals list to avoid hitting the mentioned sanity check. So only 1 intra goal at a time.
Categorization