-
Notifications
You must be signed in to change notification settings - Fork 187
Incremental deploys #817
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
Incremental deploys #817
Conversation
@@ -0,0 +1,5 @@ | |||
package com.hubspot.singularity; | |||
|
|||
public enum DeployStyle { |
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.
I don't want to overcomplicate things, but I wonder about the merits of an enum vs. being able to define a batch size for the deploy that defaults to the total instance count (i.e. a "normal" deploy)
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.
Yeah, that's fair, might keep it simpler in the end, move towards all deploys working the same, but 'regular' deploys are just everything at once
478b99a
to
d5d15c4
Compare
50f69f9
to
d5dc040
Compare
c29aecb
to
81d0e93
Compare
81d0e93
to
036092e
Compare
The basics are working now. All deploys now use a similar system where progress is tracked in the pending deploy object, incrementing a target number of instances for each step of the deploy. By default the number of instances per deploy step is the total instances (i.e. everything at once like before) unless a Some info is surfaced in the ui now on the request page, but the wording/design could probably still be a bit cleaner. |
@@ -169,7 +177,10 @@ public SingularityDeployBuilder toBuilder() { | |||
.setEnv(copyOfMap(env)) | |||
.setUris(copyOfList(uris)) | |||
.setExecutorData(executorData) | |||
.setLabels(labels); | |||
.setLabels(labels) | |||
|
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.
^ can you remove the newline? can get confusing in a builder block
95c22e8
to
e2cb224
Compare
@@ -50,6 +51,7 @@ | |||
@Api(description="Manages Singularity Deploys for existing requests", value=DeployResource.PATH, position=2) | |||
public class DeployResource extends AbstractRequestResource { | |||
public static final String PATH = SingularityService.API_BASE_PATH + "/deploys"; | |||
public static final int DEFAULT_DEPLOY_STEP_WAIT_TIME_SECONDS = 60; |
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.
@tpetr was debating making the default wait time 0, would that make more sense? i.e. move on to the next step as soon as the previous is finished 'rolling deploy', by default
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.
yeah i think that jives with the incremental deploy idea
@tpetr @wsorenson finished a bunch of refactoring on this to slim down the methods. Also added more tests for canceled/failed deploy scenarios. Let me know if you see anything else in here that's needs updating |
return targetActiveInstances; | ||
} | ||
|
||
@Override public String toString() { |
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 recent intellij thing that started happening, might not be a setting that the eclipse formatter file sets. i think it'd be good to keep all our @Override
's on their own line
Still needs plenty of work, but opening up early for feedback.
Right now I am adding a field to the
SingularityPendingDeploy
object that will track the progress of an incremental deploy as it goes along. This new field is an object that holds information about the current target number of instances and rate at which the deploy should proceed.Still to-do:
SingularityPendingDeploy
object)/cc @tpetr @wsorenson