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

remove "koku" from naming convention #161

Merged
merged 4 commits into from
Feb 16, 2023
Merged

remove "koku" from naming convention #161

merged 4 commits into from
Feb 16, 2023

Conversation

maskarb
Copy link
Member

@maskarb maskarb commented Feb 15, 2023

Wait, why!?

When we initially did this work, we named everything upstream as koku and then converted it all to cost-management for downstream. That seems fine enough, but when it comes to converting the upstream to downstream for a release, it becomes really difficult and error prone to make sure all the appropriate name changes are made. This PR will eliminate the need for making the name changes when generating the downstream code. All we will need to do for downstream releases is make sure these are set correctly to:

// +kubebuilder:object:generate:=false
-type MetricsConfig = KokuMetricsConfig
+type MetricsConfig = CostManagementMetricsConfig

// +kubebuilder:object:generate:=false
-type MetricsConfigSpec = KokuMetricsConfigSpec
+type MetricsConfigSpec = CostManagementMetricsConfigSpec

// +kubebuilder:object:generate:=false
-type MetricsConfigStatus = KokuMetricsConfigStatus
+type MetricsConfigStatus = CostManagementMetricsConfigStatus

The next downstream release will also be difficult to implement all these name changes again, but once those are converted, we won't have to do it again.

@maskarb maskarb self-assigned this Feb 15, 2023
@maskarb maskarb requested a review from a team February 15, 2023 21:50
@codecov
Copy link

codecov bot commented Feb 15, 2023

Codecov Report

Merging #161 (84f53f7) into main (dfe0230) will decrease coverage by 0.28%.
The diff coverage is 88.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #161      +/-   ##
==========================================
- Coverage   88.01%   87.73%   -0.28%     
==========================================
  Files          10       10              
  Lines        1468     1468              
==========================================
- Hits         1292     1288       -4     
- Misses        106      108       +2     
- Partials       70       72       +2     
Flag Coverage Δ
unittests 87.73% <88.66%> (-0.28%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
collector/collector.go 88.53% <ø> (ø)
collector/prometheus.go 100.00% <ø> (ø)
sources/handler.go 96.62% <ø> (ø)
controllers/kokumetricsconfig_controller.go 78.63% <87.31%> (-0.94%) ⬇️
packaging/packaging.go 81.75% <100.00%> (ø)
storage/storage.go 95.50% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update dfe0230...84f53f7. Read the comment docs.

@maskarb maskarb merged commit 36edc8e into main Feb 16, 2023
@maskarb maskarb deleted the rename-koku branch February 16, 2023 15:36
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