Skip to content
This repository has been archived by the owner on Jul 11, 2023. It is now read-only.

errcode: introduce error code management #3706

Merged
merged 1 commit into from
Jun 30, 2021

Conversation

shashankram
Copy link
Member

Introduces a pkg to manage error codes. Documentation
and tooling to inspect errors will be built around
the error code and description mapping provided by
this pkg.

Sample error log with error code:

{"level":"error","component":"errcode","error":"some error","error_code":"E1000","time":"2021-06-30T12:52:14-07:00","file":"errcode_test.go:14","message":"some error was seen"}

Part of #2866

Signed-off-by: Shashank Ram shashr2204@gmail.com

Description:

Affected area:

Functional Area
New Functionality [X]

Please answer the following questions with yes/no.

  1. Does this change contain code from or inspired by another project? no

    • Did you notify the maintainers and provide attribution?
  2. Is this a breaking change? no

@codecov-commenter
Copy link

codecov-commenter commented Jun 30, 2021

Codecov Report

Merging #3706 (8bb7371) into main (0322387) will increase coverage by 0.02%.
The diff coverage is 50.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3706      +/-   ##
==========================================
+ Coverage   67.65%   67.68%   +0.02%     
==========================================
  Files         181      182       +1     
  Lines        8772     8773       +1     
==========================================
+ Hits         5935     5938       +3     
+ Misses       2804     2802       -2     
  Partials       33       33              
Flag Coverage Δ
unittests 67.68% <50.00%> (+0.02%) ⬆️

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

Impacted Files Coverage Δ
cmd/osm-controller/osm-controller.go 13.51% <0.00%> (ø)
pkg/errcode/errcode.go 100.00% <100.00%> (ø)
pkg/providers/kube/client.go 57.85% <0.00%> (+0.71%) ⬆️
...icate/providers/certmanager/certificate_manager.go 87.90% <0.00%> (+0.80%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0322387...8bb7371. Read the comment docs.

Introduces a pkg to manage error codes. Documentation
and tooling to inspect errors will be built around
the error code and description mapping provided by
this pkg.

Part of openservicemesh#2866

Signed-off-by: Shashank Ram <shashr2204@gmail.com>
@shashankram shashankram marked this pull request as ready for review June 30, 2021 22:39
@shashankram shashankram requested a review from a team as a code owner June 30, 2021 22:39
@shashankram shashankram changed the title [RFC] errcode: introduce error code management errcode: introduce error code management Jun 30, 2021
@shashankram shashankram merged commit da3a875 into openservicemesh:main Jun 30, 2021
@shashankram shashankram deleted the err-v1 branch June 30, 2021 23:07
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants