增加定时测试排除渠道 ID 配置 - #4269
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (12)
✅ Files skipped from review due to trivial changes (9)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughAdds a new MonitorSetting field to list excluded channel IDs, parsing logic to produce an exclusion map, updates the scheduled channel test loop to skip/log excluded channels, adds UI input and i18n keys, and includes a unit test for the parser. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Frontend
participant Backend
participant MonitorSetting
participant ChannelLoop
participant Logger
User->>Frontend: Update excluded IDs (e.g. "3,5,8")
Frontend->>Backend: Save operation settings
Backend->>MonitorSetting: Persist AutoTestChannelExcludedIds
Note over Backend,MonitorSetting: Scheduled test trigger
Backend->>MonitorSetting: GetAutoTestChannelExcludedIDMap()
MonitorSetting-->>Backend: map{3:true,5:true,8:true}
Backend->>ChannelLoop: Iterate channels
ChannelLoop->>ChannelLoop: check channel.Id in exclusion map
alt channel excluded
ChannelLoop->>Logger: SysLog skip channel.Id
ChannelLoop-->>Backend: continue (skip test)
else channel not excluded
ChannelLoop->>Backend: testChannel(...)
Backend-->>ChannelLoop: test result / update RT
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
web/src/i18n/locales/en.json (1)
1140-1140: Optional wording polish for natural EnglishCurrent copy is understandable, but “Channel IDs excluded from scheduled tests” reads more naturally in UI.
✍️ Suggested wording
- "定时测试排除渠道 ID": "Excluded channel IDs for scheduled tests", + "定时测试排除渠道 ID": "Channel IDs excluded from scheduled tests",🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@web/src/i18n/locales/en.json` at line 1140, Update the English translation value for the key "定时测试排除渠道 ID" in the locales file: replace "Excluded channel IDs for scheduled tests" with the more natural UI phrasing "Channel IDs excluded from scheduled tests" so the displayed copy reads more naturally.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@web/src/i18n/locales/en.json`:
- Line 1140: Update the English translation value for the key "定时测试排除渠道 ID" in
the locales file: replace "Excluded channel IDs for scheduled tests" with the
more natural UI phrasing "Channel IDs excluded from scheduled tests" so the
displayed copy reads more naturally.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 55abaebc-1f5e-4499-82e8-e5673a22e6c7
📒 Files selected for processing (12)
controller/channel-test.gosetting/operation_setting/monitor_setting.gosetting/operation_setting/monitor_setting_test.goweb/src/components/settings/OperationSetting.jsxweb/src/i18n/locales/en.jsonweb/src/i18n/locales/fr.jsonweb/src/i18n/locales/ja.jsonweb/src/i18n/locales/ru.jsonweb/src/i18n/locales/vi.jsonweb/src/i18n/locales/zh-CN.jsonweb/src/i18n/locales/zh-TW.jsonweb/src/pages/Setting/Operation/SettingsMonitoring.jsx
2c44971 to
6811eaa
Compare
6811eaa to
b8939b6
Compare
|
@seefs001 你好,这个 PR 现在已经可以 review 了,签名和 checks 都处理好了。这个改动主要是给定时测试增加排除渠道 ID 配置,默认行为不变。有空的话麻烦帮看一下,感谢。 |
|
关闭此 PR,功能暂不需要 |
变更描述
当前“测试所有通道 / 定时测试所有通道”会对部分图片、视频等高成本渠道发起真实上游测试请求,容易带来不必要的巡检成本。
这个 PR 增加了一个轻量的排除配置:管理员可以在“系统设置 -> 监控设置”中通过逗号分隔的渠道 ID 配置排除列表,让这些渠道跳过批量/定时测试,但不影响单个渠道的手动测试,也不需要手动禁用渠道。
变更类型
关联任务
具体改动
monitor_setting.auto_test_channel_excluded_ids配置项兼容性说明
options配置表保存该配置提交前检查项
运行证明 / 验证结果
go test ./setting/operation_setting/...npm run buildSummary by CodeRabbit
New Features
UI
Documentation
Tests