-
Notifications
You must be signed in to change notification settings - Fork 61
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
removed ODO log command #4566
removed ODO log command #4566
Conversation
Signed-off-by: msivasubramaniaan <msivasub@redhat.com>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4566 +/- ##
===========================================
+ Coverage 32.37% 43.81% +11.44%
===========================================
Files 85 99 +14
Lines 6505 8052 +1547
Branches 1349 1709 +360
===========================================
+ Hits 2106 3528 +1422
- Misses 4399 4524 +125 ☔ View full report in Codecov by Sentry. |
Signed-off-by: msivasubramaniaan <msivasub@redhat.com>
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.
Once we don't use show&watch logs - shouldn't we remove the commands themselves here:
vscode-openshift-tools/src/odo/command.ts
Lines 49 to 61 in 3d7ccfc
static showLog(platform?: string): CommandText { | |
const result = new CommandText('odo', 'logs', [ | |
new CommandOption('--dev'), | |
]); | |
if (platform) { | |
result.addOption(new CommandOption('--platform', platform)); | |
} | |
return result; | |
} | |
static showLogAndFollow(platform?: string): CommandText { | |
return Command.showLog(platform).addOption(new CommandOption('--follow')); | |
} |
@vsCommand('openshift.component.log', true) | ||
static async log(componentFolder: ComponentWorkspaceFolder): Promise<void> { | ||
const componentName = componentFolder.component.devfileData.devfile.metadata.name; | ||
const showLogCmd = Command.showLog(Component.getDevPlatform(componentFolder)); |
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.
Shouldn't we remove the command itself then?
@vsCommand('openshift.component.followLog', true) | ||
static async followLog(componentFolder: ComponentWorkspaceFolder): Promise<void> { | ||
const componentName = componentFolder.component.devfileData.devfile.metadata.name; | ||
const showLogCmd = Command.showLogAndFollow(Component.getDevPlatform(componentFolder)); |
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.
Same here. Shouldn't we remove the command itself?
@@ -230,10 +230,6 @@ | |||
"onCommand:openshift.component.describe", | |||
"onCommand:openshift.component.openInBrowser", | |||
"onCommand:openshift.component.describe.palette", | |||
"onCommand:openshift.component.log", |
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.
@vrubezhny I removed the command as well
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.
Seems good to me. Thanks, Muthu!
@msivasubramaniaan Please take a look at #4566 (review) - I mean, you're removing all the "show/watch log"-like commands from palette/context menu/etc., but you're not removing the code in
... which look like aren't used anymore (after your PR is merged). Do you want to keep these methods for any reason? |
Signed-off-by: msivasubramaniaan <msivasub@redhat.com>
@vrubezhny yes you were right. I removed those implementation as well. But I expect that compiler will show error/warning on the unused code. Need to add |
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.
Is it necessary to delete these two tests entirely? If odo log
gets replaced by different solution, these tests could be still used.. (Maybe some changes would be needed, but the workflow could stay the same)
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.
As plan to get rid of ODO, I removed the whole code and these log functionality is working through oc logs
. But not in the component level. It will be on deployment and pod level.
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.
I still think it is pretty handy to be able to check the logs in component view and not having to look for the right deployment in the deployments view..
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.
Look good to me. Thanks!
Ref: #4396
Removed
Show Log
andFollow Log
on the dropdown of component. We can useWatch Logs
onDeployments
andPods
in application explorer view.