Skip to content

USHIFT-1345: standardize logging and error messages in prerun module#1901

Merged
openshift-merge-robot merged 3 commits intoopenshift:mainfrom
dhellmann:prerun-logging-adjustments
Jun 19, 2023
Merged

USHIFT-1345: standardize logging and error messages in prerun module#1901
openshift-merge-robot merged 3 commits intoopenshift:mainfrom
dhellmann:prerun-logging-adjustments

Conversation

@dhellmann
Copy link
Contributor

/assign @pmtk

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jun 7, 2023
@openshift-ci-robot
Copy link

@dhellmann: This pull request explicitly references no jira issue.

Details

In response to this:

/assign @pmtk

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.

@openshift-ci openshift-ci bot requested review from copejon and jerpeter1 June 7, 2023 22:28
@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 7, 2023
@dhellmann dhellmann force-pushed the prerun-logging-adjustments branch from 46326f5 to 32b7399 Compare June 7, 2023 22:44
@dhellmann dhellmann force-pushed the prerun-logging-adjustments branch from 32b7399 to 049e41c Compare June 8, 2023 12:55
"name", name,
)
if err := os.RemoveAll(dm.GetBackupPath(name)); err != nil {
return errors.Wrap(err, fmt.Sprintf("Failed to delete backup %q", name))
Copy link
Member

@pmtk pmtk Jun 12, 2023

Choose a reason for hiding this comment

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

I think there's a guideline that errors should not be capitalized (and linter checks that, but here it's wrapped in fmt.Sprintf)

Edit: https://github.com/golang/go/wiki/CodeReviewComments#error-strings

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've updated all of the error messages I could find in pkg/.


"github.com/openshift/microshift/pkg/config"
"github.com/openshift/microshift/pkg/util"
"github.com/pkg/errors"
Copy link
Member

Choose a reason for hiding this comment

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

This package is "3rd party" and is no longer maintained

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I replaced all uses in pkg/ in a follow-up commit.

github.com/pkg/errors is no longer maintained. Switch to using %w verb
in fmt.Errorf() instead.
@dhellmann
Copy link
Contributor Author

dhellmann commented Jun 16, 2023

/retitle USHIFT-1345: standardize logging and error messages in prerun module

@openshift-ci openshift-ci bot changed the title NO-ISSUE: standardize logging and error messages in prerun module USHIFT-1345: standardize logging and error messages in prerun module Jun 16, 2023
@openshift-ci-robot
Copy link

openshift-ci-robot commented Jun 16, 2023

@dhellmann: This pull request references USHIFT-1345 which is a valid jira issue.

Details

In response to this:

/assign @pmtk

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.

@pmtk
Copy link
Member

pmtk commented Jun 19, 2023

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jun 19, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 19, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dhellmann, pmtk

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

The pull request process is described here

Details 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

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 19, 2023

@dhellmann: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-openshift-conformance-reduced-arm 67350d2 link false /test e2e-openshift-conformance-reduced-arm
ci/prow/microshift-e2e-arm 67350d2 link false /test microshift-e2e-arm

Full PR test history. Your PR dashboard.

Details

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. I understand the commands that are listed here.

@pmtk
Copy link
Member

pmtk commented Jun 19, 2023

/test microshift-e2e

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. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants