-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Copy link
Labels
Component: CoreRelates to core serviceRelates to core service
Description
Description
As a backend developer, I want to update the Foxx API endpoints to support repository types and the new allocation response format so that metadata-only repositories can execute allocations synchronously without creating tasks.
Response Format Changes
New Allocation Response Format:
// For metadata-only repositories (direct execution)
{
"execution_method": "direct",
"result": {
"allocation": { /* allocation data */ }
}
}
// For Globus repositories (task execution)
{
"execution_method": "task",
"task": { /* task data */ }
}
Data Transfer Error for Metadata-Only:
{
"error": "ERR_INVALID_OPERATION",
"message": "Data transfers not supported for metadata-only repository",
"repo_type": "metadata_only",
"repo_id": "repo/repo_dev_01"
}
Acceptance Criteria
- Update POST /api/repo/create to require and validate the 'type' field
- Modify repository creation logic to store type in database
- Update GET /api/repo/alloc/create to return new response format
- Update GET /api/repo/alloc/delete to return new response format
- Implement direct (synchronous) allocation for metadata-only repositories
- Maintain task-based allocation for Globus repositories
- Add repository type checking to data transfer endpoints (PUT/GET)
- Return appropriate errors for unsupported operations on metadata-only repos
Resources
- Engineering Design Document: spec.md - API Changes section
- Current endpoints:
- Repository creation:
core/database/foxx/api/repo_router.js:100
- Allocation create:
core/database/foxx/api/repo_router.js:659
- Allocation delete:
core/database/foxx/api/repo_router.js:709
- Repository creation:
- Data router:
core/database/foxx/api/data_router.js
Dependencies
- Depends on: Repository Type System ([Foxx, Core] Repository Type System: Implement Type Enum and Validation #1514)
- Blocks: Database Migration, C++ Response Handling
Metadata
Metadata
Assignees
Labels
Component: CoreRelates to core serviceRelates to core service