Skip to content
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

Change API path "/skipHealthchecks" to "/skip-healthchecks" #1166

Merged
merged 1 commit into from
Jul 25, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Docs/features/expiring-actions.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ This URL accepts a JSON object with this format:
**NOTE:** The `user` field has been removed from this object.

#### Disabling request healthchecks
- `/requests/request/{requestId}/skipHealthchecks`
- `/requests/request/{requestId}/skip-healthchecks`

This URL accepts a JSON object with this format:

Expand All @@ -130,6 +130,6 @@ This URL accepts a JSON object with this format:
### New endpoints for cancelling actions
These endpoints were added in order to support cancelling certain actions:
- `DELETE /requests/request/{requestId}/scale` -- Cancel an expiring scale
- `DELETE /requests/request/{requestId}/skipHealthchecks` -- Cancel an expiring skip healthchecks override
- `DELETE /requests/request/{requestId}/skip-healthchecks` -- Cancel an expiring skip healthchecks override
- `DELETE /request/{requestId}/pause` -- Cancel (unpause) an expiring pause
- `DELETE /request/{requestId}/bounce` -- Cancel a bounce
4 changes: 2 additions & 2 deletions Docs/reference/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -825,7 +825,7 @@ Unpause a Singularity Request, scheduling new tasks immediately


- - -
#### **PUT** `/api/requests/request/{requestId}/skipHealthchecks`
#### **PUT** `/api/requests/request/{requestId}/skip-healthchecks`

Update the skipHealthchecks field for the request, possibly temporarily

Expand Down Expand Up @@ -853,7 +853,7 @@ Update the skipHealthchecks field for the request, possibly temporarily


- - -
#### **DELETE** `/api/requests/request/{requestId}/skipHealthchecks`
#### **DELETE** `/api/requests/request/{requestId}/skip-healthchecks`

Delete/cancel the expiring skipHealthchecks. This makes the skipHealthchecks request permanent.

Expand Down
4 changes: 2 additions & 2 deletions Docs/reference/apidocs/api-requests.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Unpause a Singularity Request, scheduling new tasks immediately


- - -
#### **PUT** `/api/requests/request/{requestId}/skipHealthchecks`
#### **PUT** `/api/requests/request/{requestId}/skip-healthchecks`

Update the skipHealthchecks field for the request, possibly temporarily

Expand Down Expand Up @@ -57,7 +57,7 @@ Update the skipHealthchecks field for the request, possibly temporarily


- - -
#### **DELETE** `/api/requests/request/{requestId}/skipHealthchecks`
#### **DELETE** `/api/requests/request/{requestId}/skip-healthchecks`

Delete/cancel the expiring skipHealthchecks. This makes the skipHealthchecks request permanent.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
import com.hubspot.singularity.SingularityRequestParent;
import com.hubspot.singularity.SingularityRequestWithState;
import com.hubspot.singularity.SingularityService;
import com.hubspot.singularity.SingularityTask;
import com.hubspot.singularity.SingularityTaskId;
import com.hubspot.singularity.SingularityTransformHelpers;
import com.hubspot.singularity.SingularityUser;
Expand Down Expand Up @@ -585,9 +584,20 @@ public SingularityRequestParent deleteExpiringScale(@ApiParam("The Request ID")
return deleteExpiringObject(SingularityExpiringScale.class, requestId);
}

@Deprecated
@DELETE
@Path("/request/{requestId}/skipHealthchecks")
@ApiOperation(value="Delete/cancel the expiring skipHealthchecks. This makes the skipHealthchecks request permanent.", response=SingularityRequestParent.class)
@ApiResponses({
@ApiResponse(code=404, message="No Request or expiring skipHealthchecks request for that ID"),
})
public SingularityRequestParent deleteExpiringSkipHealthchecksDeprecated(@ApiParam("The Request ID") @PathParam("requestId") String requestId) {
return deleteExpiringSkipHealthchecks(requestId);
}

@DELETE
@Path("/request/{requestId}/skip-healthchecks")
@ApiOperation(value="Delete/cancel the expiring skipHealthchecks. This makes the skipHealthchecks request permanent.", response=SingularityRequestParent.class)
@ApiResponses({
@ApiResponse(code=404, message="No Request or expiring skipHealthchecks request for that ID"),
})
Expand Down Expand Up @@ -615,10 +625,23 @@ public SingularityRequestParent deleteExpiringBounce(@ApiParam("The Request ID")
return deleteExpiringObject(SingularityExpiringBounce.class, requestId);
}

@Deprecated
@PUT
@Path("/request/{requestId}/skipHealthchecks")
@Consumes({ MediaType.APPLICATION_JSON })
@ApiOperation(value="Update the skipHealthchecks field for the request, possibly temporarily", response=SingularityRequestParent.class)
@ApiResponses({
@ApiResponse(code=404, message="No Request with that ID"),
})
public SingularityRequestParent skipHealthchecksDeprecated(@ApiParam("The Request ID to scale") @PathParam("requestId") String requestId,
@ApiParam("SkipHealtchecks options") SingularitySkipHealthchecksRequest skipHealthchecksRequest) {
return skipHealthchecks(requestId, skipHealthchecksRequest);
}

@PUT
@Path("/request/{requestId}/skip-healthchecks")
@Consumes({ MediaType.APPLICATION_JSON })
@ApiOperation(value="Update the skipHealthchecks field for the request, possibly temporarily", response=SingularityRequestParent.class)
@ApiResponses({
@ApiResponse(code=404, message="No Request with that ID"),
})
Expand Down
6 changes: 3 additions & 3 deletions SingularityUI/app/models/Request.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ class Request extends Model

makeSkipHealthchecksPermanent: (callback) =>
$.ajax(
url: "#{ @url() }/skipHealthchecks"
url: "#{ @url() }/skip-healthchecks"
type: "DELETE"
).then () =>
@unset('expiringSkipHealthchecks')
Expand Down Expand Up @@ -189,7 +189,7 @@ class Request extends Model
data.durationMillis = duration
$.ajax
type: "PUT"
url: "#{ @url() }/skipHealthchecks"
url: "#{ @url() }/skip-healthchecks"
contentType: 'application/json'
data: JSON.stringify data

Expand All @@ -203,7 +203,7 @@ class Request extends Model
data.durationMillis = duration
$.ajax
type: "PUT"
url: "#{ @url() }/skipHealthchecks"
url: "#{ @url() }/skip-healthchecks"
contentType: 'application/json'
data: JSON.stringify data

Expand Down