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

Make HttpManagement.Enabled a pointer #1091

Merged
merged 1 commit into from
Oct 20, 2023

Conversation

Miles-Garnsey
Copy link
Member

What this PR does:

The HttpManagement.Enabled in the Reaper package should be a pointer, to allow for easier distinction between unset and false values. This is not important for k8ssandra-operator (where a default value of false is fine) but is relevant for downstream consumers of the types, in particular MC, where we would like to have a default value of true.

Which issue(s) this PR fixes:
Hotfix.

Checklist

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

@Miles-Garnsey Miles-Garnsey requested a review from a team as a code owner October 19, 2023 17:21
@github-actions
Copy link

No linked issues found. Please add the corresponding issues in the pull request description.
Use GitHub automation to close the issue when a PR is merged

Copy link
Contributor

@olim7t olim7t left a comment

Choose a reason for hiding this comment

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

LGTM, don't forget the changelog entry.

@@ -152,7 +152,7 @@ func NewDeployment(reaper *api.Reaper, dc *cassdcapi.CassandraDatacenter, keysto
Value: fmt.Sprintf("%d", reaper.Spec.HeapSize.Value()),
})
}
if reaper.Spec.HttpManagement.Enabled {
if reaper.Spec.HttpManagement.Enabled != nil && *reaper.Spec.HttpManagement.Enabled {
Copy link
Contributor

Choose a reason for hiding this comment

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

[suggestion] not a hard requirement, but there is a library method for this kind of expression

Suggested change
if reaper.Spec.HttpManagement.Enabled != nil && *reaper.Spec.HttpManagement.Enabled {
if pointer.BoolDeref(reaper.Spec.HttpManagement.Enabled, false) {

@Miles-Garnsey Miles-Garnsey force-pushed the feature/http-management-pointer branch from f7c3348 to 874360e Compare October 19, 2023 20:31
@sonarqubecloud
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 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@codecov
Copy link

codecov bot commented Oct 19, 2023

Codecov Report

Merging #1091 (874360e) into main (dc5f807) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1091      +/-   ##
==========================================
- Coverage   57.40%   57.39%   -0.01%     
==========================================
  Files         100      100              
  Lines       10192    10192              
==========================================
- Hits         5851     5850       -1     
- Misses       3831     3832       +1     
  Partials      510      510              
Files Coverage Δ
pkg/reaper/deployment.go 93.72% <100.00%> (ø)

... and 2 files with indirect coverage changes

@Miles-Garnsey Miles-Garnsey merged commit d309735 into main Oct 20, 2023
57 of 59 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.

2 participants