Skip to content

UN-1031 [FEAT] In Prompt Studio, provide a way to stop a running prompt - #2283

Open
praveen-formido wants to merge 8 commits into
mainfrom
UN-1031-abort-running-prompt
Open

praveen-formido wants to merge 8 commits into
mainfrom
UN-1031-abort-running-prompt

UN-1031 [FIX] Address review: lock the cancel client, clarify a ternary

6d086e1
Select commit
Loading
Failed to load commit list.
SonarQubeCloud / SonarCloud Code Analysis succeeded Sep 15, 2026 in 1m 19s

Annotations

Check failure on line 1514 in workers/executor/executors/legacy_executor.py

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Refactor this function to reduce its Cognitive Complexity from 23 to the 15 allowed.

See more on https://sonarcloud.io/project/issues?id=Zipstack_unstract&issues=AaCegXk6re9coQVtRwqY&open=AaCegXk6re9coQVtRwqY&pullRequest=2283

Check warning on line 159 in backend/prompt_studio/prompt_studio_core_v2/tests/test_cancel_checkpoints.py

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Refactor this exception test to have only one invocation possibly throwing an exception.

See more on https://sonarcloud.io/project/issues?id=Zipstack_unstract&issues=AaCegXanre9coQVtRwqP&open=AaCegXanre9coQVtRwqP&pullRequest=2283

Check warning on line 190 in backend/prompt_studio/prompt_studio_core_v2/tests/test_cancel_checkpoints.py

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Refactor this exception test to have only one invocation possibly throwing an exception.

See more on https://sonarcloud.io/project/issues?id=Zipstack_unstract&issues=AaCegXanre9coQVtRwqQ&open=AaCegXanre9coQVtRwqQ&pullRequest=2283

Check failure on line 384 in workers/ide_callback/tasks.py

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Refactor this function to reduce its Cognitive Complexity from 35 to the 15 allowed.

See more on https://sonarcloud.io/project/issues?id=Zipstack_unstract&issues=AaCegXldre9coQVtRwqb&open=AaCegXldre9coQVtRwqb&pullRequest=2283

Check failure on line 260 in unstract/sdk1/src/unstract/sdk1/utils/retry_utils.py

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Refactor this function to reduce its Cognitive Complexity from 24 to the 15 allowed.

See more on https://sonarcloud.io/project/issues?id=Zipstack_unstract&issues=AaCegXoZre9coQVtRwqe&open=AaCegXoZre9coQVtRwqe&pullRequest=2283

Check warning on line 176 in unstract/sdk1/tests/test_retry_abort.py

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Refactor this exception test to have only one invocation possibly throwing an exception.

See more on https://sonarcloud.io/project/issues?id=Zipstack_unstract&issues=AaCegXnQre9coQVtRwqc&open=AaCegXnQre9coQVtRwqc&pullRequest=2283

Check failure on line 83 in unstract/sdk1/src/unstract/sdk1/adapters/x2text/llm_whisperer_v2/src/helper.py

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Refactor this function to reduce its Cognitive Complexity from 16 to the 15 allowed.

See more on https://sonarcloud.io/project/issues?id=Zipstack_unstract&issues=AaCegXnwre9coQVtRwqd&open=AaCegXnwre9coQVtRwqd&pullRequest=2283

Check warning on line 407 in workers/tests/test_prompt_run_cancel_executor.py

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Refactor this exception test to have only one invocation possibly throwing an exception.

See more on https://sonarcloud.io/project/issues?id=Zipstack_unstract&issues=AaCegXkPre9coQVtRwqV&open=AaCegXkPre9coQVtRwqV&pullRequest=2283

Check failure on line 239 in unstract/sdk1/src/unstract/sdk1/utils/aborting.py

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Refactor this function to reduce its Cognitive Complexity from 17 to the 15 allowed.

See more on https://sonarcloud.io/project/issues?id=Zipstack_unstract&issues=AaCegXohre9coQVtRwqf&open=AaCegXohre9coQVtRwqf&pullRequest=2283

