Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

let's have the most useful output! #65

Closed
TomasTomecek opened this issue Apr 6, 2018 · 8 comments
Closed

let's have the most useful output! #65

TomasTomecek opened this issue Apr 6, 2018 · 8 comments

Comments

@TomasTomecek
Copy link
Member

TomasTomecek commented Apr 6, 2018

This is something I deeply care about that why I'm such a PITA about it.

After I tried colin recently, I was overwhelmed by the output: there was too much info for me and it wasn't easy to read. One suggestion I have here is to color only lines such as nok:failed:bzcomponent_deprecated and not the description.

The other thing I'm thinking about is the line itself; would it be better to have something like this?

failed   Deprecated label BZComponent is used.

Since we have almighty @jpopelka on our team now, I have an idea: Jirko, would you be so kind and played with colin a bit a tell us your opinion about the output and your user experience?

Franto, I understand if you are now like "what the funk is this guy's problem", but as I said, I would love if colin had an awesome output which suits everyone and the tool is such a pleasure to be used. I think we are heading there, I just want to make sure we get there. Happy Friday!

@lachmanfrantisek
Copy link
Member

@TomasTomecek I have no problem with that..;-) Only using the tool gives us the right answer to design.

@lachmanfrantisek
Copy link
Member

One idea to that topic -- I personally don't like the WARN/ERROR log messages shown by default. I think the regular user does not need to see that. (Only the last line with one line error description.)

@TomasTomecek
Copy link
Member Author

@lachmanfrantisek I agree; would you be interested in adding a real output here so we can see how it could look?

@lachmanfrantisek
Copy link
Member

$ colin -c fedora fedoraa
11:32:43.422 target.py         ERROR  Target is neither image nor container.
11:32:43.423 colin.py          ERROR  An error occurred: ColinException('Target not found.',)
Error: Target not found.

--->

$ colin -c fedora fedoraa
Error: Target not found.

:
nok:warning:maintainer_label_required
   -> Label 'maintainer' has to be specified.
   -> The name and email of the maintainer (usually the submitter).
   -> https://fedoraproject.org/wiki/Container:Guidelines#LABELS
Failed to mount OverlayFS device.
mount: pouze superuživatel může použít přepínač „--options“

11:31:54.647 colin.py          ERROR  An error occurred: ColinException("Problem with mounting filesystem with atomic. (Command '['atomic', 'mount', 'fedora:latest', '/tmp/conup13_x81x']' returned non-zero exit status 1.)",)
Error: Problem with mounting filesystem with atomic. (Command '['atomic', 'mount', 'fedora:latest', '/tmp/conup13_x81x']' returned non-zero exit status 1.)

-->

:
nok:warning:maintainer_label_required
   -> Label 'maintainer' has to be specified.
   -> The name and email of the maintainer (usually the submitter).
   -> https://fedoraproject.org/wiki/Container:Guidelines#LABELS
Error: Problem with mounting filesystem with atomic. (Command '['atomic', 'mount', 'fedora:latest', '/tmp/conup13_x81x']' returned non-zero exit status 1.)

@lachmanfrantisek
Copy link
Member

lachmanfrantisek commented Apr 18, 2018

I've changed s/warning/warn, s/passed/pass and s/failed/fail to have the same length.


Actual state:

$  colin -r redhat sad_feynman 
LABELS:
fail : Label 'io.k8s.description' has to be specified.
pass : Label 'Architecture' is deprecated.
pass : Label 'Release' is deprecated.
warn : Label 'vcs-url' has to be specified.
pass : Label 'maintainer' has to be specified.
warn : Label 'io.openshift.expose-services' has to be specified.
pass : Label 'maintainer' has to be specified.
Error: Problem with mounting filesystem with atomic. (Command '['atomic', 'mount', 'sad_feynman', '/tmp/conucge6706i']' returned non-zero exit status 1.)
$ sudo colin -r redhat sad_feynman 
LABELS:
fail : Label 'io.k8s.description' has to be specified.
pass : Label 'Architecture' is deprecated.
warn : Label 'io.openshift.expose-services' has to be specified.
pass : Label 'maintainer' has to be specified.
BEST_PRACTICES:
fail : The 'helpfile' has to be provided.
pass : Cmd or Entrypoint has to be specified
fail : Service should not run as root by default.

$ colin -r redhat sad_feynman --stat
LABELS:xxxxxxxxx.......!.!.
Error: Problem with mounting filesystem with atomic. (Command '['atomic', 'mount', 'sad_feynman', '/tmp/conuhg9ce7j0']' returned non-zero exit status 1.)
$ sudo colin -r redhat sad_feynman --stat
LABELS:xxxxxxxxx.......!.!.
BEST_PRACTICES:x.x

$ colin -r redhat sad_feynman --verbose
14:40:50.373 backend.py        INFO   conu has initiated, welcome to the party!
14:40:50.388 __init__.py       INFO   docker environment info: 'Client:\n Version:         1.13.1\n API version:     1.26\n Package version: docker-1.13.1-51.git4032bd5.fc27.x86_64\n Go version:      go1.9.4\n Git commit:      7f1fa5c-unsupported\n Built:           Wed Mar 28 13:58:10 2018\n OS/Arch:         linux/amd64\n\nServer:\n Version:         1.13.1\n API version:     1.26 (minimum version 1.12)\n Package version: docker-1.13.1-51.git4032bd5.fc27.x86_64\n Go version:      go1.9.4\n Git commit:      7f1fa5c-unsupported\n Built:           Wed Mar 28 13:58:10 2018\n OS/Arch:         linux/amd64\n Experimental:    false\n'
LABELS:
fail : Label 'name' has to be specified.
    -> Name of the Image or Container.
    -> https://fedoraproject.org/wiki/Container:Guidelines#LABELS
fail : Label 'io.k8s.description' has to be specified.
    -> Description of the container displayed in Kubernetes
    -> https://github.com/projectatomic/ContainerApplicationGenericLabels/blob/master/vendor/redhat/labels.md
pass : Label 'Architecture' is deprecated.
    -> Replace with 'architecture'.
    -> ?????
pass : Label 'BZComponent' is deprecated.
    -> Replace with 'com.redhat.component'.
    -> ?????

@phracek
Copy link
Member

phracek commented Apr 18, 2018

@lachmanfrantisek Would it be possible to remove spaces between release and description / message.

Not like fail : message but fail:message

[EDIT] I don't know if it makes sense.

@lachmanfrantisek
Copy link
Member

@phracek Isn't it less readable?

$ colin -r redhat sad_feynman --verbose
LABELS:
fail:Label 'name' has to be specified.
  -> Name of the Image or Container.
  -> https://fedoraproject.org/wiki/Container:Guidelines#LABELS
$ colin -r redhat sad_feynman 
LABELS:
fail:Label 'name' has to be specified.
fail:Label 'com.redhat.component' has to be specified.
fail:Label 'summary' has to be specified.
fail:Label 'version' has to be specified.

@lachmanfrantisek
Copy link
Member

One another question:

Do we want INFO debug messages with --verbose?

(I am thinking about printing logs only in the --debug...)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants