Jobs cancelled midway don't display any output and are misleadingly marked as "not triggered yet"
Summary
When I cancel a running job, the output that I got so far disappears and Gitlab says "This job has not been triggered yet". It is only possible to see the previous output by appending /raw to the job URL.
Steps to reproduce
- Trigger any job on Gitlab CI
- Wait a few seconds for it to print some output, then cancel it
- The job page will now say "This job has not been triggered yet" and the earlier output will no longer be visible
- Append
/rawto the job URL and verify that the partial output is still accessible there
Example Project
Existing job demonstrating this issue: https://gitlab.com/gitlab-org/gitlab-ce/-/jobs/49343518 Partial output from that job: https://gitlab.com/gitlab-org/gitlab-ce/-/jobs/49343518/raw
What is the current bug behavior?
Described above.
What is the expected correct behavior?
- The partial output should still be displayed - it may be useful in certain situations.
- The page should not say "This job has not been triggered yet", as that's not true - it was triggered and then canceled.
Relevant logs and/or screenshots
Output of checks
This bug was observed on GitLab.com and GitLab EE Starter v10.4.0.
Possible fixes
Here is where the string in question comes from. I can't figure out which of those ifs prints the log output for running and completed jobs, but the same branch should be executed for canceled jobs.