Check failure on line 567 in backend/prompt_studio/prompt_studio_core_v2/views.py

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Define a constant instead of duplicating this literal "Refused dispatch under run %s: it belongs to another tool" 3 times.

See more on https://sonarcloud.io/project/issues?id=Zipstack_unstract&issues=AaCemMFWMUsuPm-jVF_X&open=AaCemMFWMUsuPm-jVF_X&pullRequest=2283

Check failure on line 1220 in workers/executor/executors/legacy_executor.py

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Refactor this function to reduce its Cognitive Complexity from 24 to the 15 allowed.

See more on https://sonarcloud.io/project/issues?id=Zipstack_unstract&issues=AaCegXk6re9coQVtRwqX&open=AaCegXk6re9coQVtRwqX&pullRequest=2283

Check failure on line 664 in backend/prompt_studio/prompt_studio_core_v2/views.py

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Define a constant instead of duplicating this literal "Prompt run %s cancelled before dispatch" 3 times.

See more on https://sonarcloud.io/project/issues?id=Zipstack_unstract&issues=AaCegXf-re9coQVtRwqR&open=AaCegXf-re9coQVtRwqR&pullRequest=2283

Check warning on line 88 in backend/prompt_studio/prompt_studio_core_v2/tests/test_cancel_checkpoints.py

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Refactor this exception test to have only one invocation possibly throwing an exception.

See more on https://sonarcloud.io/project/issues?id=Zipstack_unstract&issues=AaCegXanre9coQVtRwqN&open=AaCegXanre9coQVtRwqN&pullRequest=2283

Check failure on line 82 in workers/executor/executors/legacy_executor.py

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Refactor this function to reduce its Cognitive Complexity from 25 to the 15 allowed.

See more on https://sonarcloud.io/project/issues?id=Zipstack_unstract&issues=AaCegXk6re9coQVtRwqW&open=AaCegXk6re9coQVtRwqW&pullRequest=2283

Check failure on line 2587 in workers/executor/executors/legacy_executor.py

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Refactor this function to reduce its Cognitive Complexity from 17 to the 15 allowed.

See more on https://sonarcloud.io/project/issues?id=Zipstack_unstract&issues=AaCegXk6re9coQVtRwqa&open=AaCegXk6re9coQVtRwqa&pullRequest=2283

Check failure on line 1014 in backend/prompt_studio/prompt_studio_core_v2/views.py

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Refactor this function to reduce its Cognitive Complexity from 21 to the 15 allowed.

See more on https://sonarcloud.io/project/issues?id=Zipstack_unstract&issues=AaCegXf-re9coQVtRwqS&open=AaCegXf-re9coQVtRwqS&pullRequest=2283

Check failure on line 1880 in workers/executor/executors/legacy_executor.py

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Refactor this function to reduce its Cognitive Complexity from 16 to the 15 allowed.

See more on https://sonarcloud.io/project/issues?id=Zipstack_unstract&issues=AaCegXk6re9coQVtRwqZ&open=AaCegXk6re9coQVtRwqZ&pullRequest=2283

Check failure on line 2259 in backend/prompt_studio/prompt_studio_core_v2/prompt_studio_helper.py

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Refactor this function to reduce its Cognitive Complexity from 22 to the 15 allowed.

See more on https://sonarcloud.io/project/issues?id=Zipstack_unstract&issues=AaCegXg7re9coQVtRwqU&open=AaCegXg7re9coQVtRwqU&pullRequest=2283

Check warning on line 131 in backend/prompt_studio/prompt_studio_core_v2/tests/test_cancel_checkpoints.py

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Refactor this exception test to have only one invocation possibly throwing an exception.

See more on https://sonarcloud.io/project/issues?id=Zipstack_unstract&issues=AaCegXanre9coQVtRwqO&open=AaCegXanre9coQVtRwqO&pullRequest=2283