Skip to content

feat(queue): report the tasks and runs waiting ahead of each run - #57

Merged
Zacgoose merged 2 commits into
mainfrom
dev
Oct 20, 2026
Merged

Zacgoose merged 2 commits into
mainfrom
dev

Conversation

@Zacgoose

Copy link
Copy Markdown
Contributor

This pull request enhances queue and run status tracking by introducing new telemetry fields that indicate how many tasks and runs are ahead of each job in the claim order. It also refines the logic for labeling runs, ensuring a run's own queue ID takes precedence over shared references. Several tests are added and updated to verify these behaviors.

Queue and Run Status Enhancements:

  • Added Ahead and RunsAhead properties to JobRunSummary, RunQueueInfo, and RunStatus to track the number of unclaimed tasks and runs ahead in the claim order. These fields are populated and aggregated throughout the queue status computation. [1] [2] [3] [4] [5] [6] [7] [8]

Labeling Logic Improvements:

  • Updated the FindLabel method in QueueStatusBridge to prioritize a run's own queue ID over shared references when determining the label and link for a run. This ensures correct labeling even when multiple runs share a reference. [1] [2]

Testing:

  • Added a new test class QueueStatusBridgeLabelTests to verify that the correct label is selected for a run, prioritizing the queue ID over the reference, and that runs without a queue ID still get the reference label.
  • Added a test to ensure that each run correctly reports the number of tasks and runs ahead of it in the claim order.

These changes improve the observability and correctness of job queue telemetry and labeling.

@Zacgoose
Zacgoose requested a review from JohnDuprey October 20, 2026 11:16
@Zacgoose
Zacgoose merged commit 1155415 into main Oct 20, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants