Open eapearson opened 4 years ago
This is old. Is it still relevant?
This is old. Is it still relevant?
@bio-boris I think we discussed this elsewhere, not captured here. The behavior of the job log browser is to show a message when the job is created or queued, and show the logs if it is running, completed, or errored or terminated after having been run. I believe the main purpose of this issue was to clarify whether the job log is created when the job is created or queued, or whether those log entries are dropped in after the job has been terminated. In other words, if there is a job log to display, we want to display it, but right now there are assumptions about when a job log is even available. The job browser could simply attempt to show the log at all times. The reason it shows a message when a job is in created or queued state is to avoid the confusion of showing an empty log, when we really know the log doesn't exist yet.
The call to get_job_logs now returns log entries for jobs which are queued and have not yet run.
I note this as an issue because it is a change from previous behavior.
I discovered this when the data in CI changed, my tests broke, and I set about to generate a test case for a job with no log entries.
Here is a case using job
5dd540027ec5a1da6ebb0f09
here is the job info for job which shows the job was in queued state, and then canceled before it could be run
request
result:
we can see that this job was terminated while queued
And here is the job log request:
This is confusing for at least two other reasons:
For comparison, here is the result from njsw for job
5d4460ebaa5a4d298c5dc887
:results:
as can be seen in the screenshot below (for some reason I can't get the job info from njsw right now), this job was canceled while queued.