saagie / gradle-saagie-dataops-plugin

Saagie Gradle Plugin for the new version (2.0) of Saagie Dataops Orchestrator
Apache License 2.0
2 stars 0 forks source link

Add projectsStopJobInstance #52

Closed sgokaram-saagie closed 4 years ago

sgokaram-saagie commented 5 years ago

Acceptance Criteria https://github.com/saagie/gradle-saagie-dataops-plugin/wiki/projectsStopJobInstance

youenchene commented 4 years ago

➜ test plugin gradle dataops gradle projectsStopJobInstance

Task :projectsStopJobInstance FAILED Something went wrong when stopping the job instance: {"errors":[{"message":"Unexpected error"}],"data":null}

FAILURE: Build failed with an exception.

BUILD FAILED in 1s 1 actionable task: 1 executed

youenchene commented 4 years ago
project {
    id = '2438b9b6-a9ee-4816-bfa8-9ed89896dfb4'
}

/ job { id = 'e098ec6c-dd87-4ce7-b243-bddbc6fd0fab' //name = 'Test Job for the Boss 6' //description = 'Description' //technology = '13522063-c18b-4ecd-b61f-3bae1e0ad93c' //category = 'Extraction' }/

jobinstance {
    id = 'e28a85b2-cef3-4611-9e76-d5c360aa34ea'
}
DecampsRenan commented 4 years ago

Ok the problem is that we've got an API error if the id doesn't exists or if the jobinstance is already ended (success or killed) But I can't tell the difference based on the API response; should I print a warning saying "Your job is already ended or doesn't exists" ?

DecampsRenan commented 4 years ago

I've tested on this job https://saagie-beta.prod.saagie.io/projects/platform/4/project/2438b9b6-a9ee-4816-bfa8-9ed89896dfb4/job/7cbe234d-397b-4d4f-a3a0-94f3b07ce362

youenchene commented 4 years ago

Need Saagie improvement to get proper message error.

closing the issue.