-
Notifications
You must be signed in to change notification settings - Fork 239
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
remove all the log files when running crc delete --clear-cache
#3753
Conversation
11a8823
to
91653b7
Compare
/lgtm |
/hold Till it is tested on windows. |
91653b7
to
c2f0585
Compare
04e33f0
to
e576d38
Compare
/retest |
1 similar comment
/retest |
/test integration-crc |
e576d38
to
8b75bac
Compare
8b75bac
to
704ad09
Compare
@praveenkumar tested on windows as well now, and the behavior is modified to delete all log files on |
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.
Ack from me, just one minor remark regarding one of the comments.
pkg/os/util.go
Outdated
@@ -113,3 +113,17 @@ func RemoveFileIfExists(path string) error { | |||
func RunningUsingSSH() bool { | |||
return os.Getenv("SSH_TTY") != "" | |||
} | |||
|
|||
// RemoveFileGlob takes a glob pattern as string and removes the files that matches |
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.
the files and directories that matches
(because of the use of RemoveAll
)
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.
@cfergeau @praveenkumar after this change we can merge, right?
@anjannath ^^^
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.
updated
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cfergeau The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
currently after crc-org#3720 was merged it is deleting the 'crc.log' and 'crcd.log' files and not deleting the backups this adds deletion of the backed up log files named crc-*.log and removes deletion of the crc.log file which is handled by 'crc cleanup' it removes the deletion of crcd.log file as when delete is performed the daemon still keeps running in the background
this renames the removeOldLogs func to removeAllLogs and uses the 'RemoveFileGlob' func with '*.log' glob which deletes all the log files
this was mistakenly recreated inside the InitLogrus function again
704ad09
to
d61deb2
Compare
New changes are detected. LGTM label has been removed. |
@anjannath: The following tests failed, say
Full PR test history. Your PR dashboard. 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. I understand the commands that are listed here. |
currently after #3720 was merged it is only deleting the
'crc.log' and 'crcd.log' files and not deleting the backups