Use spf13/cobra for docker update#23281
Conversation
596ab91 to
e5a132e
Compare
|
LGTM |
|
sorry @yongtang, this one needs a rebase as well 😢 |
e5a132e to
ddc8984
Compare
|
Thanks @thaJeztah. The PR has been rebased. |
There was a problem hiding this comment.
I feel the pointer should stay the same 👼
There was a problem hiding this comment.
Thanks @vdemeester. Are you referring to changing the fields of updateOptions to pointers and always prefix with fl (like old version) as below?
type updateOptions struct {
flblkioWeight *uint16
flCPUPeriod *int64
flCPUQuota *int64
...
}
There was a problem hiding this comment.
Change
Memory: memory,
to
Memory: flMemory,
?
There was a problem hiding this comment.
I see. Let me update the pull request.
There was a problem hiding this comment.
Thanks @vdemeester the pointers has been changed and PR has been updated. Let me know if there are any issues.
|
What the?? On gccgo: |
ddc8984 to
da925d5
Compare
|
Thanks @icecrime for the review. I am hoping the failure is a one-time failure but I will keep an eye on it in case it is repeatable. |
|
ping @vdemeester PTAL |
There was a problem hiding this comment.
I don't think pointer are needed there, just in the resource struct 👼
There was a problem hiding this comment.
Thanks @vdemeester but if we don't use pointers like
blkioWeight *uint16
...
cpuShares *int64
here, we may not be able to reference pointers in resource
BlkioWeight: *opts.blkioWeight,
....
CPUShares: *opts.cpuShares,
as well?
Maybe I missed something?
4f9cddd to
4d7d52a
Compare
4d7d52a to
9ba56aa
Compare
|
Sorry @yongtang, this needs a rebase now 😢 |
9ba56aa to
ea58396
Compare
|
Thanks @thaJeztah the pull request has been rebased. |
|
Ping @vdemeester @thaJeztah. |
There was a problem hiding this comment.
Use flags.Uint16Var to avoid pointers. Take api/client/container/run.go as reference. Thanks!
|
@yongtang Sorry for delay! Let me know if you want us to carry PR. |
ea58396 to
28ba5e7
Compare
|
@LK4D4 Thanks for the review. I updated the pull request to change the |
There was a problem hiding this comment.
Please use Var stuff for all options.
This fix is part of the effort to convert commands to spf13/cobra moby#23211. Thif fix coverted command `docker update` to use spf13/cobra Signed-off-by: Yong Tang <[email protected]>
28ba5e7 to
9765593
Compare
|
Thanks @LK4D4 The pull request has been updated. Please let me know if there are any other issues. |
|
@yongtang perfect! I'll merge if ci pass. |
|
LGTM 🐮 assuming it's green 😇 |
This fix is part of the effort to convert commands to spf13/cobra #23211.
Thif fix coverted command
docker updateto use spf13/cobraSigned-off-by: Yong Tang [email protected]