Skip to content
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

Merged
merged 5 commits into from
Dec 21, 2018

Conversation

maiamcc
Copy link
Contributor

@maiamcc maiamcc commented Dec 21, 2018

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:

  • Commits are adequately tested
  • Code is easy to understand and conforms to style guides
  • Incomplete code is marked with TODOs
  • Code is suitably instrumented with logging and metrics

@maiamcc maiamcc requested review from jazzdan and nicks December 21, 2018 21:10
@@ -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 {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👀

Copy link
Contributor

@jazzdan jazzdan left a 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() {
Copy link
Contributor

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?

Copy link
Contributor Author

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 :-/

return fmt.Errorf(
"[validate] mount.LocalPath must be an absolute path (got: %s)", m.LocalPath)

if fbInfo := m.FastBuildInfo(); !fbInfo.Empty() {
Copy link
Contributor

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
}
// ... 

@maiamcc maiamcc merged commit 222dfc5 into master Dec 21, 2018
@maiamcc maiamcc deleted the maiamcc/fast-build branch December 21, 2018 23:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants