-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Fix IntelliJ remote config sync freeze and JSON parsing issues #8801
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Only schedule sync job when remote server URL is configured - Catch all exceptions including JsonSyntaxException - Fix logic error where configJs and configJson overwrite each other - Properly clean up sync job when cancelled Fixes #8769 Co-authored-by: dallin <[email protected]> Generated with [Continue](https://continue.dev) Co-Authored-By: Continue <[email protected]>
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1 issue found across 1 file
Prompt for AI agents (all 1 issues)
Understand the root cause of the following 1 issues and fix them.
<file name="extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/services/ContinueExtensionSettingsService.kt">
<violation number="1" location="extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/services/ContinueExtensionSettingsService.kt:135">
The fix incorrectly writes JavaScript content (`configJs`) to the `config.json` file path. The codebase has a clear separation of concerns where `config.json` is for static configuration and `config.js` is for dynamic configuration logic. This change breaks that pattern by putting JavaScript code into a JSON file, which will cause parsing errors in other parts of the system that expect a JSON structure.</violation>
</file>
Reply to cubic to teach it or ask questions. Re-run a review with @cubic-dev-ai review this PR
...om/github/continuedev/continueintellijextension/services/ContinueExtensionSettingsService.kt
Outdated
Show resolved
Hide resolved
Use separate file paths for JavaScript (config.js) and JSON (config.json) configuration files to maintain proper separation of concerns. Co-authored-by: dallin <[email protected]> Generated with [Continue](https://continue.dev) Co-Authored-By: Continue <[email protected]>
|
The CLI test failures are unrelated to this PR, which only modifies IntelliJ plugin code. The failing tests ( This PR only changes:
No CLI code was modified. The test failures appear to be a timing issue in the test suite itself. |
Update on CI FailuresAll CI failures are unrelated to this PR and are infrastructure issues: 1. CLI Test Failures (macos-latest)
2. VS Code E2E Test Failure
Files ChangedThis PR only modifies: No CLI or VS Code code was touched, making these test failures impossible to be caused by this PR's changes. The IntelliJ plugin fixes are solid and ready for review. |
…ix-intellij-remote-config-sync-8769
Description
This PR fixes the IntelliJ plugin freeze issue reported in #8769 caused by the remote config sync feature.
Changes
1. Only schedule sync when remote server URL is configured
The sync job is now only scheduled when remoteConfigServerUrl is not null or empty. Previously, the job would always run even when no remote server was configured, wasting resources and potentially causing issues.
2. Catch all exceptions including JsonSyntaxException
Changed from catching only IOException to catching all Exception types. The JsonSyntaxException thrown by Gson is not an IOException, so it was previously uncaught and would freeze the plugin. Now all exceptions are caught and reported to Sentry.
3. Fix file overwrite logic
The original code had both configJs and configJson writing to the same file path, causing them to overwrite each other. The fix now:
4. Properly clean up sync job
Set remoteSyncFuture to null after cancelling to ensure clean state management.
Root Cause
The error occurred when the remote config server returned a plain string response instead of the expected JSON object structure with configJson and configJs fields. Since JsonSyntaxException was not being caught, it would propagate and freeze the plugin.
Testing
The fix ensures:
Fixes #8769
This agent session was co-authored by dallin and Continue at https://hub.continue.dev/agents/77ea0cdb-c1c5-44c4-b5fd-b6e945755661
Summary by cubic
Fixes IntelliJ plugin freezes during remote config sync by only scheduling when a server URL is set, catching JSON parsing errors, and writing config.js and config.json to separate files to prevent overwrites. Fixes #8769.
Written for commit 2760ca2. Summary will update automatically on new commits.