Skip to content

fix: send isRunning=false in stop() - #40

Merged
pashidlos merged 4 commits into
masterfrom
fix/343-stop-is-running
Oct 24, 2026
Merged

pashidlos merged 4 commits into
masterfrom
fix/343-stop-is-running

Conversation

@pashidlos

@pashidlos pashidlos commented Oct 24, 2026 •

Copy link
Copy Markdown
Member

Problem

VisualRegressionTracker.stop() no longer stops the build on backend api-v5.1.0 and later. The build stays Running in the UI (Visual-Regression-Tracker/backend#343).

Root cause

stop() sends PATCH /builds/:id with {} as the body. The backend used to treat an empty body as isRunning = false, but the NestJS 11 upgrade (Visual-Regression-Tracker/backend#336) removed that fallback, so {} is now a no-op. The frontend sends {"isRunning": false} explicitly.

Fix

stop() now sends {"isRunning": false}. Every backend version supports this. This is the change from #38 by @mokhtardziri (credited as co-author). This PR drops the unrelated whitespace change to setup.py from #38 and updates the unit test that asserted the old empty body.

The backend is also being made backward compatible again (Visual-Regression-Tracker/backend#410), so older SDK releases keep working too.

Stacked on #39 (CI/deps refresh). Please merge #39 first. Until then this PR's diff also shows #39's commit.

Tests

  • test__stop__should_stop_build now asserts data={'isRunning': False}. It fails on the old code and passes with the fix.
  • pytest tests: 67 passed (Python 3.14). pylint -E: 10.00/10.

Fixes Visual-Regression-Tracker/backend#343
Supersedes #38

🤖 Generated with Claude Code

Pavlo Strunkin and others added 3 commits October 24, 2026 10:41
CI no longer starts (zero jobs; the matrix asks for Python 3.6 and uses
outdated actions), and the async Playwright tests fail with current
pytest-asyncio / Python 3.12+.

- test on Python 3.9 - 3.14, python_requires >= 3.9
- actions/checkout@v4, actions/setup-python@v5, drop the archived
  microsoft/playwright-github-action (install chromium deps directly)
- run the Codacy coverage upload only on push (no secrets on fork PRs)
- requirements: drop pre-3.9 markers and nest_asyncio, require
  pytest-asyncio >= 0.24 (loop_scope)
- tests: move async Playwright tests to their own module with
  session-scoped pytest-asyncio fixtures, and scope the sync Playwright
  fixtures per module so its event loop is stopped before them

Co-Authored-By: Claude Opus 5.5 <[email protected]>
stop() sent PATCH /builds/:id with an empty JSON body. Backend api-v5.1.0
dropped the fallback that treated an empty body as a stop request, so the
build stays running. Send {"isRunning": false} explicitly, which every
backend version accepts.

Based on #38 by @mokhtardziri.

Fixes Visual-Regression-Tracker/backend#343

Co-Authored-By: mokhtar.dziri <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
@pashidlos
pashidlos force-pushed the fix/343-stop-is-running branch from 40b7842 to 77b1621 Compare October 24, 2026 07:44
@pashidlos
pashidlos merged commit d2f1d17 into master Oct 24, 2026
6 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.

Unable to stop a build using the Python SDK

1 participant