New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 690732 link

Starred by 1 user

Issue metadata

Status: Archived
Owner: ----
Closed: Mar 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

AFE should list jobs by time started, not reverse job ID

Project Member Reported by semenzato@chromium.org, Feb 10 2017

Issue description

I almost always need to find jobs by time started.  I never had a use for the current sorting order.  Since there is some randomness, I am never sure if I have included all jobs that have started within some time frame.

I realize some failed jobs don't have a "time started" field.  But why not?  They cannot fail before starting.  (For some meaning of the word "start", worst case it would be "attempt to start").

If it's truly impossible, place them after the closest smaller job ID and things won't be any worse than they are now.
 

Comment 1 by sbasi@chromium.org, Feb 10 2017

Cc: akes...@chromium.org sbasi@chromium.org
Labels: -Pri-3 Hotlist-Fixit Pri-2
Owner: ----
This is more of a fixit bug than a deputy task.

Also time started is not a fundamental feature of a AFE job:
describe afe_jobs;
+----------------------+--------------+------+-----+---------+----------------+
| Field                | Type         | Null | Key | Default | Extra          |
+----------------------+--------------+------+-----+---------+----------------+
| id                   | int(11)      | NO   | PRI | NULL    | auto_increment |
| owner                | varchar(255) | YES  | MUL | NULL    |                |
| name                 | varchar(255) | YES  | MUL | NULL    |                |
| priority             | int(11)      | YES  |     | NULL    |                |
| control_file         | text         | YES  |     | NULL    |                |
| control_type         | int(11)      | YES  |     | NULL    |                |
| created_on           | datetime     | YES  | MUL | NULL    |                |
| synch_count          | int(11)      | NO   |     | NULL    |                |
| timeout              | int(11)      | NO   |     | NULL    |                |
| run_verify           | tinyint(1)   | YES  |     | 1       |                |
| email_list           | varchar(250) | NO   |     | NULL    |                |
| reboot_before        | smallint(6)  | NO   |     | NULL    |                |
| reboot_after         | smallint(6)  | NO   |     | NULL    |                |
| parse_failed_repair  | tinyint(1)   | NO   |     | 1       |                |
| max_runtime_hrs      | int(11)      | NO   |     | NULL    |                |
| drone_set_id         | int(11)      | YES  | MUL | NULL    |                |
| parameterized_job_id | int(11)      | YES  | MUL | NULL    |                |
| max_runtime_mins     | int(11)      | NO   |     | NULL    |                |
| parent_job_id        | int(11)      | YES  | MUL | NULL    |                |
| test_retry           | int(11)      | NO   |     | 0       |                |
| run_reset            | smallint(6)  | NO   |     | 1       |                |
| timeout_mins         | int(11)      | NO   |     | NULL    |                |
| shard_id             | int(11)      | YES  | MUL | NULL    |                |
| require_ssp          | tinyint(1)   | YES  |     | NULL    |                |
+----------------------+--------------+------+-----+---------+----------------+
24 rows in set (0.01 sec)

The reason for this is its part of an AFE Host Queue Entry:
mysql> describe afe_host_queue_entries;
+------------------+--------------+------+-----+---------+----------------+
| Field            | Type         | Null | Key | Default | Extra          |
+------------------+--------------+------+-----+---------+----------------+
| id               | int(11)      | NO   | PRI | NULL    | auto_increment |
| job_id           | int(11)      | YES  | MUL | NULL    |                |
| host_id          | int(11)      | YES  | MUL | NULL    |                |
| status           | varchar(255) | YES  | MUL | NULL    |                |
| meta_host        | int(11)      | YES  | MUL | NULL    |                |
| active           | tinyint(1)   | YES  |     | 0       |                |
| complete         | tinyint(1)   | YES  | MUL | 0       |                |
| deleted          | tinyint(1)   | NO   |     | NULL    |                |
| execution_subdir | varchar(255) | NO   |     | NULL    |                |
| atomic_group_id  | int(11)      | YES  | MUL | NULL    |                |
| aborted          | tinyint(1)   | NO   | MUL | 0       |                |
| started_on       | datetime     | YES  |     | NULL    |                |
| finished_on      | datetime     | YES  |     | NULL    |                |
+------------------+--------------+------+-----+---------+----------------+
13 rows in set (0.00 sec)


The difficulty here is that there can be a 1 to many mapping of afe_job to afe host queue entries because a single job may run multiple test processes against multiple DUTs. So then there is a question of which afe host queue entry do you sort by if there are multiple?

Lastly when generating the UI pages we would then require the UI to do a DB join operation. This could be expensive and slow down the UI even more than it already is. 
Yes I agree it's not for the deputy.

I am sad that what I thought was a relatively simple request turns out to be borderline unreasonable! :)
Status: Archived (was: Untriaged)

Sign in to add a comment