phac-nml / irida-next

IRIDA Next
https://phac-nml.github.io/irida-next/
Apache License 2.0
8 stars 3 forks source link

Fix cancel unsubmitted job error #522

Closed JeffreyThiessen closed 5 months ago

JeffreyThiessen commented 5 months ago

What does this PR do and why?

Describe in detail what your merge request does and why. Fixes #510

Fixes error that happened when attempting to cancel a job that hadn't reached the submitted state

Adds submitted to the list of states that are cancelable

Also fixes bug where workflow execution will ignore canceling state when queuing completion/status job, causing a run to move to completion state when run has been queue'd to be canceled.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other pull requests.

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Submit a new workflow execution
  2. While in the new or prepared state, cancel it. It should go directly to the canceled state
  3. Submit a new workflow execution
  4. Wait until it reaches the submitted, queued or running state then cancel it.
  5. Verify that it goes to the canceling state, wait and verify that it then makes it to the canceled state

PR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

github-actions[bot] commented 5 months ago

Simplecov Report

Covered Threshold
91.74% 90%