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
Don't count pending requests towards underprovisioning #1757
Conversation
@@ -195,6 +198,7 @@ public SingularityState generateState(boolean includeRequestIds) { | |||
updatePossiblyUnderProvisionedAndOverProvisionedIds(requestWithState, numInstances, overProvisionedRequestIds, possiblyUnderProvisionedRequestIds); | |||
} | |||
|
|||
removePendingRequestIds(possiblyUnderProvisionedRequestIds); |
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 we give this a better name? Like filterForPendingRequests
or something more descriptive like that?
|
||
SingularityRequest request = requestResource.getRequest(requestId, singularityUser).getRequest(); | ||
|
||
requestManager.activate(request.toBuilder().setInstances(Optional.of(0)).build(), RequestHistoryType.UPDATED, System.currentTimeMillis(), Optional.<String> absent(), Optional.<String> absent()); |
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.
did you confirm that this test actually fails without the filter you added? Seems odd to have it at instances of 0
(tbh I thought our validation would catch that...)
Yeah, I commented out my original code, wrote the failing test, then
uncommented the code and it passed.
…On Mon, Mar 19, 2018 at 4:56 PM, Stephen ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In SingularityService/src/test/java/com/hubspot/singularity/
data/StateManagerTest.java
<#1757 (comment)>:
> @@ -53,4 +57,21 @@ public void itDoesntCountCleaningTasks() {
Assert.assertEquals(0, stateManager.getState(true, false).getUnderProvisionedRequests());
Assert.assertEquals(1, stateManager.getState(true, false).getOverProvisionedRequests());
}
+
+ @test
+ public void itDoesntFlagPendingRequestsForUnderOrOverProvisioning() {
+ initRequest();
+ initFirstDeploy();
+
+ SingularityRequest request = requestResource.getRequest(requestId, singularityUser).getRequest();
+
+ requestManager.activate(request.toBuilder().setInstances(Optional.of(0)).build(), RequestHistoryType.UPDATED, System.currentTimeMillis(), Optional.<String> absent(), Optional.<String> absent());
did you confirm that this test actually fails without the filter you
added? Seems odd to have it at instances of 0 (tbh I thought our
validation would catch that...)
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1757 (review)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AOhNfs8b1BBlQzwwiO_VmJJ15XPjvFBvks5tgBuQgaJpZM4SwtFh>
.
|
Cool, let's move this one through the environments and get it merged. |
No description provided.