canonical / canonical/testflinger

/job/<job_id>/position is misleading

Open
#858 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
26
Forks
49
Avg merge
4d 8h
Merged PRs (30d)
16

Description

This is billed as providing the position in a queue describing at what point the job will be picked up, however there are certainly cases where this is an oversimplification as each agent listens to multiple queues.

Therefore, there could be countless other jobs keeping the agents for the queue which this job is in busy rather than servicing this job.

_Originally posted by @ajzobro in https://github.com/canonical/testflinger/pull/853#discussion_r2662888905_

At any given point, any agent listening to any queue could pop a job on that queue, thereby affecting the number of jobs available to all other agents on that same queue.

Presently, job durations are unknown and at best can be estimated to be the duration of the timeout, even though they may be significantly shorter. Furthermore, each queue may acquire, at any time, a job with a higher priority than current jobs, which would affect the calculation further.

Contributor guide

Open the contributing guide

Research direction

Start at the /job//position endpoint and trace how it represents queue position when agents listen to multiple queues, job durations are unknown, and priorities can change. Determine a meaning and response description that the system can support; done means the endpoint no longer implies a reliable pickup time it cannot establish.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend-api-design, distributed-systems
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.