-
Notifications
You must be signed in to change notification settings - Fork 53
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
Issue #332 - Uninstalling all older gems when autoupdating #493
base: master
Are you sure you want to change the base?
Conversation
Job #493 is now in scope, role is |
This pull request #493 is assigned to @SergeyKutsko/z, here is why; the budget is 15 minutes, see §4; please, read §27 and when you decide to accept the changes, inform @yegor256/z (the architect) right in this ticket; if you decide that this PR should not be accepted ever, also inform the architect; this blog post will help you understand what is expected from a code reviewer; there will be no monetary reward for this job |
Codecov Report
@@ Coverage Diff @@
## master #493 +/- ##
=========================================
- Coverage 33.42% 33.1% -0.32%
=========================================
Files 63 62 -1
Lines 2941 2945 +4
=========================================
- Hits 983 975 -8
- Misses 1958 1970 +12
Continue to review full report at Codecov.
|
@yegor256 I think it ready to go. |
@SergeyKutsko/z this job was assigned to you 5days ago. It will be taken away from you soon, unless you close it, see §8. Read this and this, please. |
@egor256 take a look!
28 окт. 2018 г. 10:44 AM пользователь "Zerocrat" <[email protected]>
написал:
@SergeyKutsko <https://github.com/SergeyKutsko>/z
<https://www.0crat.com/u/sergeykutsko> this job was assigned to you 5days
ago. It will be taken away from you soon, unless you close it, see §8
<http://www.zerocracy.com/policy.html#8>. Read this
<http://www.yegor256.com/2014/04/13/no-obligations-principle.html> and this
<http://www.yegor256.com/2014/11/24/principles-of-bug-tracking.html>,
please.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#493 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAZ6ZsvTme-jaFeUkLEbzD4huH2EsyuHks5upW5-gaJpZM4Xcqh3>
.
|
fixtures/scripts/_head.sh
Outdated
@@ -67,3 +67,11 @@ function halt_nodes { | |||
done | |||
} | |||
|
|||
function check_old_version_uninstalled { |
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.
@emilianodellacasa why this code is in the head
if it's used only in one script?
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.
@yegor256 Ok, removed the function
@emilianodellacasa see above |
@yegor256 All issues have been addressed |
@@ -287,7 +287,9 @@ def nohup(opts) | |||
begin | |||
code = exec("#{myself} #{args.join(' ')}", nohup_log) | |||
raise "Exit code is #{code}" if code != 0 | |||
exec(opts['nohup-command'], nohup_log) | |||
Open3.popen3('gem uninstall zold -a --ignore-dependencies') do | |||
exec(opts['nohup-command'], nohup_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.
@emilianodellacasa this looks a bit weird... First, we won't see the output of that uninstall
. Second, what if the user wants to change the command and do sudo gem uninstall
? It's impossible, right? I would better simply change the default command in nohup-command
to something like gem uninstall && gem install
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.
@yegor256 What if we add another option to ./zold
to change the uninstall
command to whatever the user wants? Also, I don't see the problem in not showing the output of the uninstall
, the user won't see it anyway.
Lastly, by including the uninstall
command in the nohup-command
as you propose , user could skip that part and I think it is important that there is only one instance of Zold gem running.
@emilianodellacasa see above |
@yegor256 see my comments above |
@emilianodellacasa @yegor256 So what we need update to get this task merged? |
@yegor256 When I uninstall Does |
@SergeyKutsko I am waiting for some comments from @yegor256 |
@emilianodellacasa I'm not sure. How it works in Ruby? |
@yegor256 Actually, zold-score should auto update as well, so it will be better to uninstall that gem as well before reinstalling zold (and, consequently, zold-score) |
In order to solve issue #332 I modified the code to execute a command to delete all older versions of Zold when auto updating