Closed jeffmontagna closed 5 months ago
Assigning back to Jeff so he can validate this when we get this rolled out somewhere.
The fix for setting a job inactive works without an error.
v1.3.0
. kafka_test1
from terafoundation and restarted teraslice master.POST /v1/jobs/{jobId}/_inactive
curl -sS -X POST ts-test/v1/jobs/1c5056b2-9264-4767-8005-c8b9811233c3/_inactive | jq
{
"name": "datagen-store-kafka",
"lifecycle": "once",
"workers": 2,
"slicers": 1,
"cpu": 2,
"memory": 4294967296,
"assets": [
"standard:0.22.5",
"kafka:3.5.2"
],
"operations": [
{
"_op": "data_generator",
"size": 6000000,
"set_id": "base64url",
"stress_test": false
},
{
"_op": "set_key"
},
{
"_op": "kafka_sender",
"topic": "topic-tst-1",
"size": 15000,
"connection": "kafka_test1"
}
],
"_created": "2024-05-03T22:19:55.565Z",
"job_id": "1c5056b2-9264-4767-8005-c8b9811233c3",
"_context": "job",
"_updated": "2024-05-03T22:36:35.131Z",
"active": false
}
POST /v1/jobs/{jobId}/_active
does error, which is expected as the connector is not in the terafoundation.
curl -sS -X POST ts-test/v1/jobs/1c5056b2-9264-4767-8005-c8b9811233c3/_active | jq
{
"error": 500,
"message": "Validation failed for job config: datagen-store-kafka - operations: Operation kafka_sender refers to connection \"kafka_test1\" which is unavailable: value was [{\"_op\":\"data_generator\",\"size\":6000000,\"set_id\":\"base64url\",\"stress_test\":false},{\"_op\":\"set_key\"},{\"_op\":\"kafka_sender\",\"topic\":\"topic-tst-1\",\"size\":15000,\"connection\":\"kafka_test1\"}]"
}
JSON API:
POST /v1/jobs/{jobId}/_inactive
When
_inactive
is posted to a job the action will fail because there is a check that the job config is valid. The post will fail with a500
and the errorValidation failed for job config
. In some cases connectors used by a job may have been removed from the cluster configuration, and it become impossible to set a job to inactive._inactive
should probably bypass the job validation or allow for a bypass as option.