Skip to content

Update mechanism change#281

Merged
sourya-deepsource merged 9 commits intomasterfrom
update-mechanism-change
Mar 21, 2026
Merged

Update mechanism change#281
sourya-deepsource merged 9 commits intomasterfrom
update-mechanism-change

Conversation

@jai-deepsource
Copy link
Contributor

No description provided.

- Remove silent auto-update mechanism, replace with update check that
  notifies users when a new version is available
- Add `deepsource update` subcommand for explicit manual updates
- Remove AutoUpdate config option since updates are now user-initiated
- Rename ShouldAutoUpdate to ShouldCheckForUpdate to reflect new behavior
- Replace style.Successf with fmt.Fprintf for the "already up to date" message
- Keeps output simple and consistent with non-styled update flow
- Skip update check when running update command
- Colorize update notification
- Show examples only with --help -v
- Simplify update success message
- Derive binary name from os.Args[0] instead of hardcoding 'deepsource'
- Replace em dash with comma in the message
@deepsource-io
Copy link

deepsource-io bot commented Mar 21, 2026

DeepSource Code Review

We reviewed changes in d444ee5...23b4adb on this pull request. Below is the summary for the review, and you can see the individual issues we found as inline review comments.

See full review on DeepSource ↗

PR Report Card

Overall Grade   Security  

Reliability  

Complexity  

Hygiene  

Coverage  

Feedback

  • Centralize validation for all external update artifacts
    • Integrity checks, path-sanitization, and metadata parsing all guard the same boundary: untrusted update data. Consolidate those checks into a single validation/ingestion layer so every update path reuses the same policy and avoids gaps.
  • Make update lifecycle explicit, not implicit
    • Automatic background timers, one-off notifications, and removed config flags are symptoms of mixed implicit behaviors. Define clear start/stop/check APIs and use callers to drive state so behavior is discoverable and testable rather than buried in implicit tasks.
  • One coordinator owns update state and concurrency
    • Multiple guards against "redundant checks" and ad-hoc in-progress flags indicate scattered state handling. Replace scattered flags with a single update coordinator (with an in-progress lock and clear state transitions) to prevent races and duplicated logic.

Code Review Summary

Analyzer Status Updated (UTC) Details
Go Mar 20, 2026 11:59p.m. Review ↗
Secrets Mar 20, 2026 11:59p.m. Review ↗
Test coverage Mar 20, 2026 11:59p.m. Review ↗

Code Coverage Summary

Language Line Coverage (New Code) Line Coverage (Overall)
Aggregate
10%
[⤫ below threshold]
24.8%
[▼ down 0.1% from master]
Go
10%
[⤫ below threshold]
24.8%
[▼ down 0.1% from master]
[✓ above threshold]

➟ Additional coverage metrics may have been reported. See full coverage report ↗

@sourya-deepsource sourya-deepsource merged commit a4680e9 into master Mar 21, 2026
11 of 12 checks passed
@sourya-deepsource sourya-deepsource deleted the update-mechanism-change branch March 21, 2026 04:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants