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

feat(canary): Adds new canary exec endpoint sans canary config id pat… #924

Merged
merged 1 commit into from
Oct 21, 2019
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,7 @@ import io.swagger.annotations.ApiOperation
import io.swagger.annotations.ApiParam
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression
import org.springframework.web.bind.annotation.PathVariable
import org.springframework.web.bind.annotation.RequestBody
import org.springframework.web.bind.annotation.RequestMapping
import org.springframework.web.bind.annotation.RequestMethod
import org.springframework.web.bind.annotation.RequestParam
import org.springframework.web.bind.annotation.RestController
import org.springframework.web.bind.annotation.*

@RestController
@RequestMapping('/v2/canaries')
Expand Down Expand Up @@ -87,14 +82,23 @@ class V2CanaryController {
storageAccountName)
}

@ApiOperation(value = 'Retrieve a canary result')
// TODO: Change callers to the new endpoint sans canary config id in Spinnaker 1.17.x.
@ApiOperation(value = '(DEPRECATED) Retrieve a canary result')
@RequestMapping(value = '/canary/{canaryConfigId}/{canaryExecutionId}', method = RequestMethod.GET)
Map getCanaryResult(@PathVariable String canaryConfigId,
@Deprecated
Map getCanaryResult(@PathVariable String canaryConfigId /* unused */,
@PathVariable String canaryExecutionId,
@RequestParam(value='storageAccountName', required = false) String storageAccountName) {
v2CanaryService.getCanaryResults(canaryExecutionId, storageAccountName)
}

@ApiOperation(value = 'Retrieve a canary result')
@RequestMapping(value = '/canary/{canaryExecutionId}', method = RequestMethod.GET)
Map getCanaryResult(@PathVariable String canaryExecutionId,
@RequestParam(value='storageAccountName', required = false) String storageAccountName) {
v2CanaryService.getCanaryResults(canaryExecutionId, storageAccountName)
}

@ApiOperation(value = 'Retrieve a list of an application\'s canary results')
@RequestMapping(value = '/{application}/executions', method = RequestMethod.GET)
List getCanaryResultsByApplication(@PathVariable String application,
Expand Down