ansible/awx

Jobs canceled before starting should not show a "finished" time

Open

#3,988 建立於 2019年6月3日

在 GitHub 查看
 (2 留言) (0 反應) (0 負責人)Python (13,071 star) (3,333 fork)batch import
Hacktoberfestcomponent:apigood first issuetype:bug

描述

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

Screen Shot 2019-06-03 at 8 50 50 AM

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)

貢獻者指南