knative / knative/client

Consistency in success and error messages

Open
#213 14 comments 3 reactions 1 assignee Claimed by @rhuss View on GitHub
triage/accepted
Dominant language
Go
Stars
387
Forks
274
Avg merge
1d 6h
Merged PRs (30d)
8

Description

At the moment we have some inconsistencies when it comes to messages. There are also no written rules how messages should look like.

Examples:

```
Service 'k8s-event-display' successfully created in namespace 'default'.
Service 'k8s-event-display' updated in namespace 'default'.
services.serving.knative.dev "k8s-event-display" already exists
```

Issues:

* Different quoting (reason: Error message was given through directly)
* "successfully created" vs. "updated". I'm all for removing "successfully" everywhere as this is a tautology.
* "Service" vs. "services.serving.knative.dev". The latter comes from an error message directly handed through. I think we should massage this message and map it to a Service
* dot at the end of the sentence vs. not. Again, because error message don't have dots vs. our messages that have dots at the end.

Of course, this can not be fully automatable checked, but we could:

* Write a style guide which could be used as a reference in PR reviews
* For some rules we can write an automatic translator. E.g we could have a `prepareErrorMessage(err)` which would upercase the the first letter, translates CRDs names and adds a dot to the end. And maybe even an "ERROR: " prefix.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.