Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

线上环境工单通知panic报错 #2663

Open
taolx0 opened this issue Oct 10, 2024 · 0 comments
Open

线上环境工单通知panic报错 #2663

taolx0 opened this issue Oct 10, 2024 · 0 comments
Assignees
Labels
bug Something isn't working publish-rel
Milestone

Comments

@taolx0
Copy link
Collaborator

taolx0 commented Oct 10, 2024

版本信息(Version)

3.2410

问题描述(Describe)

线上环境日志中有工单通知panic报错

截图或日志(Log)

image

如何复现(To Reproduce)

  1. sqled服务挂掉的情况下创建一个新项目 t2
  2. 启动sqled服务
  3. 创建数据源m2
  4. 创建工单数据源是m2的工单,可复现该问题

问题原因

GetReportPushConfigInProjectByType 返回 err 为非 nil 的情况下,未执行return操作,导致 if !config.Enabled { panic 错误

func NotifyWorkflow(projectId, workflowId string, wt WorkflowNotifyType) {
	logger := log.NewEntry()
	s := model.GetStorage()
	// 确认推送功能是否开启
	config, err := s.GetReportPushConfigInProjectByType(projectId, model.TypeWorkflow)
	if err != nil {
		logger.Errorf("get report push config failed: %v", err)
	}
	if !config.Enabled {
		return
	}

解决方案

变更影响面

受影响的模块或功能

外部引用的潜在问题或风险

版本兼容性

测试建议

@taolx0 taolx0 added the bug Something isn't working label Oct 10, 2024
@ColdWaterLW ColdWaterLW added this to the v3.2409.0 milestone Oct 10, 2024
@ColdWaterLW ColdWaterLW assigned taolx0 and unassigned ColdWaterLW Oct 10, 2024
@taolx0 taolx0 mentioned this issue Oct 10, 2024
5 tasks
@ColdWaterLW ColdWaterLW reopened this Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working publish-rel
Projects
None yet
Development

No branches or pull requests

2 participants