镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

[FIX] Clear GcpInstance when restarting a run - #1225

Merged
canihavesomecoffee merged 2 commits into
CCExtractor:masterfrom
NaitikVerma6776:fix/restart-clears-gcp-instance
Oct 19, 2026
Merged

canihavesomecoffee merged 2 commits into
CCExtractor:masterfrom
NaitikVerma6776:fix/restart-clears-gcp-instance

Conversation

@NaitikVerma6776

Copy link
Copy Markdown
Contributor

Fixes #1224

What was wrong

Restarting a run (API POST /api/v1/runs/<id>/restart or UI /test/restart_test/<id>) cleared progress and results so the run looked pending again. It left the GcpInstance row in place.

CI treats any test with a GcpInstance as already running:

  • gcp_instance excludes those ids from the pending queue
  • start_test returns early if a row exists

So restarting a running or stuck run never started a new VM.

What this PR does

Delete the GcpInstance row in both restart paths. The old VM, if it is still up, becomes an orphan and can be removed by the existing orphan scanner.

Test plan

  • API restart removes a leftover GcpInstance
  • UI restart removes a leftover GcpInstance

Restart only cleared progress and results, so cron still treated the test as running and never started a new VM.

Fixes CCExtractor#1224
Sonar python:S6663 failed the PR quality gate because MIMEAccept was indexed with a string. Use accept_json instead.
@canihavesomecoffee
canihavesomecoffee force-pushed the fix/restart-clears-gcp-instance branch from c09fb37 to 0a9ae41 Compare October 19, 2026 16:37
@sonarqubecloud

Copy link
Copy Markdown

@canihavesomecoffee
canihavesomecoffee merged commit 70134df into CCExtractor:master Oct 19, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Restarting a run leaves GcpInstance, so CI never re-queues it

2 participants