Skip to content
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

KSPACE-20: Drop the distinction between host & member ToolchainClusters #359

Merged
merged 31 commits into from
Mar 13, 2024

Conversation

fbm3307
Copy link
Contributor

@fbm3307 fbm3307 commented Jan 30, 2024

This is related to Drop the distinction between host & member ToolchainClusters
Related PRs:
Host-Operator - codeready-toolchain/host-operator#971
Member-Operator - codeready-toolchain/member-operator#531
Registration-Service - codeready-toolchain/registration-service#402
Toolchain-e2e - codeready-toolchain/toolchain-e2e#893
Sandbox-sre - https://github.com/codeready-toolchain/sandbox-sre/pull/1524

@fbm3307 fbm3307 marked this pull request as ready for review January 31, 2024 07:34
@fbm3307 fbm3307 marked this pull request as draft January 31, 2024 09:08
Signed-off-by: Feny Mehta <[email protected]>
Signed-off-by: Feny Mehta <[email protected]>
signed-off-by: Feny Mehta <[email protected]>
Signed-off-by: Feny Mehta <[email protected]>
Signed-off-by: Feny Mehta <[email protected]>
@fbm3307 fbm3307 marked this pull request as ready for review February 6, 2024 13:35
Copy link

codecov bot commented Feb 6, 2024

Codecov Report

Merging #359 (99a2215) into master (05f8dfb) will decrease coverage by 0.24%.
The diff coverage is 73.68%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #359      +/-   ##
==========================================
- Coverage   76.22%   75.99%   -0.24%     
==========================================
  Files          44       44              
  Lines        1708     1683      -25     
==========================================
- Hits         1302     1279      -23     
+ Misses        354      353       -1     
+ Partials       52       51       -1     
Files Coverage Δ
...rs/toolchaincluster/toolchaincluster_controller.go 45.45% <ø> (-14.55%) ⬇️
pkg/cluster/cache.go 100.00% <100.00%> (ø)
pkg/cluster/service.go 83.46% <100.00%> (-2.25%) ⬇️
pkg/test/cluster.go 0.00% <0.00%> (ø)

@alexeykazakov alexeykazakov requested a review from metlos February 6, 2024 16:42
Copy link
Collaborator

@alexeykazakov alexeykazakov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to make sure that these changes do not break anything.
Please open PRs which uses this updated common for host, member, reg-service, sandbox-sre and e2e tests.
Be aware of that you can't pair multiple PRs with the same e2e test PR though.

pkg/cluster/cache.go Outdated Show resolved Hide resolved
pkg/cluster/cache.go Show resolved Hide resolved
Copy link
Contributor

@metlos metlos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apart from the comments that @alexeykazakov made, I think it is going to be more important to take a look at how these functions are used in the operators as well as in the unit and e2e tests and only then decide about how to drop the cluster type. I am afraid that the changes outside of toolchain-common are going to be much larger.

@fbm3307 fbm3307 requested a review from metlos February 12, 2024 06:52
fbm3307 added 2 commits March 7, 2024 11:52
Signed-off-by: Feny Mehta <[email protected]>
Signed-off-by: Feny Mehta <[email protected]>
@fbm3307 fbm3307 requested a review from mfrancisc March 7, 2024 07:10
pkg/cluster/cache_whitebox_test.go Outdated Show resolved Hide resolved
pkg/cluster/cache_whitebox_test.go Outdated Show resolved Hide resolved
pkg/cluster/cache_whitebox_test.go Outdated Show resolved Hide resolved
pkg/cluster/cache_whitebox_test.go Outdated Show resolved Hide resolved
pkg/cluster/cache_whitebox_test.go Show resolved Hide resolved
pkg/test/verify/cluster.go Show resolved Hide resolved
pkg/test/verify/cluster.go Outdated Show resolved Hide resolved
pkg/test/verify/cluster.go Outdated Show resolved Hide resolved
pkg/test/verify/cluster.go Outdated Show resolved Hide resolved
pkg/test/verify/cluster.go Outdated Show resolved Hide resolved
fbm3307 added 5 commits March 8, 2024 12:51
Signed-off-by: Feny Mehta <[email protected]>
Signed-off-by: Feny Mehta <[email protected]>
Signed-off-by: Feny Mehta <[email protected]>
Signed-off-by: Feny Mehta <[email protected]>
@fbm3307 fbm3307 requested a review from MatousJobanek March 11, 2024 08:57
Copy link
Contributor

