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: use fmt.Errorf instead of non-existing errors.New #5651

Merged
merged 4 commits into from Apr 30, 2024

Conversation

tigrato
Copy link
Contributor

@tigrato tigrato commented Apr 8, 2024

When #5525 merged, it referenced errors.New function but that function doesn't exist. This PR replaces the call with simple fmt.Errorf.

When kubernetes-sigs#5525 merged, it
referenced `errors.New` function but that function doesn't exist.
This PR replaces the call with simple `fmt.Errorf`.
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Apr 8, 2024
@k8s-ci-robot
Copy link
Contributor

Hi @tigrato. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Apr 8, 2024
@tigrato
Copy link
Contributor Author

tigrato commented Apr 8, 2024

@varshaprasad96 sorry for the trouble but somehow I failed to verify if it compiled in the latest version I submitted.

Can you please prioritize this merge?
Thanks

@tigrato tigrato changed the title fix: use fmt.Errorf ubstead if non-exising errors.New fix: use fmt.Errorf instead of non-exising errors.New Apr 8, 2024
Copy link
Member

@stormqueen1990 stormqueen1990 left a comment

Choose a reason for hiding this comment

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

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 8, 2024
@stormqueen1990
Copy link
Member

@tigrato could you add some basic testing to this new function that would be able to catch the issue?

@k8s-ci-robot
Copy link
Contributor

This PR has multiple commits, and the default merge method is: merge.
You can request commits to be squashed using the label: tide/merge-method-squash

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Apr 8, 2024
@tigrato
Copy link
Contributor Author

tigrato commented Apr 8, 2024

@tigrato could you add some basic testing to this new function that would be able to catch the issue?

@stormqueen1990 I added a small lint step that checks the api module with kustomize_disable_go_plugin_support build tag. This is enough to catch any future issues.

Makefile Outdated
Comment on lines 131 to 141
export KUSTOMIZE_ROOT ?= $(shell pwd | sed -E 's|(.*\/kustomize)/(.*)|\1|')
.PHONY: lint-api-static
lint-api-static: $(MYGOBIN)/golangci-lint $(MYGOBIN)/goimports $(builtinplugins)
cd api && \
$(MYGOBIN)/golangci-lint \
-c $$KUSTOMIZE_ROOT/.golangci.yml \
--build-tags kustomize_disable_go_plugin_support \
-D exhaustive \
--path-prefix api \
run ./...

Copy link
Member

Choose a reason for hiding this comment

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

Since this is specific to api, it should go in api/Makefile instead.

The specific module Makefiles already have KUSTOMIZE_ROOT imported, so it's not needed to redefine it.

Copy link
Contributor Author

@tigrato tigrato Apr 9, 2024

Choose a reason for hiding this comment

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

@stormqueen1990

Moved in 33dc9be
Thanks

Copy link
Member

@stormqueen1990 stormqueen1990 left a comment

Choose a reason for hiding this comment

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

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 9, 2024
@stormqueen1990
Copy link
Member

/retitle fix: use fmt.Errorf instead of non-existing errors.New

@k8s-ci-robot k8s-ci-robot changed the title fix: use fmt.Errorf instead of non-exising errors.New fix: use fmt.Errorf instead of non-existing errors.New Apr 9, 2024
@stormqueen1990
Copy link
Member

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Apr 28, 2024
@koba1t
Copy link
Member

koba1t commented Apr 29, 2024

/label tide/merge-method-squash

@k8s-ci-robot k8s-ci-robot added the tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges. label Apr 29, 2024
@koba1t
Copy link
Member

koba1t commented Apr 30, 2024

Thanks!
/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: koba1t, tigrato

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 30, 2024
@k8s-ci-robot k8s-ci-robot merged commit e7a1549 into kubernetes-sigs:master Apr 30, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants