-
Notifications
You must be signed in to change notification settings - Fork 18
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
Track container events, reworked Deployment management #334
Conversation
Potential fix for `npm ERR! Maximum call stack size exceeded` in Travis builds: npm/npm#17056
Reverts most of the changes for <-chan error
… daemon/#161-container-failures
0e112c4
to
cb721ff
Compare
Codecov Report
@@ Coverage Diff @@
## master #334 +/- ##
==========================================
+ Coverage 40.16% 43.78% +3.63%
==========================================
Files 57 58 +1
Lines 3230 3287 +57
==========================================
+ Hits 1297 1439 +142
+ Misses 1779 1663 -116
- Partials 154 185 +31
Continue to review full report at Codecov.
|
b213982
to
98b8d33
Compare
Forgot to add `for` to loop perpetually
daemon/inertiad/build/builder.go
Outdated
return nil, errors.New("Build exited with non-zero status: " + strconv.FormatInt(status, 10)) | ||
if status.StatusCode != 0 { | ||
return nil, fmt.Errorf( | ||
"Build exited with non-zero status %s", strconv.FormatInt(status.StatusCode, 10)) |
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.
Couldn't we just straight pass it into instead of casting?
daemon/inertiad/build/builder.go
Outdated
close(stop) | ||
if err != nil { | ||
return nil, err | ||
statusCh, errCh := cli.ContainerWait(ctx, resp.ID, "") |
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.
Seems like a bit of duplicate code is here. I think it would be nice to have a helper function instead.
daemon/inertiad/daemon.go
Outdated
"github.com/ubclaunchpad/inertia/daemon/inertiad/crypto" | ||
"github.com/ubclaunchpad/inertia/daemon/inertiad/project" | ||
) | ||
|
||
const ( | ||
msgNoDeployment = "No deployment is currently active on this remote - try running 'inertia $REMOTE up'" |
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.
Standardization please. [remote]
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.
Didn't run it yet. Just syntax stuff.
} | ||
defer cli.Close() | ||
|
||
if status, _ := deployment.GetStatus(cli); len(status.Containers) == 0 { |
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.
💯
}, | ||
logger, | ||
) | ||
if err != nil { | ||
logger.WriteErr(err.Error(), http.StatusPreconditionFailed) | ||
return | ||
} | ||
deployment = d |
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
14add4e
to
2bdc799
Compare
🎟️ Ticket(s): Closes #161, improves #237, closes #323
👷 Changes
🔦 Testing Instructions
You should get: