-
Notifications
You must be signed in to change notification settings - Fork 310
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
model: fast build fields to dockerInfo.buildDetails [ch1136] #888
Conversation
internal/model/docker_info.go
Outdated
@@ -50,3 +50,17 @@ type FastBuild struct { | |||
|
|||
func (FastBuild) buildDetails() {} | |||
func (fb FastBuild) Empty() bool { return reflect.DeepEqual(fb, FastBuild{}) } | |||
|
|||
// func (m1 Manifest) stepsEqual(s2 []Step) bool { |
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.
👀
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!
@@ -104,24 +97,33 @@ func (m Manifest) Dockerignores() []Dockerignore { | |||
func (m Manifest) LocalPaths() []string { | |||
if sbInfo := m.StaticBuildInfo(); !sbInfo.Empty() { |
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.
Could we transform this in to a case statement?
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.
not really, cuz we're looking at the type of two different fields :-/
internal/model/manifest.go
Outdated
return fmt.Errorf( | ||
"[validate] mount.LocalPath must be an absolute path (got: %s)", m.LocalPath) | ||
|
||
if fbInfo := m.FastBuildInfo(); !fbInfo.Empty() { |
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 a lot of indentation, could we move the check about?
if fbInfo := m.FastBuildInfo(); fbInfo.Empty() {
return nil
}
// ...
Hello @jazzdan, @nicks,
Please review the following commits I made in branch maiamcc/fast-build:
8d94a3f (2018-12-21 16:10:23 -0500)
model: fast build fields to dockerInfo.buildDetails
Code review reminders, by giving a LGTM you attest that: