Homec4science

Replace "Cancel Build" with "Stop", "Resume" and "Restart"

Authored by epriestley <git@epriestley.com> on Jan 6 2014, 21:32.

Description

Replace "Cancel Build" with "Stop", "Resume" and "Restart"

Summary:
Ref T1049. Currently you can cancel a build, but now that we're tracking a lot more state we can stop, resume, and restart builds.

When the user issues a command against a build, I'm writing it into an auxiliary queue (HarbormasterBuildCommand) and then reading them out in the worker. This is mostly to avoid race messes where we try to save() the object in multiple places: basically, the BuildEngine is the only thing that writes to Build objects, and it holds a lock while it does it.

Test Plan:

  • Created a plan which runs "sleep 2" a bunch of times in a row.
  • Stopped, resumed, and restarted it.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran, chad

Maniphest Tasks: T1049

Differential Revision: https://secure.phabricator.com/D7892

Details

Committed
epriestley <git@epriestley.com>Jan 6 2014, 21:32
Pushed
aubortJan 31 2017, 17:16
Parents
rPH4d5e8a149a7d: Split Harbormaster workers apart so build steps can run in parallel
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPH1786093c6e41: Replace "Cancel Build" with "Stop", "Resume" and "Restart" (authored by epriestley <git@epriestley.com>).Jan 6 2014, 21:32