Skip to content

Show submission queue status#65

Closed
msaroufim wants to merge 1 commit into
mainfrom
show-submission-queue-status
Closed

Show submission queue status#65
msaroufim wants to merge 1 commit into
mainfrom
show-submission-queue-status

Conversation

@msaroufim

Copy link
Copy Markdown
Member

Summary

Displays KernelBot submission queue metadata in the CLI when the API provides it.

The CLI parses the optional aggregate queue object, prints queue position/counts in --no-tui polling logs, and forwards the same live status text into the TUI loading screen. Older API responses without queue remain supported.

Why

Submitters get clearer feedback about whether a job is waiting in KernelBot's local queue or has moved into runner execution, without exposing who else is in the queue.

Validation

  • cargo test

@msaroufim

Copy link
Copy Markdown
Member Author

Additional local e2e validation after opening the PR:

  • Ran a local FastAPI KernelBot harness on 127.0.0.1:8766 using the real BackgroundSubmissionManager and a fake runner/DB.
  • Preloaded one pending job, held workers at 0, submitted a second job through the actual popcorn-cli binary over HTTP, then released workers.
  • CLI output included:
Submission 1001 accepted (kernelbot queue position 2, 1 ahead; 2 pending, 0 running, workers 0/0; runner queue not visible). Waiting for results...
Submission 1001 status: pending (kernelbot queue position 2, 1 ahead; 2 pending, 0 running, workers 0/0; runner queue not visible, 0s)
Submission 1001 status: pending (kernelbot queue position 2, 1 ahead; 2 pending, 0 running, workers 0/0; runner queue not visible, 5s)
Submission 1001 status: succeeded (kernelbot queue: 0 pending, 0 running, workers 2/2; runner queue not visible, 10s)

This verifies the API response shape and CLI display path end to end without invoking Modal/GitHub.

@msaroufim msaroufim force-pushed the show-submission-queue-status branch from f1b2267 to 69bcc46 Compare June 25, 2026 05:32
@msaroufim

Copy link
Copy Markdown
Member Author

Updated after simplifying the queue status shape.

Local e2e validation with a real HTTP path still passes:

  • Ran a local FastAPI KernelBot harness on 127.0.0.1:8766 using the real BackgroundSubmissionManager and a fake runner/DB.
  • Preloaded one pending job, held workers at 0, submitted a second job through the actual popcorn-cli binary over HTTP, then released workers.
  • CLI output now uses the simplified messages:
Submission 1001 accepted: In KernelBot queue (position 2, 1 ahead). Waiting for results...
Submission 1001 status: pending - In KernelBot queue (position 2, 1 ahead) (0s)
Submission 1001 status: succeeded - Job dispatched to Modal/GitHub runner (5s)

The public queue payload is now limited to stage, message, and optional position / jobs_ahead.

@msaroufim msaroufim force-pushed the show-submission-queue-status branch from 69bcc46 to ed3f1a3 Compare June 25, 2026 05:36
@msaroufim msaroufim marked this pull request as ready for review June 25, 2026 05:42
@msaroufim

Copy link
Copy Markdown
Member Author

Closing this draft; the paired KernelBot queue-position API is not the right direction for debugging submission wait time.

@msaroufim msaroufim closed this Jun 25, 2026
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.

1 participant