Skip to content

Add allow_queue option to job execution create - #226

Merged
drappier-charles merged 2 commits into
mainfrom
cdrappier/devin/allow-queue-job-execution
Aug 21, 2026
Merged

Add allow_queue option to job execution create#226
drappier-charles merged 2 commits into
mainfrom
cdrappier/devin/allow-queue-job-execution

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Summary

Surfaces the new allowQueue parameter from controlplane (blaxel-ai/controlplane#5229) in the Python SDK.

  • src/blaxel/core/client/models/create_job_execution_request.py: regenerated via make sdk-controlplane from mainCreateJobExecutionRequest gains optional allow_queue (serialized as allowQueue).
  • BlJob.run / BlJob.arun gain an allow_queue: bool | None = None parameter forwarded on the create request.

Semantics: omitted or True keeps today's queue-and-retry behavior; allow_queue=False checks capacity synchronously at create time and rejects immediately with a 429 (no execution created, nothing queued) so callers can fail over instantly instead of waiting on a parked execution.

bl_job("my-job").run([{}], allow_queue=False)  # raises 429 if no capacity right now

ruff check/ruff format clean; verified serialization: CreateJobExecutionRequest(tasks=[{}], allow_queue=False).to_dict() == {'allowQueue': False, 'tasks': [{}]}.

Link to Devin session: https://app.devin.ai/sessions/829498efd05742f79300261953889d6d
Requested by: @drappier-charles


Note

Low Risk
Additive optional SDK field with default-preserving behavior; no auth, data, or execution-path logic changes in this repo.

Overview
Adds optional allow_queue on CreateJobExecutionRequest (serialized as allowQueue) and forwards it from BlJob.run / BlJob.arun.

Omitted or True keeps queue-and-retry. allow_queue=False asks the control plane to reject immediately with 429 if the job cannot start now, so callers can fail over without a parked execution.

Reviewed by Cursor Bugbot for commit c5bd78b. Bugbot is set up for automated code reviews on this repo. Configure here.

Regenerates the controlplane client from main (adds optional allowQueue
on CreateJobExecutionRequest) and exposes allow_queue on BlJob.run/arun.
allow_queue=False rejects immediately with 429 when capacity is
unavailable instead of queueing; omitted/True keeps queue-and-retry.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR that start with 'DevinAI' or '@devin'.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@drappier-charles
drappier-charles marked this pull request as ready for review August 21, 2026 20:41
@drappier-charles
drappier-charles merged commit 452f4b9 into main Aug 21, 2026
17 of 19 checks passed
@drappier-charles
drappier-charles deleted the cdrappier/devin/allow-queue-job-execution branch August 21, 2026 20:41

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Devin Review found 1 potential issue.

Open in Devin Review

env: Dict[str, str] | None = None,
memory: int | None = None,
execution_id: str | None = None,
allow_queue: bool | None = None,

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

🟡 New allow_queue feature ships without an integration test

AGENTS.md requires every feature to ship with an integration test against the real API. The new allow_queue parameter on run/arun has no test in tests/integration/core/jobs/test_jobs.py, unlike the existing memory and env overrides.

Prompt for agents
AGENTS.md states every feature must ship with an integration test exercising it against the real API. The new allow_queue option added to BlJob.run and BlJob.arun (and the CreateJobExecutionRequest model) has no integration test. Add a test in tests/integration/core/jobs/test_jobs.py that runs a job with allow_queue=False (and/or True), following the existing patterns like test_run_job_with_memory_override, including the not-found skip handling.
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Addressed in follow-up PR #227 (this PR was already merged): adds test_run_job_with_allow_queue_false to tests/integration/core/jobs/test_jobs.py, treating an immediate 429 as the expected no-capacity rejection.

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