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
[ST] Add NodePools to all of the test-cases, create NodePoolsConverter, add possibility to specify NP roles for all STs #9668
Conversation
/packit test --labels regression |
/packit test --labels upgrade |
/azp run regression |
Pull request contains merge conflicts. |
d6aefb5
to
6670ea1
Compare
/azp run regression |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run kraft-regression |
Azure Pipelines successfully started running 1 pipeline(s). |
503156f
to
ff9bd90
Compare
/azp run kraft-regression |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run regression |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run kraft-regression |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run regression |
Azure Pipelines successfully started running 1 pipeline(s). |
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.
LGTM, assuming the pass 👍 thanks just one nit...
systemtest/src/main/java/io/strimzi/systemtest/enums/NodePoolsRoleMode.java
Show resolved
Hide resolved
/azp run kraft-regression |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run regression |
Azure Pipelines successfully started running 1 pipeline(s). |
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.
Pretty much works for me only confirmation question mainly about: NodePoolsConverter.java
class.
Judging from the way it is used, commets you provided and code i assume it works as following:
1.) It is called whenever we need this logic to decide what to do about specific node Pool, otherwise we stick to direct creation of resource without this method.
2.) We are introducing Environment.IsSepareRoleModel
default to true
playing role only if is Environment.isNodePoolEnabled
on (effectively it does most of its work only if Kraft is enabled as well) ?
3.) The working of the public static method convertNodePoolsIfNeeded
could be summarized by following ?
If ! Environment.IsKafkaNodePoolEnabled
return empty list i.e. no resource created.
otherwise follow the table for each original node pool role role.
(first cell in table tells which Role is KNP, axis x-> if kraft Is Enabled axis y if SeparateRolesMode are enabled) rest of cells are telling outcome of what happens with given node pool.
(Mixed Role) | IsKraft | ! isKraft |
---|---|---|
isSeparateRole | Mixed (keep) | - (remove as contain controller ) |
!isSeparateRole | Mixed (keep) | - (remove as contain controller ) |
(Controller Role) | IsKraft | ! isKraft |
---|---|---|
isSeparateRole | controller (keep) | - (remove as contain controller ) |
!isSeparateRole | Mixed (change) | - (remove as contain controller ) |
(Broker) | IsKraft | ! isKraft |
---|---|---|
isSeparateRole | broker (keep) | broker (keep) |
!isSeparateRole | Mixed (change) | - (remove as contain controller ) it seems to be added in code |
?
Anyway really great Job, Thanks Lukas.
@henryZrncik yeah the tables you provided are correct. Also worth mentioning is, that in our test-cases, we are not currently using the And yeah, in case that you are working on ST that will always have f.e. NodePools with mixed role, you will not use the |
/azp run regression |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run upgrade |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run feature-gates-regression |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run kraft-regression |
Azure Pipelines successfully started running 1 pipeline(s). |
Signed-off-by: Lukas Kral <lukywill16@gmail.com> NodePoolsHandler, add NodePools creation to all testcases Signed-off-by: Lukas Kral <lukywill16@gmail.com> checkstyle, javadoc, and fixups Signed-off-by: Lukas Kral <lukywill16@gmail.com> fixup Signed-off-by: Lukas Kral <lukywill16@gmail.com> fix http bridge tests Signed-off-by: Lukas Kral <lukywill16@gmail.com> fixups to CC and NP ST classes Signed-off-by: Lukas Kral <lukywill16@gmail.com> correct controllers and brokers Signed-off-by: Lukas Kral <lukywill16@gmail.com> change label selectors, component names, etc. Signed-off-by: Lukas Kral <lukywill16@gmail.com> fixups to KafkaST Signed-off-by: Lukas Kral <lukywill16@gmail.com> multiple fixups Signed-off-by: Lukas Kral <lukywill16@gmail.com> another fixes Signed-off-by: Lukas Kral <lukywill16@gmail.com> another run, another fixes Signed-off-by: Lukas Kral <lukywill16@gmail.com> another fixes Signed-off-by: Lukas Kral <lukywill16@gmail.com> fixups Signed-off-by: Lukas Kral <lukywill16@gmail.com>
Signed-off-by: Lukas Kral <lukywill16@gmail.com>
caaf1a8
to
5f0b3f6
Compare
Signed-off-by: Lukas Kral <lukywill16@gmail.com>
/azp run upgrade |
/azp run feature-gates-regression |
Azure Pipelines successfully started running 1 pipeline(s). |
1 similar comment
Azure Pipelines successfully started running 1 pipeline(s). |
Signed-off-by: Lukas Kral <lukywill16@gmail.com>
/azp run upgrade |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run regression |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run upgrade |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run regression |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run kraft-regression |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run feature-gates-regression |
Azure Pipelines successfully started running 1 pipeline(s). |
There are two test failures in
which fails also on |
Type of change
Description
This PRs adds creation on NodePools to every test case we have in our
systemtest
module.And because we want to run the tests in multiple modes -> ZK without NodePools, ZK with NodePools, KRaft -> I added
NodePoolsConverter
, which converts NodePools, that are passed into it, based on the mode. As a result, the final list of NodePools is returned and it can be passed to theresourceManager.createResourceWithWait
method.The
NodePoolsConverter
does following:MIXED
mode (that means that the NodePool should have bothbroker
andcontroller
roles), the controller NodePools are removed and broker NodePools are updated withcontroller
rolecontroller
roleNote: the conversion to mixed mode is done only in case that the KRaft mode is enabled +
!Environment.isSeparateRolesMode()
Together with this, I had to change multiple things -> added new fields to
TestStorage
, so it contains all NodePools (controller
,broker
,mixed
), I had to create new methods for returning correct "component name" and LabelSelectors based on the mode.KafkaResources.kafkaPodName()
is not used anymore, as the pods "numbers" can be different - we could "work around" it and set the IDs by annotation, but I think that it's better to get the Pod name using list pods by LabelSelector, than to assume that the Pod will be named that way.convertKafkaResourceToKafkaNodePool
was removed, because it is not needed anymore - that was a workaround, so we were able to run the tests with NodePools, but it doesn't make sense to have it there, as we should follow the way how "user would use it".Checklist