Skip to content

Commit

Permalink
Fix renamed file
Browse files Browse the repository at this point in the history
Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com>
  • Loading branch information
dimitarvdimitrov committed Apr 26, 2024
1 parent 069ef53 commit 8cf56e7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/internal/contributing/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ We document the common user-visible errors so it is easy for the user to search

To add a new error:

- Under `pkg/util/globalerror/errors.go`, create a new unique ID string as a constant. After your changes make it into a public release, do not change this string.
- Under `pkg/util/globalerror/user.go`, create a new unique ID string as a constant. After your changes make it into a public release, do not change this string.
- When returning the error, use one of the functions in `globalerror` to generate the message. If you return the same error from multiple places, create a new function to return that error so that its message string is defined in only one place. Then, add a simple test for that function to compare its actual output with the expected message which is defined as a hard-coded string.
- Update the runbook in `docs/sources/mimir/manage/mimir-runbooks/_index.md` with details about why the error happens, and if possible how to address it.

Expand Down
2 changes: 1 addition & 1 deletion tools/lint-runbooks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ for ALERT in $ALERTS; do
done

# List all global error IDs.
if ! ERROR_IDS=$(${SED_BIN} --quiet -E 's/^.*ID\s+=\s+"([^"]+)"$/\1/p' "${SCRIPT_DIR}/../pkg/util/globalerror/errors.go"); then
if ! ERROR_IDS=$(${SED_BIN} --quiet -E 's/^.*ID\s+=\s+"([^"]+)"$/\1/p' "${SCRIPT_DIR}/../pkg/util/globalerror/user.go"); then
echo "Unable to list error IDs. Got output:"
echo "$ERROR_IDS"
exit 1
Expand Down

0 comments on commit 8cf56e7

Please sign in to comment.