Page MenuHomePhabricator

Pick some preset build statuses
ClosedPublic

Authored by yelirekim on Jul 31 2016, 3:14 PM.
Tags
None
Referenced Files
F13060001: D16349.diff
Fri, Apr 19, 5:09 PM
Unknown Object (File)
Thu, Apr 11, 5:30 AM
Unknown Object (File)
Tue, Apr 9, 8:20 PM
Unknown Object (File)
Wed, Apr 3, 1:16 AM
Unknown Object (File)
Mon, Apr 1, 4:58 PM
Unknown Object (File)
Fri, Mar 29, 12:04 PM
Unknown Object (File)
Mar 10 2024, 6:19 PM
Unknown Object (File)
Feb 11 2024, 11:15 PM
Subscribers

Details

Summary

We're picking three useful groups of build statuses to provide as default queries:

  • Stuff not yet building
  • Stuff building
  • Stuff which has finished building

These are reasonable buckets for builds since (unlike most objects in phabricatorland) users are generally waiting impatiently for the machine to do something for them, rather than being responsible for doing something with the machine.

Test Plan

clicked around the search engine and enjoyed my defaults

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

yelirekim retitled this revision from to Pick some preset build statuses.
yelirekim updated this object.
yelirekim edited the test plan for this revision. (Show Details)
This revision is now accepted and ready to land.Jul 31 2016, 3:17 PM

Oh wait, I almost snuck something past you, but I think it's correct to change this? Previously "paused" was considered a status that would indicate a build was "completed". This doesn't make sense semantically.

I see where it will screw this up:

public function canPauseBuild() {
  if ($this->isAutobuild()) {
    return false;
  }

  return !$this->isComplete() &&
         !$this->isPaused() &&
         !$this->isPausing();
}

I did miss that, but agree that "Paused" is not correct semantically. It looks like most of the code already assumes this, and this probably fixes some bugs.

I don't immediately see any behavioral changes which don't seem like bug fixes -- that snippet you cited should be fine/unchanged? The other cases look like they're more correct after the change (e.g., allow you to abort a paused build, don't start following build steps if a build is paused).

I believe this will allow someone to issue a pause command to an already paused build.

Oh no, I confused myself terribly.

This revision was automatically updated to reflect the committed changes.

This one did seem possibly suspicious in BuildEngine:

if ($build->isPausing() && !$build->isComplete()) {
  $build->setBuildStatus(HarbormasterBuild::STATUS_PAUSED);
  $build->save();
}

But I think that one's moot (pausing while paused is fine/safe) and it's impossible to get into a state where it matters anyway (pausing while already paused isn't normally permitted) and it's deep in the internals (so users won't see it / get confused by it doing technically-correct-but-unintuitive things).