Don't count pending requests towards underprovisioning#1757
Merged
Conversation
ssalinas
reviewed
Mar 19, 2018
| updatePossiblyUnderProvisionedAndOverProvisionedIds(requestWithState, numInstances, overProvisionedRequestIds, possiblyUnderProvisionedRequestIds); | ||
| } | ||
|
|
||
| removePendingRequestIds(possiblyUnderProvisionedRequestIds); |
Contributor
There was a problem hiding this comment.
can we give this a better name? Like filterForPendingRequests or something more descriptive like that?
ssalinas
reviewed
Mar 19, 2018
|
|
||
| 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()); |
Contributor
There was a problem hiding this comment.
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...)
Contributor
Author
|
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>
.
|
Contributor
|
Cool, let's move this one through the environments and get it merged. 🚢 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.