-
Notifications
You must be signed in to change notification settings - Fork 71
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
Fixes #28097 - Allow packages update with no packages #286
Conversation
This patch lets packages update command to be invoked without any args to update all packages.
Issues: #28097 |
Aren't we allowing user here to perform upgrade with |
@ntkathole it is already possible we are making it just a bit more easy to use. I see your concern though, updating everything is probably too risky. What others do think? Should we try to detect attempt to update everything and prevent it with deferring to f-m upgrade? @kgaikwad, @upadhyeammit, @gnurag |
I think we should put warning but should not prevent it, because we are doing this change to make it easier to update all packages[if required]. I can think of below use cases, if I missed anything then request to add,
Considering all these I feel warning should be sufficient. |
@mbacovsky, |
Thanks everybody for your input. I'm going to print a warning that packages update should not be used instead of @kgaikwad does your suggestion mean we shouldn't allow |
Yes, by considering the points(1st & 3rd) mentioned by @upadhyeammit and IIRC, in the past few issues were reported by users around |
I've added the confirmation. |
@mbacovsky
Line |
f180c62
to
7d34057
Compare
@jameerpathan111 the output should be fixed now. I've seen the same behavior elsewhere too so it should be fixed globally. @kgaikwad, I agree that allowing users to update everything is not the ideal but it still seems better then forcing users to come up with workaround by providing wildcards or turning the locking off completely. So I used the wording indicating that updating everything is risky and what we recommend but allowed to proceed. Is that acceptable for you? Would it make sense to disable --assumeyes for this situation? |
Yes, it seems to be fixed now. |
+1 for the warning message and asking user before proceeding further. |
@mbacovsky @kgaikwad if we remove --assumeyes option it'll cause problem in customer automation. |
@jameerpathan111 I guess that is the point. This shouldn't be automated at all. Currently we do not support update without parameters. The --assumeyes should stay with the command we will just ignore --assumeyes on parameterless update. We can inform that the option was ignored on purpose. Would that be acceptable? |
yes |
Updated according to our previous discussion. Also please note I loosend the HashSyntax cop a bit from Hash_rocket to no_mixed_keys. The reason was it fails on keyword argument and it seems there is no remedy for that. I checked the setting on Foreman core and this cop is turned off there. If anybody has concerns with this change please speak up. |
metadata do | ||
param :packages, 'List of packages to update', :array => true | ||
|
||
description 'Confirm update all is intentionall' |
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.
s/intentionall/intentional/
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.
@gnurag thanks, updated.
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.
+1 for hashsyntax style no_mixed_keys
.
@upadhyeammit, @gnurag, any additional comments? @jameerpathan111, would you like to do final round of testing with updated changes? |
Nothing else from my side. |
@kgaikwad tested this PR and it works as expected.
This is how output of command now looks like:
|
Thank you @jameerpathan111 for testing this PR. |
Thank you @mbacovsky 🎉 👌 Thanks @upadhyeammit, @gnurag for reviewing this PR |
This patch lets packages update command to be invoked
without any args to update all packages.