Skip to content

Commit

Permalink
run error codes utility
Browse files Browse the repository at this point in the history
Signed-off-by: l5io <[email protected]>
  • Loading branch information
MUzairS15 authored and l5io committed Nov 10, 2023
1 parent 13409a3 commit f8cd102
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 5 deletions.
2 changes: 1 addition & 1 deletion cilium/error.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ var (
// ErrGettingReleaseCode implies error while fetching latest release for cilium cli
ErrGettingReleaseCode = "1030"

ErrFetchIstioVersionsCode = "replace_me"
ErrFetchIstioVersionsCode = "1031"

ErrFetchIstioVersions = errors.New(ErrFetchIstioVersionsCode, errors.Alert, []string{"could not get any cilium versions"}, []string{"versions for cilium could not be fetched"}, []string{"could not reach github.com/cilium/cilium/releases", "no versions could be fetched from cilium release page"}, []string{"make sure adapter is reachable"})
)
Expand Down
2 changes: 1 addition & 1 deletion helpers/component_info.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "CILIUM",
"type": "adapter",
"next_error_code": 1031
"next_error_code": 1032
}
29 changes: 29 additions & 0 deletions helpers/errorutil_analyze_errors.json
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,14 @@
"code_is_int": true,
"path": "cilium/error.go"
},
{
"name": "ErrFetchIstioVersionsCode",
"old_code": "1031",
"code": "1031",
"code_is_literal": true,
"code_is_int": true,
"path": "cilium/error.go"
},
{
"name": "ErrEmptyConfigCode",
"old_code": "1021",
Expand Down Expand Up @@ -559,6 +567,16 @@
"code_is_int": true,
"path": "cilium/error.go"
}
],
"1031": [
{
"name": "ErrFetchIstioVersionsCode",
"old_code": "1031",
"code": "1031",
"code_is_literal": true,
"code_is_int": true,
"path": "cilium/error.go"
}
]
},
"call_expr_codes": [],
Expand Down Expand Up @@ -641,6 +659,17 @@
"suggested_remediation": ""
}
],
"ErrFetchIstioVersionsCode": [
{
"name": "ErrFetchIstioVersionsCode",
"code": "",
"severity": "Alert",
"long_description": "versions for cilium could not be fetched",
"short_description": "could not get any cilium versions",
"probable_cause": "could not reach github.com/cilium/cilium/releases\nno versions could be fetched from cilium release page",
"suggested_remediation": "make sure adapter is reachable"
}
],
"ErrGetLatestReleaseCode": [
{
"name": "ErrGetLatestReleaseCode",
Expand Down
7 changes: 4 additions & 3 deletions helpers/errorutil_analyze_summary.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"min_code": 1000,
"max_code": 1030,
"next_code": 1031,
"max_code": 1031,
"next_code": 1032,
"duplicate_codes": {},
"duplicate_names": [],
"call_expr_codes": [],
Expand Down Expand Up @@ -36,7 +36,8 @@
1027,
1028,
1029,
1030
1030,
1031
],
"deprecated_new_default": []
}
9 changes: 9 additions & 0 deletions helpers/errorutil_errors_export.json
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,15 @@
"short_description": "Could not get latest version",
"probable_cause": "Latest version could not be found at the specified url",
"suggested_remediation": "Verify network connectivity.\nEnsure github.com is reachable.\nTry retrying the operation."
},
"1031": {
"name": "ErrFetchIstioVersionsCode",
"code": "1031",
"severity": "Alert",
"long_description": "versions for cilium could not be fetched",
"short_description": "could not get any cilium versions",
"probable_cause": "could not reach github.com/cilium/cilium/releases\nno versions could be fetched from cilium release page",
"suggested_remediation": "make sure adapter is reachable"
}
}
}

0 comments on commit f8cd102

Please sign in to comment.