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

Revert native go error wrapping #2483

Merged
merged 3 commits into from
Mar 31, 2022
Merged

Conversation

puerco
Copy link
Member

@puerco puerco commented Mar 31, 2022

What type of PR is this?

/kind regression

What this PR does / why we need it:

This PR is a revert of 0eb9589 as functions were returning invalid errors.

We should move forward with the native wrapping but some patterns we were using with the errors package need additional validation to avoid returning empty errors.

Which issue(s) this PR fixes:

Some functions used to return errors relying on Wrap, like this:

return doc, errors.Wrap(err, "generating kubernetes source code SBOM")

... and they had this replacement which was returning errors without checking them:

	doc, err := spdx.NewDocBuilder().Generate(options)
	return doc, fmt.Errorf("generating kubernetes source code SBOM: %w", err)

Special notes for your reviewer:

This PR is also updating the bom libraries to their latest version

/assign @jimangel
/cc @saschagrunert @kubernetes/release-engineering

Does this PR introduce a user-facing change?

- Reverted 0eb9589 as some error checking was returning invalid errors.
- Bump of bom libraries to latest version

puerco added 2 commits March 30, 2022 19:21
This reverts commit 0eb9589.

This reverts the native error wrapping as some functions are returning
errors when they should not.

Signed-off-by: Adolfo García Veytia (Puerco) <[email protected]>
Signed-off-by: Adolfo García Veytia (Puerco) <[email protected]>
@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/regression Categorizes issue or PR as related to a regression from a prior release. labels Mar 31, 2022
@k8s-ci-robot k8s-ci-robot requested review from saschagrunert and a team March 31, 2022 02:19
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-priority size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Mar 31, 2022
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: puerco

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 area/release-eng Issues or PRs related to the Release Engineering subproject sig/release Categorizes an issue or PR as relevant to SIG Release. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Mar 31, 2022
@puerco puerco changed the title Revert Revert native go error wrapping Mar 31, 2022
@jimangel
Copy link
Member

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 31, 2022
Signed-off-by: Adolfo García Veytia (Puerco) <[email protected]>
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 31, 2022
@palnabarun
Copy link
Member

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 31, 2022
@k8s-ci-robot k8s-ci-robot merged commit a40bc07 into kubernetes:master Mar 31, 2022
@k8s-ci-robot k8s-ci-robot added this to the v1.24 milestone Mar 31, 2022
@puerco puerco deleted the revert branch March 31, 2022 05:43
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. area/release-eng Issues or PRs related to the Release Engineering subproject cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/regression Categorizes issue or PR as related to a regression from a prior release. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/release Categorizes an issue or PR as relevant to SIG Release. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants