Skip to content

Start queue Deprecation#9118

Merged
lloyd-brown merged 3 commits into
masterfrom
start-queue-dep
Mar 18, 2026
Merged

Start queue Deprecation#9118
lloyd-brown merged 3 commits into
masterfrom
start-queue-dep

Conversation

@lloyd-brown

Copy link
Copy Markdown
Collaborator

Tested (run the relevant ones):

  • Code formatting: install pre-commit (auto-check on commit) or bash format.sh
  • Any manual or new tests for this PR (please specify below)
  • All smoke tests: /smoke-test (CI) or pytest tests/test_smoke.py (local)
  • Relevant individual tests: /smoke-test -k test_name (CI) or pytest tests/test_smoke.py::test_name (local)
  • Backward compatibility: /quicktest-core (CI) or pytest tests/smoke_tests/test_backward_compat.py (local)

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request begins the phased deprecation of the original job queueing mechanism, guiding users towards a more performant and modern queue_v2 API. It introduces a versioning parameter in the client SDK to facilitate a smooth transition, while simultaneously disabling the deprecated endpoint and function on the server to prevent its continued use.

Highlights

  • API Deprecation Strategy: Initiated the deprecation process for the legacy queue API and its corresponding server endpoint. Users calling the old queue function in the client SDK will now receive a warning and are encouraged to use queue_v2 or specify version=2.
  • Client SDK Updates: Modified the sky.jobs.client.sdk.queue function to accept an optional version parameter. When version=2, calls are routed to the newer queue_v2 function, providing a migration path for users.
  • Server-Side Enforcement: The legacy /queue server endpoint now returns an HTTP 410 Gone status, and the sky.jobs.server.core.queue function raises a ValueError, explicitly preventing direct use of the deprecated API on the server side.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • sky/jobs/client/sdk.py
    • Added a version parameter to the queue function, defaulting to 1.
    • Updated the return type hint of the queue function to accommodate the queue_v2 return type.
    • Implemented logic to dispatch to queue_v2 when version is 2.
    • Added a warning message for users calling queue with version=1.
    • Included a TODO comment for removal before version 0.13.
  • sky/jobs/client/sdk_async.py
    • Added a version parameter to the async queue function.
    • Modified the async queue function to pass the version parameter to the synchronous sdk.queue call.
    • Updated the return type hint of the async queue function.
    • Included a TODO comment for removal before version 0.13.
  • sky/jobs/server/core.py
    • Updated the TODO comment for removal to version 0.13.0.
    • Replaced the implementation of the queue function with a ValueError indicating its deprecation and removal.
  • sky/jobs/server/server.py
    • Removed the scheduling logic for the /queue endpoint.
    • Implemented an HTTPException with status code 410 (Gone) for the /queue endpoint, explicitly deprecating it.
  • tests/unit_tests/test_sky/jobs/test_client_sdk.py
    • Added a new test file for sky.jobs.client.sdk.
    • Included tests for queue dispatching to queue_v2 when version=2.
    • Added tests for queue warning and using the legacy endpoint when version=1.
    • Included tests for queue raising a ValueError for invalid version values.
    • Added an asynchronous test for async_queue correctly passing the version parameter.
  • tests/unit_tests/test_sky/jobs/test_server_queue.py
    • Imported fastapi, mock, and payloads for new tests.
    • Added an asynchronous test to verify the legacy /queue endpoint raises an HTTPException with status 410.
    • Added a test to verify the legacy jobs_core.queue function raises a ValueError.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request starts the deprecation process for the queue function by introducing a version parameter to switch between the old and new implementations. The server-side implementation for the v1 queue is removed and now returns an error. This is a good step towards modernizing the API. My main feedback is to make the client-side deprecation warning for queue(version=1) more explicit, as it will no longer work with updated servers.

Comment thread sky/jobs/client/sdk.py Outdated
@lloyd-brown lloyd-brown requested review from cg505 and removed request for cg505 March 17, 2026 22:10
@lloyd-brown lloyd-brown marked this pull request as ready for review March 17, 2026 22:12
Comment thread sky/jobs/client/sdk.py Outdated
Comment thread sky/jobs/client/sdk.py Outdated
Comment thread sky/jobs/server/core.py Outdated
Comment thread sky/jobs/server/server.py Outdated
Co-authored-by: Christopher Cooper <christopher@cg505.com>
- Update deprecation message to "is deprecated and will be removed in v0.13"
- Restore server.py /queue endpoint to forward to core.queue instead of 410
- Restore core.py queue() to forward to queue_v2 instead of raising ValueError
- Remove now-unnecessary deprecation error tests, update assertion wording

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@lloyd-brown

Copy link
Copy Markdown
Collaborator Author

/smoke-test

@cg505 cg505 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

lgtm

@lloyd-brown lloyd-brown merged commit 253b3c8 into master Mar 18, 2026
22 checks passed
@lloyd-brown lloyd-brown deleted the start-queue-dep branch March 18, 2026 17:46
lloyd-brown added a commit that referenced this pull request Mar 18, 2026
* Initial commit.

* Update sky/jobs/client/sdk.py

Co-authored-by: Christopher Cooper <christopher@cg505.com>

* Address PR review: keep v1 queue working during deprecation period

- Update deprecation message to "is deprecated and will be removed in v0.13"
- Restore server.py /queue endpoint to forward to core.queue instead of 410
- Restore core.py queue() to forward to queue_v2 instead of raising ValueError
- Remove now-unnecessary deprecation error tests, update assertion wording

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Christopher Cooper <christopher@cg505.com>
Co-authored-by: Agent (queue-dep) <agent@skypilot.co>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Comment thread sky/jobs/client/sdk.py
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.

3 participants