-
Notifications
You must be signed in to change notification settings - Fork 159
feat: Allow buildkit timeout to be configurable #1482
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
Conversation
@hezhizhen Great suggestions! Updated. |
Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>
b605a82
to
7c38416
Compare
assert.Equal(t, time.Second, GetDurationWithDefault("", time.Second), "default value") | ||
t.Setenv("FOO", "bar") | ||
assert.Panics(t, func() { GetDurationWithDefault("FOO", time.Second) }, "bad value") | ||
t.Setenv("FOO", "1h") |
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.
How about using the actual environment variable name?
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.
This is intentional. This is a generic util so I prefer to use something more generic.
if err == nil { | ||
return d | ||
} | ||
log.WithField(key, v).WithError(err).Panic("failed to parse") |
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.
Will Panic()
panic here?
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.
Yes it's intentional since we don't want users to assume that the incorrect config is applied when actually not.
PTAL @hezhizhen |
LGTM |
Thanks for your contribution! 🎉 👍 And Thank @hezhizhen for the review. |
This was needed for me to get everything to run. I'd imagine other users might benefit from this as well.