fix: install ProgressIndicator context before running interactive rebase on pooled thread - #994
Open
agentbridge-fixer[bot] wants to merge 1 commit into
Open
fix: install ProgressIndicator context before running interactive rebase on pooled thread#994agentbridge-fixer[bot] wants to merge 1 commit into
agentbridge-fixer[bot] wants to merge 1 commit into
Conversation
…ase on pooled thread git_rebase's interactive path (doInteractiveRebase) ran GitRebaseUtils.rebaseWithResult() directly inside a bare ApplicationManager.executeOnPooledThread() runnable, passing an EmptyProgressIndicator only as a call argument. That's not enough: git4idea's GitRebaseProcess internally calls checkForRebasingPublishedCommits() -> isRebasingPublishedCommit() -> isCommitPublishedBlocking(), which uses runBlockingCancellable(). That API requires a ProgressIndicator/coroutine Job to already be installed in the *calling thread's* context - it doesn't derive one from an indicator merely passed as a method argument. Since our pooled thread had no such context, every interactive rebase threw: java.lang.IllegalStateException: There is no ProgressIndicator or Job in this thread, the current job is not cancellable. Fix: wrap the pooled-thread rebase call in ProgressManager.getInstance().runProcess(runnable, indicator), which installs the indicator into the thread's progress context before running the work. The same indicator instance is now threaded through to GitRebaseUtils.rebaseWithResult() as well, instead of constructing a second, disconnected EmptyProgressIndicator. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
|
IDE Compatibility Matrix
Generated from the real-IDE integration bench (
Logged IDE errors (non-gating)Scraped from the IDE log during the run. These do not fail a matrix cell (the cell reflects the tool's MCP response) — they are listed for visibility while the bench matures.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Problem
git_rebase's interactive path threw:Root cause
GitRebaseTool.doInteractiveRebase()runsGitRebaseUtils.rebaseWithResult()on a rawApplicationManager.executeOnPooledThread()runnable, passing anEmptyProgressIndicatoronly as a call argument.That's not sufficient: git4idea's
GitRebaseProcessinternally callscheckForRebasingPublishedCommits()->isRebasingPublishedCommit()->isCommitPublishedBlocking(), which usesrunBlockingCancellable(). That platform API requires aProgressIndicator/coroutineJobto already be installed in the calling thread's context -- it does not derive one from an indicator merely passed as a method parameter. A bare pooled-thread runnable has no such context, so the call fails every time this code path is hit (i.e. any interactive rebase where the upstream branch has published/pushed commits).Fix
Wrap the pooled-thread rebase call in
ProgressManager.getInstance().runProcess(runnable, indicator), which installs the given indicator into the thread's progress context before running the work. The same indicator instance is now threaded through toGitRebaseUtils.rebaseWithResult()as well, instead of constructing a second, disconnectedEmptyProgressIndicator().Testing
build_project(plugin-core module): 0 errors.Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com