Skip to content

fix(coderd/database): exclude canceled jobs in queue position #15835

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Dec 12, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update coderd/database/queries/provisionerjobs.sql
Co-authored-by: Mathias Fredriksson <mafredri@gmail.com>
  • Loading branch information
johnstcn and mafredri authored Dec 12, 2024
commit 964ffcfa45863a613a1cd33c314de99f98ddae83
2 changes: 1 addition & 1 deletion coderd/database/queries/provisionerjobs.sql
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ queue_position AS (
id,
ROW_NUMBER() OVER (ORDER BY created_at ASC) AS queue_position
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll need to amend this to take into account matching tags. Queue position could be 1/3 for the provisioners that match, but 20/50 on a larger scale (but that's nonsensical). Do we have an issue that tracks this?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Account matching tags? Is that provisioner tags?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Take into account 😄. Matching provisioner tags yes 👍🏻

Copy link
Member Author

@johnstcn johnstcn Dec 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will create a follow-up issue to track this. 👍

Edit: #15843

FROM
pending_jobs
pending_jobs
),
queue_size AS (
SELECT COUNT(*) AS count FROM pending_jobs
Expand Down
Loading