-
Notifications
You must be signed in to change notification settings - Fork 810
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(executions): Adding new ADMIN endpoint to import execution #3310
Conversation
…r spinnaker instance. Useful to get a execution into other envs for troubleshooting. Only imports executions with TERMINAL, SUCCEEDED or CANCELLED states.
orca-web/src/main/groovy/com/netflix/spinnaker/orca/controllers/AdminController.groovy
Show resolved
Hide resolved
Thanks for doing this, I think it would be useful and LGTM, but would like another opinion as to any side effects this could cause, @cfieber / @robzienert ? |
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.
lgtm, thanks!
@ResponseStatus(HttpStatus.CREATED) | ||
Map<String, String> createExecution(@RequestBody Execution execution) { | ||
|
||
if (front50Service && !front50Service.get(execution.application)) { |
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.
I believe front50Service.get()
will raise an exception if the application doesn't exist (vs. returning null).
I'm not sure we want to import executions for applications that don't exist?
|
||
try { | ||
executionRepository.retrieve(execution.type, execution.id) | ||
log.warn('Execution found with id: []', execution.id) |
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.
warn
seems like the wrong logging level? debug
maybe? (or perhaps it's not even relevant given it's going to raise an exception immediately)
log.warn('Execution found with id: []', execution.id) | ||
throw new InvalidRequestException('Execution already exists with id: ' + execution.id) | ||
} catch(ExecutionNotFoundException e) { | ||
log.info('Execution not found .. can import it..') |
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.
This log message seems irrelevant and would get lost in the noise? There's no identifier included in the output.
…naker#3310) * feat(executions): Adding new endpoint to import execution from another spinnaker instance. Useful to get a execution into other envs for troubleshooting. Only imports executions with TERMINAL, SUCCEEDED or CANCELLED states. * Disallow if execution already exists and also add some info helper messages
Adding new Admin endpoint to import execution from another spinnaker instance.
Useful to get a execution into other envs for troubleshooting.
Only imports executions with TERMINAL, SUCCEEDED or CANCELLED states.