OSC / ood-activejobs

[MOVED] Active Jobs provides details of scheduled jobs on an HPC cluster.
https://osc.github.io/Open-OnDemand/
MIT License
0 stars 1 forks source link

Completed jobs cause error with stack trace #97

Closed nickjer closed 7 years ago

nickjer commented 7 years ago

How to reproduce:

  1. Load Active Jobs
  2. Find a "Running" job
  3. Wait for that job to finish
  4. Don't refresh the page, but instead click the extended details dropdown button for the use-to-be "Running" job

You get this...

image

brianmcmichael commented 7 years ago

This is because the slurm adapter is reporting something other than PBS::UnkjobidError see:

https://github.com/OSC/ood-activejobs/blob/ood_core/app/controllers/pages_controller.rb#L54-L57

I'll have to update this rescue to look for whatever error OodCore throws when a job is unknown.

nickjer commented 7 years ago

You won't ever get PBS errors if you are using ood_core. All errors will be OodCore::JobAdapterError now.

nickjer commented 7 years ago

Also, I am not sure how I feel about rescuing every possible exception raised here:

    rescue => e
      { name: pbsid, error: "No job details available." + e.backtrace.to_s}

Sometimes raising a 5xx is fine. Especially if it is something unrelated to a OodCore::JobAdapterError.

brianmcmichael commented 7 years ago

Ideally the user will never see this block of code. This is here for us to debug unexpected behavior, like when the underlying API changes.

brianmcmichael commented 7 years ago

Fix applied at https://github.com/OSC/ood-activejobs/commit/bd5f7802df79afcc1a220b3bae1537b3c960db7e