Page MenuHomePhabricator

Implement build generations in Harbormaster
ClosedPublic

Authored by hach-que on Aug 21 2014, 12:40 PM.
Tags
None
Referenced Files
F13119005: D10321.diff
Mon, Apr 29, 2:46 PM
Unknown Object (File)
Wed, Apr 24, 10:46 PM
Unknown Object (File)
Sat, Apr 20, 9:29 AM
Unknown Object (File)
Thu, Apr 11, 7:40 AM
Unknown Object (File)
Mon, Apr 8, 10:05 AM
Unknown Object (File)
Thu, Apr 4, 1:05 PM
Unknown Object (File)
Thu, Apr 4, 6:35 AM
Unknown Object (File)
Mar 29 2024, 1:54 AM
Subscribers

Details

Summary

Ref T5932. Ref T5936. This implements build generations in Harbormaster, which provides the infrastructure required to both show users the previous states of restarted builds and to allow users to forcefully abort builds (and their targets).

You can view previous generations of a build by adding ?g=<n> to the URI, but this isn't exposed in the UI anywhere yet.

Test Plan

Ran a build plan with a Sleep step in it. Reconfigured it for various sleep times and viewed previous generations of the build after restarting it.

Diff Detail

Repository
rP Phabricator
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

hach-que edited edge metadata.

Move the restarts above "Status" so the padding doesn't look weird

resources/sql/autopatches/20140821.harbormasterbuildgen.1.sql
3

These should probably be INT UNSIGNED unless you have scary plans for negative generations

src/applications/harbormaster/engine/HarbormasterBuildEngine.php
132

This gets saved as soon as we return. Can we omit this?

src/applications/harbormaster/query/HarbormasterBuildQuery.php
115–116

Can we use withBuildGenerations() here instead of foreach below?

src/applications/harbormaster/query/HarbormasterBuildQuery.php
115–116

No, because the generation number is particular to each build PHID, so there's no way to say "with build PHIDs and associated build generations". For example, if I'm fetching two builds, one at generation 1 and another at generation 2, I don't want to retrieve generation 1 targets on the generation 2 build, thus the foreach is required to do filtering.

I can probably throw array_unique in there, but it's questionable how many results that will reduce it by.

Changes requested in code review

epriestley edited edge metadata.
epriestley added inline comments.
src/applications/harbormaster/query/HarbormasterBuildQuery.php
115–116

Oh, right.

We could do some kind of magic junk here where pass pairs in, but since restarts are hypothetically rare anyway this seems reasonable as-is.

This revision now requires changes to proceed.Aug 21 2014, 12:54 PM
This revision is now accepted and ready to land.Aug 21 2014, 12:54 PM
hach-que updated this revision to Diff 24850.

Closed by commit rPefadfbbc97f9 (authored by @hach-que).