worker icon indicating copy to clipboard operation
worker copied to clipboard

Error does not result in canceled job

Open joepvd opened this issue 7 years ago • 3 comments

The following happened with worker v2.11.0 on MacStadium:

Oct 05 00:34:28 wjb-1 travis-worker-production-com-1:
  time="2017-10-04T22:34:27Z"
  level=info
  msg="received amqp delivery"
  job_id=93257062
  pid=19758
  processor=271e149b-8091-4bfd-990a-bbfc657bce97
  self="amqp_job_queue" 
Oct 05 00:34:28 wjb-1 travis-worker-production-com-1:
  time="2017-10-04T22:34:27Z"
  level=error
  msg="start attributes JSON parse error, attempting to nack delivery"
  err="json: cannot unmarshal array into Go struct field StartAttributes.osx_image of type string"
  pid=19758 processor=271e149b-8091-4bfd-990a-bbfc657bce97
  self="amqp_job_queue" 

Not sure what this error means, but dealing with this error was suboptimal. Hub reaped this job after a few hours and marked it as canceled. During this time, the concurrency was consumed by this malfunctioning job. Please extend the error handling so the backend knows that this job is to be considered cancelled.

joepvd avatar Oct 05 '17 08:10 joepvd

FWIW, the config contains this snippet:

osx_image:
- xcode8
- xcode7.3

joepvd avatar Oct 05 '17 08:10 joepvd

My understanding is that a future in which travis-yml is used early in the job lifecycle will prevent such YAML from being stored and queued as the JSON that caused the JSON parse error. That being said, I don't know if additional handling at the worker level is desirable, but I definitely agree that having a Job Config Of Doom bounce around for a few hours is not good at all.

meatballhat avatar Jul 19 '18 21:07 meatballhat

Somewhat related to #426 (imho)

meatballhat avatar Jul 19 '18 21:07 meatballhat