-
Notifications
You must be signed in to change notification settings - Fork 186
Self Service Shuffle Opt Out #2060
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
Conversation
…istent with similar overrides
...ityService/src/main/java/com/hubspot/singularity/resources/ShuffleConfigurationResource.java
Outdated
Show resolved
Hide resolved
...arityService/src/test/java/com/hubspot/singularity/data/ShuffleConfigurationManagerTest.java
Outdated
Show resolved
Hide resolved
| /> | ||
| ); | ||
|
|
||
| const avoidShuffle = ( |
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.
One note on placement of this. We will likely want to make a button+modal for this in the top bar of the request detail page (example below) rather than putting it on the request form, for two reasons:
- We hide the request form from developers in most cases, since, internally, the request json is managed by our deploy api
- Given that the request form is meant to essentially represent the request json, and shuffle is under a separate root/api/object, it makes sense to separate shuffle a bit
side note, a nice to have, but maybe we could actually show the button on the task detail page as well when the task in question was killed due to shuffling? Would have to identify that based on the cleanup message in the status updates
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've implemented the side note, but to avoid complicating the redux flow for the TaskDetail page the button will always prompt the user to disable shuffling for the request instead of being a toggle - no technical issues (safe to post the same request id to the blacklist multiple times), but maybe a slight source of confusion.
| buttonStyle="primary" | ||
| formElements={[]}> | ||
| <p>{this.renderActionText()} shuffling for {requestIds.length > 1 ? 'these' : 'this'} request{requestIds.length > 1 && 's'}?</p> | ||
| <p>Note that Singularity may still bounce your tasks if necessary, such as during host failures.</p> |
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.
Two things, we can probably add a first note that this is specifically 'Disable task shuffling due to memory pressure or cpu overusage', with a follow up of 'Note that this does not prevent all restarts of your task. A task may still be bounced or shuffled for events such as host decommissions'
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.
Looks good, let's give this a go in QA 👍
|
🚢 |
| import javax.ws.rs.Consumes; | ||
| import javax.ws.rs.DELETE; | ||
| import javax.ws.rs.GET; | ||
| import javax.ws.rs.HEAD; |
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.
Leftover from a merge conflict?
| import java.util.UUID; | ||
| import java.util.stream.Collectors; | ||
|
|
||
| public class SingularityTaskShuffler { |
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.
+1 for splitting this out

Though all Singularity tasks should be able to handle bounces, some can't. Even if they can, it's understandable that users may want some high-importance tasks to avoid bouncing if possible. Therefore, we should allow users to indicate they don't want their tasks to be shuffled without having to edit the configuration and redeploy Singularity.
Concerns:
TODO:
cc - @ssalinas