Allow build to be bumped to the front of the queue via the web interface
[?]
Aug 10, 2015, 2:18 PM
WE5Q2NVIIK4R2DUUZYLJFQVYK5O26EDEJRPK3CPGWHU3SEAC2DQACDependencies
- [2]
YMNEN6YYQueue: Remove the scheduling priority - [3]
T5BIOVJEAdd support for tracking custom metrics - [4]
46ADBTMQStart steps in order of ascending build ID - [5]
GNIEG2GC* Disambiguate jobs by jobset name. I.e. jobs with the same name in - [6]
ZI535LI6* hydra: 'new' UI for project/jobset/job/build - [7]
V4RNHJNR* Add a link to each project's homepage. Suggested by karltk. - [8]
MHVIT4JYSplit hydra-queue-runner.cc more - [9]
MOX7XJ2EMerge the BuildSchedulingInfo table into the Builds table - [10]
YAPITGB3* Boolean inputs. - [11]
B72GLND4 - [12]
G2T4WAHIStore the inputs of each evaluation in the database - [13]
4I2HF4L3Unindent - [14]
FHF6IZJQ* Basic release management: releases are now dynamically computed as - [15]
CMU3YKOU* Store the release name. - [16]
BHZXGT2H* Channels: provide an index page that lists all the packages in the - [17]
JTHWA6AMRename aggregate members to constituents - [18]
S5PV6IIM* Represent jobs explicitly in the DB. - [19]
TLZ2SPBR - [20]
L2E6EVE2* Merged the Build and Job tables. - [21]
4S5JF5JPUse latest DBIx::Class::Schema::Loader - [22]
R5D7DZPE - [23]
S66BOMVU* Added authentication. - [24]
RU7AQO7U* Role-based access control. Only admins can create projects. Only - [25]
IK53RV4V - [26]
EYNG4EL4* Regenerate the bindings from a clean sqlite database. - [27]
Y6AHH4THRemove the logfile and logSize columns from the database - [28]
4CELXP7PRemove the longDescription field - [29]
D3DIBMOK* For products that are directories (like manuals), allow a default - [30]
TQKGQ5R3 - [31]
ECBA3GQO* Make the schema class names match the case of the SQL table names. - [32]
CLJQCY2X* Store info about all the build actions and allow them to be - [33]
ZVTSOVHN* Support Subversion checkouts. - [34]
AHTEIK7G* Added a maintainers field to the Builds table. - [35]
QNDXPVCI* Store the jobset's nixExprPath and nixExprInput fields in a build to - [36]
XJRJ4J7MAdd user registration - [37]
SHIENRALClean up root controller - [38]
YTZOC7C5* Editing of jobset inputs. - [39]
VJHIHMEH* Store the meta.longDescription and meta.license attributes in the - [40]
SJLEZFC4check getHydraPath in stead of Envvar HYDRA_DBI directly - [41]
6BLUKEQ2* Caching of "path" inputs, and fake a revision number for those. - [42]
LZVO64YGMerge in the first bits of the API work - [43]
H7CNGK4O* Log evaluation errors etc. in the DB. - [44]
BD3GRK4B* Get rid of "positive failures" and separate log phases. - [45]
SHBLLAVH* More global substitution. - [46]
FTPCV25MStore aggregate members in the database - [47]
HJOEIMLRRefactor - [48]
OG3Z3QGCNamespace cleanup - [49]
LCKWLQW3* In Sqlite "release" is now a keyword, so use "release_" instead. - [50]
3E6IP3R3* Add the name of the jobset to ReleaseSetJobs, otherwise we can't - [51]
37R34XJO* Negative caching: don't perform a build if a dependency already - [52]
TWVSALRL* Allow the maximum number of concurrent builds per platform to be - [53]
3ZCEPLNO - [54]
YTIDBFGUDrop unused "disabled" columns - [55]
KOTB7BKV - [56]
PMNWRTGJAdd multiple output support - [*]
LBNVQXUB* Build the /build stuff in a separate controller. - [*]
Z6MDQIGO* A quick (non-Web 2.0) interface to manually add builds to a release. - [*]
J5UVLXOK* Start of a basic Catalyst web interface. - [*]
JIJDYWPYRemove the Build menu from the top bar - [*]
N22GPKYT* Put info about logs / build products in the DB. - [*]
RVHBV3B3Notify the queue runner when a build is deleted - [*]
D5QIOJGP* Move everything up one directory.
Change contents
- replacement in src/hydra-queue-runner/dispatcher.cc at line 147
return a_->lowestBuildID < b_->lowestBuildID;returna_->highestGlobalPriority != b_->highestGlobalPriority ? a_->highestGlobalPriority > b_->highestGlobalPriority :a_->lowestBuildID < b_->lowestBuildID; - edit in src/hydra-queue-runner/queue-monitor.cc at line 28
receiver buildsBumped(*conn, "builds_bumped"); - replacement in src/hydra-queue-runner/queue-monitor.cc at line 48
if (buildsCancelled.get() || buildsDeleted.get()) {printMsg(lvlTalkative, "got notification: builds cancelled");removeCancelledBuilds(*conn);if (buildsCancelled.get() || buildsDeleted.get() || buildsBumped.get()) {printMsg(lvlTalkative, "got notification: builds cancelled or bumped");processQueueChange(*conn); - replacement in src/hydra-queue-runner/queue-monitor.cc at line 68
auto res = txn.parameterized("select id, project, jobset, job, drvPath, maxsilent, timeout, timestamp from Builds where id > $1 and finished = 0 order by id")(lastBuildId).exec();auto res = txn.parameterized("select id, project, jobset, job, drvPath, maxsilent, timeout, timestamp, globalPriority from Builds where id > $1 and finished = 0 order by id")(lastBuildId).exec(); - edit in src/hydra-queue-runner/queue-monitor.cc at line 86
build->globalPriority = row["globalPriority"].as<int>(); - replacement in src/hydra-queue-runner/queue-monitor.cc at line 233
/* Update the lowest build ID field of each dependency. Thisis used by the dispatcher to start steps in order of buildID. */visitDependencies([&](const Step::ptr & step) {auto step_(step->state.lock());step_->lowestBuildID = std::min(step_->lowestBuildID, build->id);}, build->toplevel);build->propagatePriorities(); - replacement in src/hydra-queue-runner/queue-monitor.cc at line 246
void State::removeCancelledBuilds(Connection & conn)void Build::propagatePriorities(){/* Update the highest global priority and lowest build ID fieldsof each dependency. This is used by the dispatcher to startsteps in order of descending global priority and ascendingbuild ID. */visitDependencies([&](const Step::ptr & step) {auto step_(step->state.lock());step_->highestGlobalPriority = std::max(step_->highestGlobalPriority, globalPriority);step_->lowestBuildID = std::min(step_->lowestBuildID, id);}, toplevel);}void State::processQueueChange(Connection & conn) - replacement in src/hydra-queue-runner/queue-monitor.cc at line 263
std::set<BuildID> currentIds;std::map<BuildID, int> currentIds; - replacement in src/hydra-queue-runner/queue-monitor.cc at line 266
auto res = txn.exec("select id from Builds where finished = 0");auto res = txn.exec("select id, globalPriority from Builds where finished = 0"); - replacement in src/hydra-queue-runner/queue-monitor.cc at line 268
currentIds.insert(row["id"].as<BuildID>());currentIds[row["id"].as<BuildID>()] = row["globalPriority"].as<BuildID>(); - replacement in src/hydra-queue-runner/queue-monitor.cc at line 274
if (currentIds.find(i->first) == currentIds.end()) {auto b = currentIds.find(i->first);if (b == currentIds.end()) { - replacement in src/hydra-queue-runner/queue-monitor.cc at line 279
} else++i;continue;}if (i->second->globalPriority < b->second) {printMsg(lvlInfo, format("priority of build %1% increased") % i->first);i->second->globalPriority = b->second;i->second->propagatePriorities();}++i; - edit in src/hydra-queue-runner/state.hh at line 74
int globalPriority; - edit in src/hydra-queue-runner/state.hh at line 84
void propagatePriorities(); - replacement in src/hydra-queue-runner/state.hh at line 119
/* The lowest build ID depending on this step. *//* The highest global priority of any build depending on thisstep. */int highestGlobalPriority{0};/* The lowest ID of any build depending on this step. */ - edit in src/hydra-queue-runner/state.hh at line 292
/* Check the queue for new builds. */ - replacement in src/hydra-queue-runner/state.hh at line 295
void removeCancelledBuilds(Connection & conn);/* Handle cancellation, deletion and priority bumps. */void processQueueChange(Connection & conn); - edit in src/lib/Hydra/Controller/Build.pm at line 478
sub bump : Chained('buildChain') PathPart('bump') {my ($self, $c, $x) = @_;my $build = $c->stash->{build};requireProjectOwner($c, $build->project); # FIXME: require admin?$c->model('DB')->schema->txn_do(sub {$build->update({globalpriority => time()});});$c->flash->{successMsg} = "Build has been bumped to the front of the queue.";$c->res->redirect($c->uri_for($self->action_for("build"), $c->req->captures));} - replacement in src/lib/Hydra/Controller/Root.pm at line 91
entity => [$c->model('DB::Builds')->search({finished => 0}, { order_by => ["id"]})]entity => [$c->model('DB::Builds')->search({finished => 0}, { order_by => ["globalpriority desc", "id"]})] - edit in src/lib/Hydra/Schema/Builds.pm at line 136
data_type: 'integer'default_value: 0is_nullable: 0=head2 globalpriority - edit in src/lib/Hydra/Schema/Builds.pm at line 249
{ data_type => "integer", default_value => 0, is_nullable => 0 },"globalpriority", - replacement in src/lib/Hydra/Schema/Builds.pm at line 561
# Created by DBIx::Class::Schema::Loader v0.07043 @ 2015-07-30 16:52:20# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Y2lDtgY8EBLOuCHAI8fWRQ# Created by DBIx::Class::Schema::Loader v0.07043 @ 2015-08-10 15:10:41# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:rjifgnPtjY96MaQ7eiGzaA - edit in src/root/build.tt at line 99
<li><a href="[% c.uri_for('/build' build.id 'bump') %]">Bump up</a></li> - replacement in src/sql/hydra.sql at line 159
-- Information about scheduled builds.-- Priority within a jobset, set via meta.schedulingPriority. - edit in src/sql/hydra.sql at line 161
-- Priority among all builds, used by the admin to bump builds to-- the front of the queue via the web interface.globalPriority integer not null default 0, - edit in src/sql/hydra.sql at line 225
create function notifyBuildBumped() returns trigger as 'begin notify builds_bumped; return null; end;' language plpgsql;create trigger BuildBumped after update on Builds for each rowwhen (old.globalPriority != new.globalPriority) execute procedure notifyBuildBumped(); - file addition: upgrade-40.sql[64.3004]
alter table Builds add column globalPriority integer not null default 0;create function notifyBuildBumped() returns trigger as 'begin notify builds_bumped; return null; end;' language plpgsql;create trigger BuildBumped after update on Builds for each rowwhen (old.globalPriority != new.globalPriority) execute procedure notifyBuildBumped();