Skip to content

fix: harden JetBrains remote config sync to prevent IDE freezes#11891

Merged
RomneyDa merged 1 commit intomainfrom
jb-config-sync
Mar 26, 2026
Merged

fix: harden JetBrains remote config sync to prevent IDE freezes#11891
RomneyDa merged 1 commit intomainfrom
jb-config-sync

Conversation

@RomneyDa
Copy link
Copy Markdown
Contributor

@RomneyDa RomneyDa commented Mar 26, 2026

Summary

  • Remove service<ContinueSentryService>().report(...) from the remote config sync catch block — this call could itself throw from the background executor thread, letting the original exception escape and silently killing all future scheduled sync runs (a ScheduledFuture stops rescheduling when the runnable throws)
  • Replace with Logger.warn() so sync failures are visible in the IDEA log
  • Add explicit connectTimeout(5000) / readTimeout(5000) to prevent a hung remote server from blocking the shared AppScheduledExecutorService indefinitely
  • Early-return in both syncRemoteConfig() and addRemoteSyncJob() when remoteConfigServerUrl is not configured, so no work is done at all for users who don't use this deprecated setting
  • Remove redundant addRemoteSyncJob() call from reset(), which only restores UI fields from saved state

Ref: #8606 (comment)

Test plan

  • Verify IDE starts without freezing when remoteConfigServerUrl is not set (default)
  • Verify remote config sync still works when a valid URL is configured
  • Verify sync failure with an invalid/unreachable URL logs a warning and doesn't freeze the IDE
  • Verify sync failure doesn't prevent future sync attempts

Summary by cubic

Prevents IDE freezes by hardening the JetBrains remote config sync. Failures now log without killing future runs, and hung servers no longer block the shared executor.

  • Bug Fixes
    • Replaced service<ContinueSentryService>().report(...) with Logger.warn() so exceptions don’t escape the scheduler thread.
    • Added connectTimeout(5000) and readTimeout(5000) to HttpRequests to avoid blocking AppScheduledExecutorService.
    • Early-return when remoteConfigServerUrl is empty in both syncRemoteConfig() and addRemoteSyncJob().
    • Always cancel any existing remoteSyncFuture before scheduling; removed redundant addRemoteSyncJob() from reset().

Written for commit 4a85441. Summary will update on new commits.

Remove Sentry error reporting from the sync catch block — the
service<ContinueSentryService>() call could itself throw from the
background thread, letting the original exception escape and silently
killing all future scheduled runs of the sync task.

Replace with IDEA Logger warnings so failures are visible in the IDE
log. Add explicit connect/read timeouts (5s) to prevent a hung server
from blocking the shared executor indefinitely. Early-return when the
remote config URL is not configured so no work is done at all.

Remove redundant addRemoteSyncJob() call from settings reset(), which
only restores UI fields and should not restart the sync.

Ref: #8606 (comment)
@RomneyDa RomneyDa requested a review from a team as a code owner March 26, 2026 18:30
@RomneyDa RomneyDa requested review from Patrick-Erichsen and removed request for a team March 26, 2026 18:30
@dosubot dosubot Bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Mar 26, 2026
@continue
Copy link
Copy Markdown
Contributor

continue Bot commented Mar 26, 2026

No documentation updates needed for this PR.

This is an internal bug fix that hardens the JetBrains remote config sync implementation to prevent IDE freezes. The changes (adding timeouts, improving error handling, code cleanup) don't affect any user-facing behavior or APIs. The remote config sync feature continues to work the same way from a user's perspective—it just operates more reliably now.

Additionally, the remoteConfigServerUrl setting mentioned in the PR is a deprecated feature that isn't documented in the Continue docs.

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

@github-project-automation github-project-automation Bot moved this from Todo to In Progress in Issues and PRs Mar 26, 2026
@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label Mar 26, 2026
@RomneyDa RomneyDa merged commit ea44368 into main Mar 26, 2026
67 checks passed
@RomneyDa RomneyDa deleted the jb-config-sync branch March 26, 2026 18:53
@github-project-automation github-project-automation Bot moved this from In Progress to Done in Issues and PRs Mar 26, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Mar 26, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

lgtm This PR has been approved by a maintainer size:M This PR changes 30-99 lines, ignoring generated files.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants