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

Migrate to kubebuilder v4 layout #1092

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

rubenvp8510
Copy link
Collaborator

No description provided.

@rubenvp8510 rubenvp8510 force-pushed the migrate_kubebuilder_v4 branch 4 times, most recently from 56c0231 to 0a595ac Compare November 18, 2024 01:56
Signed-off-by: Ruben Vargas <ruben.vp8510@gmail.com>
Signed-off-by: Ruben Vargas <ruben.vp8510@gmail.com>
Signed-off-by: Ruben Vargas <ruben.vp8510@gmail.com>
Signed-off-by: Ruben Vargas <ruben.vp8510@gmail.com>
@rubenvp8510 rubenvp8510 marked this pull request as ready for review November 18, 2024 06:09
Signed-off-by: Ruben Vargas <ruben.vp8510@gmail.com>
Signed-off-by: Ruben Vargas <ruben.vp8510@gmail.com>
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 18.98734% with 128 lines in your changes missing coverage. Please review.

Project coverage is 58.58%. Comparing base (1fb2623) to head (3615794).

Files with missing lines Patch % Lines
api/config/v1alpha1/zz_generated.deepcopy.go 0.00% 65 Missing ⚠️
cmd/root/options.go 27.39% 48 Missing and 5 partials ⚠️
cmd/root/config.go 45.45% 4 Missing and 2 partials ⚠️
api/config/v1alpha1/projectconfig_types.go 0.00% 2 Missing ⚠️
cmd/main.go 0.00% 1 Missing ⚠️
cmd/start/main.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1092      +/-   ##
==========================================
- Coverage   67.91%   58.58%   -9.34%     
==========================================
  Files         110      114       +4     
  Lines        8728    10151    +1423     
==========================================
+ Hits         5928     5947      +19     
- Misses       2503     3901    +1398     
- Partials      297      303       +6     
Flag Coverage Δ
unittests 58.58% <18.98%> (-9.34%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -45,25 +44,16 @@ func init() {
//+kubebuilder:scaffold:scheme
}

//var errConfigFileLoading = errors.New("could not read file at path")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can this be removed?

Comment on lines +53 to 54
return err
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you keep the message here? I think it gives context and help debugging stuff


// LoadConfig initializes the controller configuration, optionally overriding the defaults
// from a provided configuration file.
func LoadConfig(scheme *runtime.Scheme, configFile string) (*configv1alpha1.ProjectConfig, ctrl.Options, error) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe add some tests to the methods from this file?


var errConfigFileLoading = errors.New("could not read file at path")

func loadConfigFile(scheme *runtime.Scheme, outConfig *configv1alpha1.ProjectConfig, configFile string) error {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe you can move this to options.go

@iblancasa
Copy link
Collaborator

Some nits. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants