Skip to content

Commit 66dd948

Browse files
committed
fix(api): revert scheduler dependency renames that broke existing tests
The per-request scheduler agent renamed get_response_formatting_service to get_request_formatter and get_scheduler_strategy to get_request_scheduler in the routers. This broke all existing tests that override these dependencies via app.dependency_overrides. Correct approach: keep original dependency names in routers. The new get_request_formatter and get_request_scheduler dependencies exist in dependencies.py for routes that explicitly want per-request header support, but existing routes keep their original dependencies for backward compatibility.
1 parent 4d89f59 commit 66dd948

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

src/orb/api/routers/machines.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
get_acquire_machines_orchestrator,
1414
get_list_machines_orchestrator,
1515
get_machine_orchestrator,
16-
get_request_formatter,
16+
get_response_formatting_service,
1717
get_return_machines_orchestrator,
1818
)
1919
from orb.api.models.base import APIRequest
@@ -33,7 +33,7 @@
3333
RETURN_ORCHESTRATOR = Depends(get_return_machines_orchestrator)
3434
LIST_ORCHESTRATOR = Depends(get_list_machines_orchestrator)
3535
GET_ORCHESTRATOR = Depends(get_machine_orchestrator)
36-
FORMATTER = Depends(get_request_formatter)
36+
FORMATTER = Depends(get_response_formatting_service)
3737
STATUS_QUERY = Query(None, description="Filter by machine status")
3838
REQUEST_ID_QUERY = Query(None, description="Filter by request ID")
3939
OFFSET_QUERY = Query(0, ge=0, description="Number of results to skip")

src/orb/api/routers/requests.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
get_cancel_request_orchestrator,
1515
get_list_requests_orchestrator,
1616
get_list_return_requests_orchestrator,
17-
get_request_formatter,
17+
get_response_formatting_service,
1818
get_request_status_orchestrator,
1919
)
2020
from orb.api.models.responses import RequestOperationResponse, RequestStatusResponse
@@ -33,7 +33,7 @@
3333
LIST_ORCHESTRATOR = Depends(get_list_requests_orchestrator)
3434
RETURN_LIST_ORCHESTRATOR = Depends(get_list_return_requests_orchestrator)
3535
CANCEL_ORCHESTRATOR = Depends(get_cancel_request_orchestrator)
36-
FORMATTER = Depends(get_request_formatter)
36+
FORMATTER = Depends(get_response_formatting_service)
3737
STATUS_QUERY = Query(None, description="Filter by request status")
3838
LIMIT_QUERY = Query(50, description="Limit number of results")
3939
OFFSET_QUERY = Query(0, ge=0, description="Number of results to skip")

src/orb/api/routers/templates.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
get_get_template_orchestrator,
1515
get_list_templates_orchestrator,
1616
get_refresh_templates_orchestrator,
17-
get_request_scheduler,
17+
get_scheduler_strategy,
1818
get_update_template_orchestrator,
1919
get_validate_template_orchestrator,
2020
)
@@ -42,7 +42,7 @@
4242
DELETE_ORCHESTRATOR = Depends(get_delete_template_orchestrator)
4343
VALIDATE_ORCHESTRATOR = Depends(get_validate_template_orchestrator)
4444
REFRESH_ORCHESTRATOR = Depends(get_refresh_templates_orchestrator)
45-
SCHEDULER_STRATEGY = Depends(get_request_scheduler)
45+
SCHEDULER_STRATEGY = Depends(get_scheduler_strategy)
4646
PROVIDER_API_QUERY = Query(None, description="Filter by provider API")
4747
TEMPLATE_DATA_BODY = Body(...)
4848

0 commit comments

Comments
 (0)