-
Notifications
You must be signed in to change notification settings - Fork 83
Conversation
Signed-off-by: Yuvraj <evalsocket@gmail.com>
Signed-off-by: yuvraj <evalsocket@gmail.com>
Signed-off-by: yuvraj <evalsocket@gmail.com>
Signed-off-by: Yuvraj <yuvraj.yad001@gmail.com>
@kumare3 pr is ready you can review it. |
Signed-off-by: yuvraj <evalsocket@gmail.com>
Signed-off-by: yuvraj <evalsocket@gmail.com>
Codecov Report
@@ Coverage Diff @@
## master #41 +/- ##
==========================================
+ Coverage 45.77% 45.98% +0.20%
==========================================
Files 34 35 +1
Lines 1018 1046 +28
==========================================
+ Hits 466 481 +15
- Misses 482 491 +9
- Partials 70 74 +4
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Signed-off-by: yuvraj <evalsocket@gmail.com>
@EngHabu currently we are printing output of version command in log. Do you have any suggestions? ➜ flytectl git:(version) ✗ ./bin/flytectl version
Warn: No metricsProvider set for the workqueue
INFO[0000] Using config file: [config.yaml]
INFO[0000] Config section [adminutils] updated. No update handler registered. src="viper.go:318"
INFO[0000] Config section [root] updated. No update handler registered. src="viper.go:318"
INFO[0000] Config section [logger] updated. Firing updated event. src="viper.go:320"
{"json":{"src":"viper.go:320"},"level":"info","msg":"Config section [admin] updated. Firing updated event.","ts":"2021-03-27T01:15:03+05:30"}
{"json":{"src":"viper.go:318"},"level":"info","msg":"Config section [storage] updated. No update handler registered.","ts":"2021-03-27T01:15:03+05:30"}
{"json":{"src":"client.go:30"},"level":"info","msg":"Initialized Admin client","ts":"2021-03-27T01:15:03+05:30"}
{"json":{},"level":"info","msg":"------------------------------------------------------------------------","ts":"2021-03-27T01:15:03+05:30"}
{"json":{},"level":"info","msg":"App [flytectl], Version [43f10a7], BuildSHA [43f10a7], BuildTS [2021-03-27 01:15:03.871811 +0530 IST m=+0.081155335]","ts":"2021-03-27T01:15:03+05:30"}
{"json":{},"level":"info","msg":"------------------------------------------------------------------------","ts":"2021-03-27T01:15:03+05:30"}
{"json":{},"level":"info","msg":"------------------------------------------------------------------------","ts":"2021-03-27T01:15:03+05:30"}
{"json":{},"level":"info","msg":"App [flyteadmin], Version [v0.3.7-47-gfa70a14], BuildSHA [fa70a14], BuildTS [2021-03-26 19:41:13.043553376 +0000 UTC m=+0.352678459]","ts":"2021-03-27T01:15:03+05:30"}
{"json":{},"level":"info","msg":"------------------------------------------------------------------------","ts":"2021-03-27T01:15:03+05:30"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can also set formatter to Text if the goal is to see this in a terminal (will look nicer):
https://github.com/flyteorg/flytestdlib/blob/master/logger/config.go#L27
cmd/version/version.go
Outdated
} | ||
|
||
func PrintVersion(appName string, res *admin.GetVersionResponse) { | ||
logrus.Info("------------------------------------------------------------------------") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
plz use logger
from stdlib...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@EngHabu I can make these changes....but it's a command....we can't add its output in the log. I found that flytestdlib version package only prints the version in the log(We need to set the log level to print output). Printing log in JSON formate is not the solution in this case because it's log, not a output of a command
Signed-off-by: yuvraj <evalsocket@gmail.com>
Signed-off-by: yuvraj <evalsocket@gmail.com>
Signed-off-by: yuvraj <evalsocket@gmail.com>
TL;DR
Added version command. It should return flytectl and flyteadmin version.
Type
Are all requirements met?
Complete description
Tracking Issue
flyteorg/flyte#173
Follow-up issue