@filariow filariow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mostly LGTM, just some optional suggestions

pkg/cluster/cache.go Show resolved Hide resolved
pkg/cluster/service.go Show resolved Hide resolved
pkg/cluster/service.go Show resolved Hide resolved
pkg/test/verify/cluster.go Outdated Show resolved Hide resolved
Copy link
Contributor

@mfrancisc mfrancisc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for looking at my comments. I have few minor things

Also I was double checking on the usage of cluster.GetHostCluster and cluster.GetMemberClusters and seems like the former just returns one toolchaincluster resource. That's the only difference. So I was wondering if we should have just one generic one ( I think it's something that came out in some other comments in this PR ) . We can do that as a follow up PR if we think it makes sense.

controllers/toolchaincluster/healthchecker_test.go Outdated Show resolved Hide resolved
pkg/cluster/cache_whitebox_test.go Show resolved Hide resolved
pkg/cluster/cache_whitebox_test.go Outdated Show resolved Hide resolved
pkg/cluster/service_test.go Outdated Show resolved Hide resolved
pkg/test/verify/cluster.go Outdated Show resolved Hide resolved
pkg/test/verify/cluster.go Show resolved Hide resolved
signed-off-by: Feny Mehta <[email protected]>
@fbm3307
Copy link
Contributor Author

fbm3307 commented Mar 11, 2024

Also I was double checking on the usage of cluster.GetHostCluster and cluster.GetMemberClusters and seems like the former just returns one toolchaincluster resource. That's the only difference. So I was wondering if we should have just one generic one ( I think it's something that came out in some other comments in this PR ) . We can do that as a follow up PR if we think it makes sense.

Yes i intend to do that in separate follow-up PR once this is merged

fbm3307 added 2 commits March 11, 2024 20:30
Signed-off-by: Feny Mehta <[email protected]>
Signed-off-by: Feny Mehta <[email protected]>
@fbm3307 fbm3307 requested a review from mfrancisc March 11, 2024 15:13
Copy link
Contributor

@mfrancisc mfrancisc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice Job 🏅 🚀 👏
Thanks for addressing my comments!

Friendly reminder - please wait also for approval from the other reviewers and approval of the related PRs before merging.

Copy link
Contributor

@MatousJobanek MatousJobanek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, let's just rename one variable to not confuse people

controllers/toolchaincluster/healthchecker_test.go Outdated Show resolved Hide resolved
controllers/toolchaincluster/healthchecker_test.go Outdated Show resolved Hide resolved
pkg/test/cluster.go Outdated Show resolved Hide resolved
pkg/test/cluster.go Outdated Show resolved Hide resolved
pkg/test/cluster.go Outdated Show resolved Hide resolved
@fbm3307 fbm3307 requested a review from MatousJobanek March 12, 2024 10:40
@fbm3307
Copy link
Contributor Author

fbm3307 commented Mar 12, 2024

Looks good, let's just rename one variable to not confuse people

@MatousJobanek right, updated it. 👍

Copy link
Contributor

@MatousJobanek MatousJobanek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cool, thanks for the extra changes. 🚀
Let's start merging the PRs 👍 I believe that you have approval for all of them, just don't forget to update the dependency to toolchain-common as soon as you merge this PR

Copy link

Quality Gate Passed Quality Gate passed

Issues
6 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
18.1% Duplication on New Code

See analysis details on SonarCloud

@MatousJobanek MatousJobanek merged commit 5cafefa into codeready-toolchain:master Mar 13, 2024
6 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants