feat: add per-channel health check settings - #6283
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 (10)
🚧 Files skipped from review as they are similar to previous changes (9)
WalkthroughPer-channel health-check overrides are added to channel settings, persisted with validation, and applied to automatic channel tests. A permission-protected batch endpoint updates these settings and auto-ban values with per-item results, cache refreshes, and audit logging. ChangesHealth check configuration
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant Scheduler
participant performChannelTests
participant Channel
participant ShouldEnableChannel
Scheduler->>performChannelTests: start automatic tests
performChannelTests->>Channel: resolve effective health-check settings
performChannelTests->>Channel: execute endpoint test
Channel-->>performChannelTests: return test result
performChannelTests->>ShouldEnableChannel: evaluate recovery policy
sequenceDiagram
participant Client
participant BatchUpdateChannelHealthCheck
participant UpdateHealthCheckSettings
participant ChannelCache
Client->>BatchUpdateChannelHealthCheck: submit channel updates
BatchUpdateChannelHealthCheck->>UpdateHealthCheckSettings: update each item
UpdateHealthCheckSettings-->>BatchUpdateChannelHealthCheck: return item result
BatchUpdateChannelHealthCheck->>ChannelCache: refresh after success
BatchUpdateChannelHealthCheck-->>Client: return aggregate results
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ 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.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@web/default/src/features/system-settings/models/channel-health-check-table.tsx`:
- Around line 686-715: Add accessible aria-labels to every per-row health-check
control, including the scheduled and auto-ban Switches plus threshold,
re-enable, endpoint, and stream Selects. Build each label from the column
purpose and the current channel context, updating the control definitions in the
table configuration while preserving their existing values and change handlers.
In `@web/default/src/i18n/locales/ru.json`:
- Line 5186: Update the “Follow global” translation in the Russian locale to
clearly express inheriting or using the global setting, replacing the unnatural
“Как глобально” wording with an appropriate phrase such as “Следовать глобальным
настройкам”.
In `@web/default/src/i18n/locales/zh-TW.json`:
- Around line 5174-5193: Update the zh-TW translations in the locale entries by
translating “All statuses” into Traditional Chinese and replacing the Simplified
“复查” character with Traditional “複” in both recheck-related strings, preserving
the existing translation meaning.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 4a4123df-7785-4548-bc30-5704b7828d94
📒 Files selected for processing (23)
controller/channel-test.gocontroller/channel.gocontroller/channel_test_internal_test.godto/channel_settings.gomodel/channel.gomodel/channel_health_check_test.gorouter/channel-router.gorouter/channel_router_test.goservice/channel.goservice/channel_enable_test.goweb/default/src/features/channels/api.tsweb/default/src/features/channels/components/dialogs/channel-test-dialog.tsxweb/default/src/features/channels/lib/channel-actions.tsweb/default/src/features/channels/types.tsweb/default/src/features/system-settings/models/channel-health-check-table.tsxweb/default/src/features/system-settings/models/routing-reliability-section.tsxweb/default/src/i18n/locales/en.jsonweb/default/src/i18n/locales/fr.jsonweb/default/src/i18n/locales/ja.jsonweb/default/src/i18n/locales/ru.jsonweb/default/src/i18n/locales/vi.jsonweb/default/src/i18n/locales/zh-TW.jsonweb/default/src/i18n/locales/zh.json
Support per-channel health check management with a channel-level configuration table and layout updates on the Routing Reliability page. Each channel can enable or disable scheduled tests and override the disable threshold, re-enable-on-success policy, endpoint type, and stream mode. Failure auto-ban continues to use the channel auto-ban setting. Scheduled tests and "Test All Channels" skip channels with scheduled health checks disabled. Single-channel manual tests remain available and use the channel endpoint/stream settings as defaults.
Refresh channel baselines for undrafted rows when server data changes, sync the routing reliability save baseline when defaults reload, and preserve newer in-flight channel drafts after a successful partial save.
为渠道健康检查表格的行内 Switch/Select/Input 增加带渠道上下文的 aria-label;修正俄语 Follow global 译法,并将 zh-TW 中未翻译的 All statuses 与简体「复查」改为繁体对应文案。
33d99b9 to
b487001
Compare
Important
This PR is AI-assisted. The root cause, fix scope, and typecheck results were reviewed before submission.
📝 Description
Support per-channel health check management on the Routing Reliability page.
Related upstream discussion: #5205 / #5206 cover a simpler skip-auto-test toggle. This PR provides broader per-channel health-check controls rather than a single skip flag.
🚀 Type of change
🔗 Related Issue
✅ Checklist
📸 Proof of Work
Backend:
Frontend:
Summary by CodeRabbit
New Features
Bug Fixes
Tests