Page MenuHomePhabricator

Pick some preset build statuses
ClosedPublic

Authored by yelirekim on Jul 31 2016, 3:14 PM.
Tags
None
Referenced Files
F14059945: D16349.diff
Sun, Nov 17, 10:42 PM
F14046087: D16349.diff
Wed, Nov 13, 6:03 PM
F14037402: D16349.diff
Sun, Nov 10, 3:41 PM
F14031864: D16349.id39320.diff
Sat, Nov 9, 12:05 PM
F14031863: D16349.id39318.diff
Sat, Nov 9, 12:05 PM
F14031862: D16349.id.diff
Sat, Nov 9, 12:05 PM
F14021658: D16349.diff
Wed, Nov 6, 10:57 AM
F14019698: D16349.diff
Tue, Nov 5, 11:29 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
Branch
build_status_presets (branched from master)
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 13197
Build 16901: Run Core Tests
Build 16900: arc lint + arc unit

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).