-
Notifications
You must be signed in to change notification settings - Fork 362
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
feat(kafka): Add update function for cluster #1714
feat(kafka): Add update function for cluster #1714
Conversation
@akesser can you Check for DCO ? |
Signed-off-by: André Kesser <andre.kesser@dkb.de>
84c8547
to
63d8cdd
Compare
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.
@akesser could you unwrap the ifs into a more linear form. Otherwise the code is too hard to read. Also you might want to checkout cmp.Equal
to see if can help you to save some of that code.
According to its self description, cmp.Equal is not meant to be used in production:
In my opinion, the used ifs is the best way to keep the code readable, keeping it clear what property is under test right now. Using linearized forms of ifs requires many repetitions, making it hard to see the difference in the if to the previous and following test. The code in other files also uses nested ifs, not to mention auto generated code. |
@akesser What counts is source code readability and multiple nested It would be really great if you could simplify the code by using it. |
Additionally to the warning, that cmp.Equal should not be used, the different naming of some properties, like IAM vs Iam or EBSStorageInfo vs. EbsStorageInfo would lead to either ignoring them in cmp.Equal and comparing them by hand again or writing transformers that do the same comparison the code already does. |
That's correct, the common way is to create a |
think the code is Not easier to read when switching to cmp.Equal |
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.
Alright, then its decided. Thank you for your contribution @akesser!
Description of your changes
We implemented the functions to update a Kafka cluster
fixes the update of a Kafka cluster as mentioned in #1683
I have:
make reviewable test
to ensure this PR is ready for review.How has this code been tested
Tested locally against aws account