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

Add and fix golangci issues #41

Merged
merged 4 commits into from
Aug 8, 2023
Merged

Add and fix golangci issues #41

merged 4 commits into from
Aug 8, 2023

Conversation

ekarlso
Copy link
Contributor

@ekarlso ekarlso commented Jul 16, 2023

No description provided.

@ekarlso ekarlso force-pushed the golang-ci branch 2 times, most recently from ea232aa to 9fce4ec Compare July 17, 2023 23:55
@@ -168,15 +168,15 @@ deploy-controlplane: manifests-controlplane

# Generate manifests e.g. CRD, RBAC etc.
manifests-controlplane: $(KUSTOMIZE) $(CONTROLLER_GEN)
$(CONTROLLER_GEN) rbac:roleName=manager-role webhook crd paths="./..." output:crd:artifacts:config=controlplane/config/crd/bases output:rbac:dir=bootstrap/config/rbac
$(CONTROLLER_GEN) rbac:roleName=manager-role webhook crd paths="./..." output:crd:artifacts:config=controlplane/config/crd/bases output:rbac:dir=controlplane/config/rbac
Copy link
Collaborator

Choose a reason for hiding this comment

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

just noticed this typo. This may have the potential to break functionality. We need to double check the rbac of the controlplane provider.

@zawachte
Copy link
Collaborator

@ekarlso ready for review?

@ekarlso
Copy link
Contributor Author

ekarlso commented Jul 27, 2023

I am currently not able to access my test env to try it out :(

@zawachte
Copy link
Collaborator

zawachte commented Aug 1, 2023

@ekarlso ready for review?

@@ -517,34 +513,32 @@ func (r *KThreesConfigReconciler) generateAndStoreToken(ctx context.Context, sco
// it is possible that secret creation happens but the config.Status patches are not applied
if err := r.Client.Create(ctx, secret); err != nil {
if !apierrors.IsAlreadyExists(err) {
return "", errors.Wrapf(err, "failed to create token for KThreesConfig %s/%s", scope.Config.Namespace, scope.Config.Name)
return "", fmt.Errorf("failed to create token for KThreesConfig %s/%s: %w", scope.Config.Namespace, scope.Config.Name, err)
Copy link
Collaborator

Choose a reason for hiding this comment

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

which linter favors fmt.Errorf?

@zawachte zawachte merged commit 7f5c26d into k3s-io:main Aug 8, 2023
3 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