Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Fix: Client Services Scheduler to handle 404#224

Merged
1yam merged 3 commits intomainaleph-im/aleph-sdk-python:mainfrom
1yam-fix-scheduler-service-get_allocationsaleph-im/aleph-sdk-python:1yam-fix-scheduler-service-get_allocationsCopy head branch name to clipboard
Aug 12, 2025
Merged

Fix: Client Services Scheduler to handle 404#224
1yam merged 3 commits intomainaleph-im/aleph-sdk-python:mainfrom
1yam-fix-scheduler-service-get_allocationsaleph-im/aleph-sdk-python:1yam-fix-scheduler-service-get_allocationsCopy head branch name to clipboard

Conversation

@1yam
Copy link
Member

@1yam 1yam commented Aug 4, 2025

The goal of this PR is to handle the case where scheduler send 404 when trying to get allocations of unallocated / wrong instance

Related ClickUp, GitHub or Jira tickets : ALEPH-597

Self proofreading checklist

  • The new code clear, easy to read and well commented.
  • New code does not duplicate the functions of builtin or popular libraries.
  • An LLM was used to review the new code and look for simplifications.
  • New classes and functions contain docstrings explaining what they provide.
  • All new code is covered by relevant tests.

Changes

This pull request introduces changes to improve error handling and data type flexibility in the scheduler service and related models. The key updates include handling 404 errors gracefully when fetching allocation information and updating type annotations to allow None values for allocation-related fields.

Error handling improvements:

  • src/aleph/sdk/client/services/scheduler.py: Updated the get_allocation method to handle 404 errors by returning None when allocation information cannot be found on the scheduler. Introduced ClientResponseError for error handling.

Data type flexibility:

  • src/aleph/sdk/types.py: Modified the allocations field in the InstanceWithScheduler model to be Optional[AllocationItem], allowing it to represent cases where allocation information is unavailable.

Typing updates:

@github-actions
Copy link

github-actions bot commented Aug 4, 2025

Failed to retrieve llama text: POST 503:

503 Service Unavailable


No server is available to handle this request.

@1yam 1yam merged commit 0fbbfb5 into main Aug 12, 2025
53 of 54 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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.