Project

General

Profile

Actions

action #6564

closed

(re-)add Job::worker_id

Added by coolo almost 10 years ago. Updated almost 8 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Feature requests
Target version:
-
Start date:
2015-03-06
Due date:
% Done:

0%

Estimated time:

Description

It would be good to display in the job which worker ran the job (especially if it misbehaved). For this it would be good not to reset $job->worker when it's done.

As we have many places where the existance of $job->worker marks a running job, we would need to add a job_id to the worker table, so we can check for $job->worker->job == $job I guess.


Related issues 4 (0 open4 closed)

Related to openQA Project (public) - action #13952: too many warnings about dead workers in logResolvedmkittler2016-09-28

Actions
Related to openQA Project (public) - action #15386: Continue job already considered deadRejectedmkittler2016-12-08

Actions
Blocks openQA Project (public) - action #13144: show history of jobs in worker viewResolvedmkittler2016-08-11

Actions
Blocks openQA Project (public) - action #14902: [tools]incomplete job with no log file -> uploading failed in autoinst-log.txtResolved2016-11-20

Actions
Actions #1

Updated by okurz almost 9 years ago

  • Category set to Feature requests
Actions #2

Updated by okurz over 8 years ago

  • Assignee set to coolo

I assume this is done with commit ddb4f70c1951068624c59e9cfd635bc5c9708c13
Author: Stephan Kulow coolo@suse.de
Date: Wed Jun 8 06:48:56 2016 +0200

Move Jobs::worker_id to Worker::job_id

And add unique constraint to the job_id in the workers table (which is
much smaller)

?

please close if done.

Actions #3

Updated by coolo over 8 years ago

  • Subject changed from redeclare Job::worker_id to (re-)add Job::worker_id
  • Assignee deleted (coolo)

It's not. But it's prepared now as there is no Job::worker_id anymore with a meaning - now we can freely add it to be displayed.

When you fix the t_finished of cancelled jobs, you can add that too.

Actions #4

Updated by coolo over 8 years ago

  • Blocks action #13144: show history of jobs in worker view added
Actions #5

Updated by okurz about 8 years ago

  • Blocks action #14902: [tools]incomplete job with no log file -> uploading failed in autoinst-log.txt added
Actions #6

Updated by okurz about 8 years ago

  • Related to action #13952: too many warnings about dead workers in log added
Actions #7

Updated by mkittler about 8 years ago

  • Related to action #15386: Continue job already considered dead added
Actions #8

Updated by mkittler about 8 years ago

  • Status changed from New to Feedback
  • Assignee set to mkittler

Not sure whether it makes sense to store the worker ID. When checking the test results the worker might have already been deleted from the workers table and maybe re-added under another ID. So it would make more sense to store the actual string to be displayed, eg. 'g182:1'. I would call the column last_assigned_worker to avoid confusion with the relation which is already present.

Actions #9

Updated by coolo about 8 years ago

I see the point of avoiding an ID, but if you delete a worker from the table then all the jobs associated with it loose the information. I don't know anything about g182:1 anyway. Having an id makes sure we can link to it directly instead of mapping it. But I don't mind either.

What I do mind though is the last_ prefix - either there is a worker accociated to the job or there is not. But there is no last one.

Actions #10

Updated by mkittler about 8 years ago

but if you delete a worker from the table then all the jobs associated with it loose the information.

That is exactly what I'm trying to avoid.

I don't know anything about g182:1 anyway.

'g182:1' was just an example taken from my local instance.

Having an id makes sure we can link to it directly instead of mapping it.

Do you have another use-case in mind which would require more information about the worker than we would store in the string? If yes, the required mapping would be worse option I guess.

either there is a worker accociated to the job or there is not

So I'll call it just associated_worker. (Some prefix is required to distinguish from already existing worker.)

Actions #11

Updated by mkittler about 8 years ago

  • Status changed from Feedback to In Progress

PR: https://github.com/os-autoinst/openQA/pull/1079

Decided to store IDs now instead of strings because of #13144.

EDIT (okurz): Please reference tickets with #<nr> to make it proper links with hover information.

Actions #12

Updated by mkittler almost 8 years ago

  • Status changed from In Progress to Resolved

Merged and works in production: https://openqa.suse.de/tests/677617

Actions

Also available in: Atom PDF