fix(task-scheduler): server.js 漏傳 minio dep 給 jobService(visionA e2e 撞到)
visionA 跑 Phase 0.8b e2e 時 POST /api/v1/jobs 回 502 storage_unavailable。
根因:server.js 建立 jobService 時沒把 minio facade 傳進去、
jobService.js 走 `deps.minio || null` fallback、writeInputToMinIO()
因為 minio=null throw「minio dep is required」、API 回 502。
修法:傳 minio facade 進 createJobService deps。
legacy CRUD 介面(不依賴 minio)行為不變—minio 是 optional dep。
Tests: 666/666 pass(無回歸)
Reviewer: ✅ 通過、correctness 軸無 Critical/Major
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
aeaecb8c06
commit
3b7aa4c79a
@ -63,7 +63,11 @@ if (minio.client) {
|
||||
console.log(`[Scheduler] MinIO storage enabled: ${minio.endpoint}/${minio.bucket}`);
|
||||
}
|
||||
const sseService = createSseService();
|
||||
const jobService = createJobService({ redis, sseService, jobDataDir: JOB_DATA_DIR });
|
||||
// 2026-05-18 e2e bug fix:v1 API `POST /api/v1/jobs` → jobService.writeInputToMinIO 需要 minio facade。
|
||||
// 原本 server.js 漏傳 minio dep、jobService.js:68 `deps.minio || null` fallback 成 null、
|
||||
// writeInputToMinIO line 358 throw 「minio dep is required」、API 回 502 storage_unavailable。
|
||||
// 修法:傳 minio facade 進來。legacy CRUD 介面(沒 minio dep)行為不變—minio 是 optional dep。
|
||||
const jobService = createJobService({ redis, sseService, jobDataDir: JOB_DATA_DIR, minio });
|
||||
|
||||
// T10:multer uploader 從 config 取上限(修 D5)
|
||||
// - maxFileSize = MULTIPART_MODEL_MAX_BYTES(預設 500MB)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user