Skip to content

fix: send isRunning=false in stop() — empty PATCH body no longer stops build on backend 5.1.0+ - #118

Merged
pashidlos merged 2 commits into
masterfrom
fix/stop_running_build_right_way
Oct 24, 2026
Merged

pashidlos merged 2 commits into
masterfrom
fix/stop_running_build_right_way

Conversation

@oleg-rd

@oleg-rd oleg-rd commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

Problem

When we want to stop build, SDK sends PATCH /builds/{id} with an empty body. Backend relied on a fallback that treated an empty body as isRunning = false:

// src/builds/builds.controller.ts (≤ api-v5.0.13)
if (modifyBuildDto === null || Object.keys(modifyBuildDto).length === 0) {
  modifyBuildDto.isRunning = false;
}

This was removed in Visual-Regression-Tracker/backend@a5da984 (#336, NestJS v11 upgrade), released in api-v5.1.0. Since then, stop() is a no-op and builds stay in "running" state.

Fix

  • Added request/ModifyBuildRequest (isRunning), mirroring backend ModifyBuildDto
  • stop() now sends {"isRunning":false}
  • shouldStopBuild test now asserts the request body

Backward compatible with older backends (explicit isRunning: false was always supported).

@oleg-rd

oleg-rd commented Oct 14, 2026

Copy link
Copy Markdown
Contributor Author

Hey @pashidlos, could you take a look when you have a chance?

@pashidlos
pashidlos merged commit ca5785a into master Oct 24, 2026
1 check 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.

2 participants