-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Move duration opts into an opts package #77
Conversation
c6bfb3f
to
db3d4ef
Compare
@vdemeester should we consider moving the moby/opts package to docker/cli repo as part of the reorg effort ? #62 is having a similar issue and @abhinandanpb decided to add the option as part of moby/opts to bring it back into docker/cli as part of the reorg. WDYT ? |
@mavenugo yes, I think @dnephin opened an issue in |
I agree with this change, but I think we should move in moby/moby/opts first, otherwise this is going to cause a bunch of conflicts |
Discussed it with @dnephin, preparing a PR for the move of |
opts/duration.go
Outdated
) | ||
|
||
// PositiveDurationOpt is an option type for time.Duration that uses a pointer. | ||
// It bahave similarly to DurationOpt but only allows positive duration values. |
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.
"behave"
Seems okay as a temporary step, but I think it's better to remove However, if you do this, make sure it doesn't affect the CLI help output, because I remember there were some differences between how they format defaults. IIRC, |
9389df1
to
7bd5712
Compare
Updated and rebase 👼 |
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.
build is failing
cli/command/service/opts.go
Outdated
limitMemBytes opts.MemBytes | ||
resCPU opts.NanoCPUs | ||
resMemBytes opts.MemBytes | ||
limitCPU dopts.NanoCPUs |
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.
dopts
doesn't exist
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.
yep, bad rebase 😝
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.
should be fixed and green 📗
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.
lol, I was actually looking at that and scratching my head if I overlooked something 😄
They have nothing to do with service and could be used on their own. Signed-off-by: Vincent Demeester <vincent@sbr.pm>
7bd5712
to
b5182ba
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
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
holding of merging, because there's some other PR's that are needed for 17.06, not sure if they're affected
removing the milestone, because I don't know if this ends up in 17.06 or 17.07 |
They have nothing to do with service and could be used on their own.
🦁
– doing that because I wanted to re-use it without having to import/vendor
service
package.Signed-off-by: Vincent Demeester vincent@sbr.pm