mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-11-25 01:09:26 +00:00
feat(dashboard): add workflow tasks monitoring and stopping to team dashboard (#489)
* feat(dashboard): add workflow tasks monitoring and stopping to team dashboard * fix(asset): retain workflow tasks on asset purge and mark active tasks as failed * style(webui): add edge padding to audit logs and workflow tasks tables * fix(workflow): atomically update asset status to failed when task is stopped * fix(workflow): propagate cancellation errors, guard concurrent task stop, and localize UI * docs(changelog): keep only added log for workflow tasks dashboard * test(provider): mock upstream catalog api calls using saved fixtures * feat(dashboard): show file name, size, and project name in workflow tasks list
This commit is contained in:
@@ -310,6 +310,17 @@ describe('DbosExecutor Tests', () => {
|
||||
|
||||
expect(heartbeats.has(taskId)).toBe(false)
|
||||
})
|
||||
|
||||
it('should propagate error if client.cancelWorkflow fails', async () => {
|
||||
const taskId = 'test-failing-cancel'
|
||||
const mockClient = {
|
||||
cancelWorkflow: vi.fn().mockRejectedValue(new Error('DBOS connection failure')),
|
||||
}
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
vi.spyOn(executor, 'getClient').mockResolvedValue(mockClient as any)
|
||||
|
||||
await expect(executor.cancel(taskId)).rejects.toThrow('DBOS connection failure')
|
||||
})
|
||||
})
|
||||
|
||||
describe('Submit', () => {
|
||||
|
||||
@@ -387,6 +387,7 @@ export class DbosExecutor extends EventEmitter {
|
||||
logger.info({ taskId }, '[DbosExecutor] Cancelled workflow task')
|
||||
} catch (err) {
|
||||
logger.warn({ taskId, err }, '[DbosExecutor] Failed to cancel workflow task in DBOS')
|
||||
throw err
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user