feat: add configurable automatic update checks#1941
Conversation
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughThis PR introduces configurable control over automatic update checks via a new Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
🚥 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)
internal/cmn/backoff/retry_test.go (1)
209-209: Useassert.Containsfor consistency with other assertions in this test.Lines 180 and 194 use
assert.Containsandassert.NotContains, but this line usesassert.True(t, strings.Contains(...)). Usingassert.Containsdirectly would be more consistent and provides better failure messages.♻️ Suggested refactor for consistency
- assert.True(t, strings.Contains(buf.String(), "Retry attempts exhausted")) + assert.Contains(t, buf.String(), "Retry attempts exhausted")🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@internal/cmn/backoff/retry_test.go` at line 209, Replace the indirect string containment check that uses assert.True(t, strings.Contains(...)) with the direct assertion helper assert.Contains to match the other assertions in the test; specifically change the assertion that inspects buf.String() for "Retry attempts exhausted" to use assert.Contains(t, buf.String(), "Retry attempts exhausted") so failure messages are consistent and clearer (replace the call site where assert.True and strings.Contains are used).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@internal/cmn/backoff/retry_test.go`:
- Line 209: Replace the indirect string containment check that uses
assert.True(t, strings.Contains(...)) with the direct assertion helper
assert.Contains to match the other assertions in the test; specifically change
the assertion that inspects buf.String() for "Retry attempts exhausted" to use
assert.Contains(t, buf.String(), "Retry attempts exhausted") so failure messages
are consistent and clearer (replace the call site where assert.True and
strings.Contains are used).
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 7cf6e230-6fde-4126-8ef3-e4046514fd6c
📒 Files selected for processing (12)
internal/cmn/backoff/retry.gointernal/cmn/backoff/retry_test.gointernal/cmn/config/config.gointernal/cmn/config/definition.gointernal/cmn/config/key_hints.gointernal/cmn/config/loader.gointernal/cmn/config/loader_test.gointernal/cmn/schema/config.schema.jsoninternal/cmn/schema/config_schema_test.gointernal/service/frontend/server.gointernal/upgrade/cache.gointernal/upgrade/upgrade_test.go
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #1941 +/- ##
==========================================
+ Coverage 68.60% 68.64% +0.03%
==========================================
Files 462 462
Lines 58322 58359 +37
==========================================
+ Hits 40013 40061 +48
+ Misses 14618 14607 -11
Partials 3691 3691
... and 12 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
Summary
check_updatesconfig/env toggle for automatic web UI update checks, defaulting to enabledTesting
go test ./internal/cmn/config ./internal/cmn/backoff ./internal/upgrade ./internal/service/frontend ./internal/cmd -count=1go test ./internal/cmn/schema -count=1make fmtSummary by CodeRabbit
Release Notes
check_updatesboolean server configuration option (defaults to enabled) for controlling automatic update checksDAGU_CHECK_UPDATESenvironment variable, or server configuration settings