-
Notifications
You must be signed in to change notification settings - Fork 47
Conversation
6efb011
to
9e346e0
Compare
c02067c
to
1e1b630
Compare
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.
Overall looks good to me. Nice work
1e1b630
to
5c70ab8
Compare
@@ -23,6 +23,7 @@ import ( | |||
|
|||
"github.com/kinvolk/lokomotive/pkg/components" | |||
"github.com/kinvolk/lokomotive/pkg/components/util" | |||
"github.com/kinvolk/lokomotive/pkg/config" |
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 think all the component delete code can be coalesced into one commit. It is very confusing to read some change here and some change there. I think it makes sense to add them all to one commit and then list all the changes that have happened.
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.
If you want to review changes aggregated, you can use git diff
with range or "Changed files" tab in GitHub UI. I wouldn't lose the information of those changes, as each of them is a small independent step making things a bit better.
Also, having more commits makes bisecting easier in case of bugs, which definitely might be introduced by those changes.
5c70ab8
to
e2efa62
Compare
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.
Code is ok, please change the name of func to make it more understandable what it is doing.
To remove a dependency on log.Entry to make moving this code around easier and to avoid hiding function complexity from logger. Part of #630 Signed-off-by: Mateusz Gozdek <mateusz@kinvolk.io>
To remove a dependency on log.Entry to make moving this code around easier and to avoid hiding function complexity from logger. Also, it no longer requires logger, so argument has been removed. Part of #630 Signed-off-by: Mateusz Gozdek <mateusz@kinvolk.io>
To remove a dependency on log.Entry to make moving this code around easier and to avoid hiding function complexity from logger. Also, it no longer requires logger, so argument has been removed. Part of #630 Signed-off-by: Mateusz Gozdek <mateusz@kinvolk.io>
To remove a dependency on log.Entry to make moving this code around easier and to avoid hiding function complexity from logger. Part of #630 Signed-off-by: Mateusz Gozdek <mateusz@kinvolk.io>
To soften the dependency on log.Entry and to separate it strictly from *cobra.Command, so it is easier to move this code around in the future. Part of #630 Signed-off-by: Mateusz Gozdek <mateusz@kinvolk.io>
So they are easier to trace if something fails, which makes debugging easier. Signed-off-by: Mateusz Gozdek <mateusz@kinvolk.io>
To make tracing and debugging easier. Signed-off-by: Mateusz Gozdek <mateusz@kinvolk.io>
So it can be moved to function which can be shared with component apply code. Signed-off-by: Mateusz Gozdek <mateusz@kinvolk.io>
By moving confirmation message declaration from function call into a variable. Signed-off-by: Mateusz Gozdek <mateusz@kinvolk.io>
So code can be re-used in component apply function. Signed-off-by: Mateusz Gozdek <mateusz@kinvolk.io>
To de-duplicate logic of selecting components to operate on. Signed-off-by: Mateusz Gozdek <mateusz@kinvolk.io>
As it does not add any value, as we create a slice of objects anyway instead of specifying them by hand. Signed-off-by: Mateusz Gozdek <mateusz@kinvolk.io>
As it does not add any value, as we create a slice of objects anyway instead of specifying them by hand. Signed-off-by: Mateusz Gozdek <mateusz@kinvolk.io>
Instead of slice of names. This shifts the error handling of getting components to earlier stage, so we don't apply one component and then fail, because other one does not exist. Signed-off-by: Mateusz Gozdek <mateusz@kinvolk.io>
To make distinction between this function and componentApply() more clear. Signed-off-by: Mateusz Gozdek <mateusz@kinvolk.io>
e2efa62
to
d62bba8
Compare
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.
LGTM
Includes commits from #1013Part of #603.