client icon indicating copy to clipboard operation
client copied to clipboard

Consistency in success and error messages

Open rhuss opened this issue 5 years ago • 14 comments

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.

rhuss avatar Jun 28 '19 16:06 rhuss

This all mostly sounds reasonable to me. Though I am not for automatic translator for messages at this point. Rather a linter (update to the current /lint) that could point out deviations from style guide would be nice. Especially since this could help guarantee consistency now and in future. Best.

maximilien avatar Jul 02 '19 01:07 maximilien

:+1:

Lets tag this for milestone v0.8 release.

navidshaikh avatar Jul 08 '19 05:07 navidshaikh

/milestone v0.8.0

maximilien avatar Jul 08 '19 21:07 maximilien

@maximilien: You must be a member of the knative/knative-milestone-maintainers GitHub team to set the milestone. If you believe you should be able to issue the /milestone command, please contact your and have them propose you as an additional delegate for this responsibility.

In response to this:

/milestone v0.8.0

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.

knative-prow-robot avatar Jul 08 '19 21:07 knative-prow-robot

/milestone v0.8.0

rhuss avatar Jul 09 '19 06:07 rhuss

@rhuss: You must be a member of the knative/knative-milestone-maintainers GitHub team to set the milestone. If you believe you should be able to issue the /milestone command, please contact your and have them propose you as an additional delegate for this responsibility.

In response to this:

/milestone v0.8.0

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.

knative-prow-robot avatar Jul 09 '19 06:07 knative-prow-robot

This issue is stale because it has been open for 90 days with no activity. It will automatically close after 30 more days of inactivity. Reopen the issue with /reopen. Mark the issue as fresh by adding the comment /remove-lifecycle stale.

github-actions[bot] avatar Oct 15 '20 01:10 github-actions[bot]

/remove-lifecycle stale

rhuss avatar Nov 10 '20 10:11 rhuss

This issue is stale because it has been open for 90 days with no activity. It will automatically close after 30 more days of inactivity. Reopen the issue with /reopen. Mark the issue as fresh by adding the comment /remove-lifecycle stale.

github-actions[bot] avatar Feb 09 '21 01:02 github-actions[bot]

/remove-lifecycle stale

dsimansk avatar Feb 12 '21 10:02 dsimansk

This issue is stale because it has been open for 90 days with no activity. It will automatically close after 30 more days of inactivity. Reopen the issue with /reopen. Mark the issue as fresh by adding the comment /remove-lifecycle stale.

github-actions[bot] avatar May 14 '21 01:05 github-actions[bot]

/remove-lifecycle stale

rhuss avatar Jun 01 '21 07:06 rhuss

This issue is stale because it has been open for 90 days with no activity. It will automatically close after 30 more days of inactivity. Reopen the issue with /reopen. Mark the issue as fresh by adding the comment /remove-lifecycle stale.

github-actions[bot] avatar Aug 31 '21 01:08 github-actions[bot]

/remove-lifecycle stale

rhuss avatar Sep 01 '21 17:09 rhuss