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

Add option to also bounce when scaling #795

Merged
merged 9 commits into from Dec 18, 2015

Conversation

Projects
None yet
3 participants
@ssalinas
Member

ssalinas commented Dec 10, 2015

screen shot 2015-12-10 at 10 12 58 am
(extra options for incremental bounce only appear when bounce is checked)

Show outdated Hide outdated SingularityUI/app/models/Request.coffee
return unless data
bounce = $('.vex #bounce').is ':checked'
incremental = $('.vex #incremental-bounce').is ':checked'
@scale(data, bounce, incremental).done =>

This comment has been minimized.

@tpetr

tpetr Dec 10, 2015

Member

how come you're passing bounce and incremental to @scale()?

@tpetr

tpetr Dec 10, 2015

Member

how come you're passing bounce and incremental to @scale()?

Show outdated Hide outdated SingularityUI/app/templates/vex/requestScale.hbs
$(".vex #incremental-bounce-option").show();
else
$(".vex #incremental-bounce-option").hide();
}

This comment has been minimized.

@tpetr

tpetr Dec 10, 2015

Member

we should figure out a way to do this in the view instead

@tpetr

tpetr Dec 10, 2015

Member

we should figure out a way to do this in the view instead

@ssalinas

This comment has been minimized.

Show comment
Hide comment
@ssalinas

ssalinas Dec 10, 2015

Member

@tpetr updated form your comments, also the checkbox label just says "Bounce after scaling" now

Member

ssalinas commented Dec 10, 2015

@tpetr updated form your comments, also the checkbox label just says "Bounce after scaling" now

@ssalinas

This comment has been minimized.

Show comment
Hide comment
@ssalinas

ssalinas Dec 15, 2015

Member

Added a field in the request so that you can default that box to checked if you want

Member

ssalinas commented Dec 15, 2015

Added a field in the request so that you can default that box to checked if you want

Show outdated Hide outdated ...larityBase/src/main/java/com/hubspot/singularity/SingularityRequest.java
@@ -229,6 +232,10 @@ public ScheduleType getScheduleTypeSafe() {
return readOnlyGroups;
}
public boolean isBounceAfterScale() {

This comment has been minimized.

@wsorenson

wsorenson Dec 17, 2015

Member

You need one that is the Json getter that just returns the actual value.

If you want to add a helper, you should @JsonIGnore it.

@wsorenson

wsorenson Dec 17, 2015

Member

You need one that is the Json getter that just returns the actual value.

If you want to add a helper, you should @JsonIGnore it.

@wsorenson

This comment has been minimized.

Show comment
Hide comment
@wsorenson

wsorenson Dec 17, 2015

Member

Is the request option only used by the UI?

Member

wsorenson commented Dec 17, 2015

Is the request option only used by the UI?

@ssalinas

This comment has been minimized.

Show comment
Hide comment
@ssalinas

ssalinas Dec 17, 2015

Member

Yes, only used by the ui. Developers wanted a way to have the checkbox default to checked for some requests but not others

Member

ssalinas commented Dec 17, 2015

Yes, only used by the ui. Developers wanted a way to have the checkbox default to checked for some requests but not others

@tpetr

This comment has been minimized.

Show comment
Hide comment
@tpetr

tpetr Dec 17, 2015

Member

This could be addressed in a subsequent PR, but I think it'd be worth packing the bounce + scale functionality into the backend. The "dumber" the UI is, the better.

Member

tpetr commented Dec 17, 2015

This could be addressed in a subsequent PR, but I think it'd be worth packing the bounce + scale functionality into the backend. The "dumber" the UI is, the better.

Show outdated Hide outdated SingularityUI/app/templates/vex/requestScale.hbs
<label for="bounce" id="bounce-label">
<input type="checkbox" id="bounce"{{#if bounceAfterScale}} checked{{/if}}>
Bounce after scaling
</label>

This comment has been minimized.

@tpetr

tpetr Dec 17, 2015

Member

I'd consider moving the bounce checkbox to after the scale input to fit in with the "bounce after scaling" wording.

@tpetr

tpetr Dec 17, 2015

Member

I'd consider moving the bounce checkbox to after the scale input to fit in with the "bounce after scaling" wording.

This comment has been minimized.

@tpetr

tpetr Dec 17, 2015

Member

bonus points for indenting the incremental bounce option + greying it out if the bounce checkmark is unchecked

@tpetr

tpetr Dec 17, 2015

Member

bonus points for indenting the incremental bounce option + greying it out if the bounce checkmark is unchecked

This comment has been minimized.

@ssalinas

ssalinas Dec 17, 2015

Member

right now the incremental option isn't show if bounce checkmark is unchecked and appears when you check it. would you rather see it greyed out instead of having it hidden?

@ssalinas

ssalinas Dec 17, 2015

Member

right now the incremental option isn't show if bounce checkmark is unchecked and appears when you check it. would you rather see it greyed out instead of having it hidden?

@ssalinas

This comment has been minimized.

Show comment
Hide comment
@ssalinas

ssalinas Dec 18, 2015

Member

New look of the prompt (radio buttons are hidden when bounce isn't checked):
screen shot 2015-12-18 at 8 49 07 am

Member

ssalinas commented Dec 18, 2015

New look of the prompt (radio buttons are hidden when bounce isn't checked):
screen shot 2015-12-18 at 8 49 07 am

tpetr added a commit that referenced this pull request Dec 18, 2015

Merge pull request #795 from HubSpot/bounce_and_scale
Add option to also bounce when scaling

@tpetr tpetr merged commit 896444e into master Dec 18, 2015

0 of 2 checks passed

continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
continuous-integration/travis-ci/push The Travis CI build is in progress
Details

@tpetr tpetr added this to the 0.4.6 milestone Dec 18, 2015

@ssalinas ssalinas deleted the bounce_and_scale branch Dec 21, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment