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); |
ssalinas
Mar 19, 2018
Member
can we give this a better name? Like filterForPendingRequests
or something more descriptive like that?
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()); |
ssalinas
Mar 19, 2018
Member
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...)
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. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
No description provided.