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

fix: support 3.x to 4.x upgrades when num_tokens are not set in k8ssandraCluster #1118

Merged
merged 9 commits into from
Dec 20, 2023

Conversation

cnvergence
Copy link
Contributor

@cnvergence cnvergence commented Nov 21, 2023

What this PR does:

Which issue(s) this PR fixes:
Fixes #1119

Checklist

  • Changes manually tested
  • Automated Tests added/updated
  • Documentation added/updated
  • CHANGELOG.md updated (not required for documentation PRs)
  • CLA Signed: DataStax CLA

Copy link

codecov bot commented Nov 21, 2023

Codecov Report

Merging #1118 (ef099fe) into main (be45e84) will increase coverage by 0.03%.
The diff coverage is 66.03%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1118      +/-   ##
==========================================
+ Coverage   57.34%   57.38%   +0.03%     
==========================================
  Files         100      100              
  Lines       10193    10233      +40     
==========================================
+ Hits         5845     5872      +27     
- Misses       3836     3845       +9     
- Partials      512      516       +4     
Files Coverage Δ
...ntrollers/k8ssandra/k8ssandracluster_controller.go 75.00% <ø> (ø)
apis/k8ssandra/v1alpha1/k8ssandracluster_types.go 36.70% <80.00%> (+2.92%) ⬆️
...pis/k8ssandra/v1alpha1/k8ssandracluster_webhook.go 73.23% <82.35%> (-2.52%) ⬇️
controllers/k8ssandra/datacenters.go 73.31% <0.00%> (-0.92%) ⬇️
pkg/cassandra/datacenter.go 66.75% <65.38%> (-0.11%) ⬇️

... and 1 file with indirect coverage changes

@cnvergence cnvergence marked this pull request as ready for review November 21, 2023 10:21
@cnvergence cnvergence requested a review from a team as a code owner November 21, 2023 10:21
@cnvergence cnvergence marked this pull request as draft November 27, 2023 10:44
@cnvergence cnvergence changed the title fix: skip validation of num_tokens when upgrading from 3.x to 4.x fix: support version upgrades when num_tokens are not set in k8ssandraCluster Nov 27, 2023
Signed-off-by: Karol Szwaj <[email protected]>
Signed-off-by: Karol Szwaj <[email protected]>
Signed-off-by: Karol Szwaj <[email protected]>
@cnvergence cnvergence marked this pull request as ready for review November 27, 2023 21:01
@cnvergence cnvergence marked this pull request as draft November 28, 2023 08:42
@cnvergence cnvergence marked this pull request as ready for review November 28, 2023 08:43
Signed-off-by: Karol Szwaj <[email protected]>
@cnvergence cnvergence force-pushed the fix-validating-upgrade branch from 1e6b17f to 016f1f5 Compare November 29, 2023 18:03
Signed-off-by: Karol Szwaj <[email protected]>
@cnvergence cnvergence force-pushed the fix-validating-upgrade branch from 016f1f5 to be53ad3 Compare November 30, 2023 08:37
Signed-off-by: Karol Szwaj <[email protected]>
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@cnvergence cnvergence changed the title fix: support version upgrades when num_tokens are not set in k8ssandraCluster fix: support 3.x to 4.x upgrades when num_tokens are not set in k8ssandraCluster Dec 5, 2023
@burmanm burmanm self-requested a review December 20, 2023 10:34
@burmanm
Copy link
Contributor

burmanm commented Dec 20, 2023

The upgrade from 3.11.14 -> 4.1.3 does not work as intended if the num_tokens is not manually set (it will fail to "trying to change num_tokens"), so it didn't correctly fetch the existing ones in that sense. But I'll create a follow-up ticket to fix that.

@burmanm burmanm merged commit 5542252 into k8ssandra:main Dec 20, 2023
61 checks passed
@burmanm
Copy link
Contributor

burmanm commented Dec 20, 2023

Thank you for the PR.

@cnvergence cnvergence deleted the fix-validating-upgrade branch December 21, 2023 10:00
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.

k8ssandra cluster upgrade fails between 3.x and 4.x versions
2 participants