描述
ISSUE TYPE
- Bug Report
SUMMARY
Confusing UI if you cancel a job while it is still in "pending" state, caused by API behavior.
ENVIRONMENT
- AWX version: 4.0.0
- AWX install method: openshift, minishift, docker on linux, docker for mac, boot2docker
- Ansible version: X.Y.Z
- Operating System:
- Web Browser:
STEPS TO REPRODUCE
Launch a job that is blocked by some other job, so it remains in "pending" (or send to an instance group with no capacity), and then cancel it.
EXPECTED RESULTS
Mostly null fields related to started, finished, etc.
The job never started and never finished.
ACTUAL RESULTS
The UI shows that the job finished, see 7844

ADDITIONAL INFORMATION
Caused by the API fields.
"scm_type": "git",
"scm_url": "https://github.com/ansible/test-playbooks.git",
"scm_branch": "",
"scm_clean": false,
"scm_delete_on_update": false,
"credential": null,
"timeout": 0,
"unified_job_template": 3838,
"launch_type": "manual",
"status": "canceled",
"failed": true,
"started": null,
"finished": "2019-06-03T12:39:05.272329Z",
"elapsed": 0.0,
"job_args": "",
"job_cwd": "",
"job_env": {},
"job_explanation": "",
"execution_node": "",
"result_traceback": "",
"event_processing_finished": true,
"project": 3838,
"job_type": "check",
Expectation is that the finished field should remain null.
Previously @ryanpetrello made the suggestion
Seems like if we really wanted to have accurate data, we'd want another column to record the "canceled_on" datestamp.
This issue also makes the argument for an independent field to track canceled time. (but we may prefer to track that as a separate enhancement)