Conversation
Kuvesz
left a comment
There was a problem hiding this comment.
Left some comments, overall doesn't look too bad, it's just very confusing to me in some ways, I really was hoping a simpler solution is possible to achieve this.
Otherwise I would only ask that we try to refrain from these very long PRs (I know it's not always possible, this is just a reminder) when we can, I'm pretty sure I missed a lot of stuff in there because I can't pay attention long enough to review something like this properly.
.github/workflows/e2e-test.yaml
Outdated
| kind_k8s_version: v1.24.13 | ||
| kubeconfig_dir_path: tests/e2e/kubeconfigs | ||
|
|
||
| # TODO: ZookeeperCluster create time out always on the second kind cluster |
There was a problem hiding this comment.
Question: Is it an actual timeout issue or can Zookeeper not start for some reason and we retry until we reach a timeout?
There was a problem hiding this comment.
Here you can see the problem: https://github.com/banzaicloud/koperator/runs/15416787902
It would be nice to get more information why is this fail (like pod status)
There was a problem hiding this comment.
Because in local environment all of the tests passed when multiple k8s cluster is used in parallel way I suspect that the problem is with timeouts or something else on github
There was a problem hiding this comment.
Please test the PR with multicluster input on your local.
This PR is not about to run tests on github on multiple kind cluster.
There was a problem hiding this comment.
Is this WIP? A lot of unit tests seem to be missing from this still.
There was a problem hiding this comment.
I made unit test for the complex function.
Can you see another function with complex logic that need to be unit tested?
There was a problem hiding this comment.
What I mean is we only have unit tests here for one struct's functions and nothing for any of the other functions. I know not everything can be unit tested easily but it would be nice to add most we can do.
There was a problem hiding this comment.
I added multiple unit tests for functions where there are some logic.
tests/e2e/const.go
Outdated
| kafkaClusterCreateTimeout = 600 * time.Second | ||
| kafkaClusterResourceCleanupTimeout = 120 * time.Second | ||
| kcatDeleetionTimeout = 40 * time.Second | ||
| zookeeperClusterCreateTimeout = 7 * time.Minute // Increased from 4 to 7 for multiple kind |
There was a problem hiding this comment.
Same as on line 56, I don't think we need this comment.
There was a problem hiding this comment.
Can you please explain why should we remove this?
There was a problem hiding this comment.
I'm really not sure what sense it makes to have the explanation for this timeout here. For giving information to reviewers it would be fine as a review comment but I don't think this needs to be a comment on the code.
There was a problem hiding this comment.
+1 that the comment "// Increased from 4 to 7 for multiple kind" can be removed since it only provides the context about why the change is made, but it doesn't provide any valuable info itself along with the source code.
Or perhaps we can change the comment to something like this:
| zookeeperClusterCreateTimeout = 7 * time.Minute // Increased from 4 to 7 for multiple kind | |
| // increase timeout for supporting multiple Kind clusters | |
| zookeeperClusterCreateTimeout = 7 * time.Minute |
There was a problem hiding this comment.
I can remove but in this case who will face with this issue on multiple kind cluster on github will not know what was the original setting for one kind cluster setup.
There was a problem hiding this comment.
I think default values and the reason of their changes are valuable in this case.
There was a problem hiding this comment.
Because the increased timeout was not helped, I put back to the original value and I removed the comment
fixed: 129e7fe
tests/e2e/pkg/common/common.go
Outdated
| return kubecontext, nil | ||
| } | ||
|
|
||
| // GetRawConfig creates a raw clientcmd api config |
There was a problem hiding this comment.
I mean in my head a get function isn't supposed to create things, just get them but what do the others think? @panyuenlau @mihaialexandrescu @pregnor ?
There was a problem hiding this comment.
What I mean is we only have unit tests here for one struct's functions and nothing for any of the other functions. I know not everything can be unit tested easily but it would be nice to add most we can do.
Kuvesz
left a comment
There was a problem hiding this comment.
Looks okay to me, though I still have some comments open and there are some TODOs so I'll not approve just yet.
panyuenlau
left a comment
There was a problem hiding this comment.
Generally LGTM, will approve when the un-resolved comments are addressed
panyuenlau
left a comment
There was a problem hiding this comment.
Thanks for the excellent work!
Description
Type of Change
Checklist