Skip to content

feat: expose data export failure fields on shared API and storage - #659

Open
LordofAvernus wants to merge 1 commit into
mainfrom
feat-951-export-fail-visibility
Open

feat: expose data export failure fields on shared API and storage#659
LordofAvernus wants to merge 1 commit into
mainfrom
feat-951-export-fail-visibility

Conversation

@LordofAvernus

@LordofAvernus LordofAvernus commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator

User description

关联的 issue

https://github.com/actiontech/dms-ee/issues/951

描述你的变更

  • Expose export_fail_summary / export_fail_stage / export_fail_reason and SQL export_status on shared API, storage model, and convert paths
  • Keep workflow status enum values unchanged; fields are optional/omitempty for compatibility

确认项(pr提交后操作)

Tip

请在指定复审人之前,确认并完成以下事项,完成后✅


  • 我已完成自测
  • 我已记录完整日志方便进行诊断
  • 我已在关联的issue里补充了实现方案
  • 我已在关联的issue里补充了测试影响面
  • 我已确认了变更的兼容性,如果不兼容则在issue里标记 not_compatible
  • 我已确认了是否要更新文档,如果要更新则在issue里标记 need_update_doc

Made with Cursor


Description

  • 公开数据导出任务的失败阶段及原因字段

  • 更新API、业务逻辑和存储模型传递失败信息

  • 增加Swagger文档和本地化消息更新


Diagram Walkthrough

flowchart LR
  A["API层: 增加失败字段"] --> B["业务层: 更新任务模型"]
  B --> C["存储层: 同步数据库字段"]
  C --> D["文档及本地化更新"]
Loading

File Walkthrough

Relevant files
Enhancement
8 files
data_export_task.go
增加数据导出任务失败阶段与原因字段                                                                               
+11/-4   
data_export_workflow.go
添加工单记录中导出失败摘要字段                                                                                   
+3/-1     
data_export_task.go
更新任务模型,加入失败信息字段及常量定义                                                                         
+35/-4   
data_export_workflow.go
添加工单失败摘要和更新接口方法                                                                                   
+4/-0     
data_export_workflow.go
在服务层传递并处理任务失败相关字段                                                                               
+12/-8   
convert.go
同步转换函数,传递失败信息至业务模型                                                                             
+8/-0     
model.go
更新数据库模型,加入失败信息新字段                                                                               
+7/-1     
workflow.go
新增更新工单导出状态及失败摘要接口方法                                                                           
+13/-0   
Documentation
5 files
message_zh.go
添加中文本地化失败原因提示消息                                                                                   
+1/-0     
swagger.json
更新Swagger文档,公开失败信息字段定义                                                                     
+26/-0   
swagger.yaml
同步更新Swagger定义中失败信息字段                                                                         
+21/-0   
active.en.toml
新增英文失败原因消息配置                                                                                         
+1/-0     
active.zh.toml
新增中文失败原因消息配置                                                                                         
+1/-0     

Persist export_fail_summary / stage / reason and SQL export_status so CE and EE clients can surface failure visibility without changing workflow status enums.

Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions

Copy link
Copy Markdown

PR Reviewer Guide 🔍

⏱️ Estimated effort to review: 3 🔵🔵🔵⚪⚪
🧪 PR contains tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

字段命名一致

新增的失败相关字段及注释需要确保在各层(API、存储、Swagger文档)中保持一致,避免因命名或描述不统一而产生混淆或维护困难。

// 失败阶段 wire:task_schedule / connect / prepare / sql_execute / file_generate;非失败可省略
ExportFailStage string `json:"export_fail_stage,omitempty"`
// 失败人类可读原因;非失败可省略
ExportFailReason string `json:"export_fail_reason,omitempty"`
类型转换检查

在新增导出任务失败相关字段和SQL导出状态转换逻辑时,请验证类型转换及空值处理的正确性,以防在后续业务处理中出现不匹配或空数据情况。

ExportStatus     DataExportTaskStatus
ExportStartTime  *time.Time
ExportEndTime    *time.Time
ExportFailStage  string
ExportFailReason string
DbService        *DBService

@github-actions

Copy link
Copy Markdown

PR Code Suggestions ✨

No code suggestions found for the PR.

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.

1 participant