-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Complete BatchingTopicController refactoring: handler classes #10248
Conversation
Failed test is unrelated and working when running 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.
Now that we have a KafkaHandler
and a KubernetesHandler
shouldn't be be able to have unit tests specifically for those?
cad9cde
to
ad53e76
Compare
ad53e76
to
85743a6
Compare
@tombentley this took more than I anticipated, as there were some test utils improvements to do. Mainly around recovery from interrupted tests, and namespace cleanup. I also improved the test log4j configuration. No existing test logic has been changed. We now have tests for the two new handlers (Kube and Kafka), and I ran locally the full integration test suite multiple times, including I would suggests to run the regression tests suite (as I can't do it), and review this PR after #10241, so that I can take care of the rebase after the bugifx merge. |
85743a6
to
9dc73e0
Compare
@ppatierno maybe you can start the regression tests. Thanks. |
/azp run regression |
Azure Pipelines successfully started running 1 pipeline(s). |
This change completes the BatchingTopicController refactoring by introduicing a set of handlers, one for each external system, that host the request logic. With that, the BatchingTopicController class is only focused on the reconciliation logic, resulting in 40% less code and better maintenance. Tested with all Topic Operator unit and integration tests, TopicST, and TopicReplicasChangeST. I also ran the scalability test comparing this branch with 0.41.0, and the performance doesn't change. Signed-off-by: Federico Valeri <[email protected]>
Signed-off-by: Federico Valeri <[email protected]>
Signed-off-by: Federico Valeri <[email protected]>
9dc73e0
to
854b295
Compare
Signed-off-by: Federico Valeri <[email protected]>
Signed-off-by: Federico Valeri <[email protected]>
/azp run regression |
Azure Pipelines successfully started running 1 pipeline(s). |
Signed-off-by: Federico Valeri <[email protected]>
9c4d490
to
c804447
Compare
@tombentley for now I created the I'm a bit confused on how to avoid side effects in both cases with in-place recording. That's probably due to my lack of experience with functional programming. I know you suggested to use the new |
Completed the alter config filtering, now working on the replicas changes. |
Signed-off-by: Federico Valeri <[email protected]>
@tombentley following your suggestion, I removed side effects from the reconciliation logic, and added a note in |
Signed-off-by: Federico Valeri <[email protected]>
Signed-off-by: Federico Valeri <[email protected]>
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.
This is now at the point of being too big to review properly. It was big before, but it now seems to combine what were two separate strands of work: One to fix the race condition and one to do a refactoring.
In many ways I 'd rather not merge something which it too big to review. But I know this already represents a significant effort, so I don't want to insist that you break it down into smaller PRs. But please let's avoid doing this again in the future!
@tombentley having separate PRs was the original plan, but then things started to pile up with time, and I didn't know the full solution anymore, so I needed all the pieces to make progress. Even if I think the code is fine, I don't want to merge without your review. Would the following split work for you?
|
@fvaleri it would. If you're willing for break it up I'd appreciate it! |
@Frawless can you please launch regression tests on this? Thanks. |
/azp run regression |
Azure Pipelines successfully started running 1 pipeline(s). |
/packit test --labels regression |
Regression tests looks good. We only have one failure in testing-farm from a flaky test, which is already reported in #10295. |
Signed-off-by: Federico Valeri <[email protected]>
Signed-off-by: Federico Valeri <[email protected]>
Signed-off-by: Federico Valeri <[email protected]>
Signed-off-by: Federico Valeri <[email protected]>
Signed-off-by: Federico Valeri <[email protected]>
Split into two new PRs. |
Type of change
Description
This change completes the BatchingTopicController refactoring by introduicing a set of handlers, one for each external system, that host the request logic. With that, the BatchingTopicController class is only focused on the reconciliation logic, resulting in 40% less code and better maintenance.
Tested with all Topic Operator unit and integration tests, TopicST, and TopicReplicasChangeST. I also ran the scalability test comparing this branch with 0.41.0, and the performance doesn't change.
EDIT: This PR now includes a fix for the TO-CC race issue.
Checklist