Remove Hydra::Helper::nix::txn_do from the Perl code

[?]
Apr 10, 2020, 4:13 PM
CUFVKLLAL54OHDMYUHVJZK46LLX7RJMUJUE5HWYDCGIOQ5TIGXZQC

Dependencies

  • [2] 4FGKYUTN Allow cancelling builds marked as busy
  • [3] 7OBWA6AZ hydra-evaluator: Fix error handling in fetching inputs
  • [4] B7KDPCRL Prevent inputs from being garbage collected during evaluation
  • [5] B3UW2ZRB Restart jobset evals efficiently
  • [6] JQQYF4S3 Fix build-queued plugin hook
  • [7] 6HWIUOSU Avoid fetching Projects/Jobsets just to get the name column
  • [8] HHWCS3QQ Jobs: populate Jobs.jobset_id field when writing from hydra-eval-jobset
  • [9] 36TOESVE * When marking a build as "keep", register it as a root right away
  • [10] 7DWCXNC7 Use the new Nix Perl bindings
  • [11] PDZD5QOR hydra-evaluator: handle the case where there is no previous jobset eval
  • [12] Q5HZWFCY Add support for darcs repositories.
  • [13] W5OAZWPD Drop the errorMsg column in the Jobs table
  • [14] LZO3C2KI * Hack around those SQLite timeouts: just retry the transaction.
  • [15] 4SFOPTHW Use query_params instead of params
  • [16] RJICSUYG * Align the apply/delete buttons.
  • [17] RFE6T5LG * Store jobset evaluations in the database explicitly. This includes
  • [18] QT4FO2HP refactored admin controller, using chains, to avoid using requireadmin on each endpoint
  • [19] 4AKMU4ZB Clean up user editing
  • [20] V5LIYTVH DarcsInput: Avoid a chdir.
  • [21] H7CNGK4O * Log evaluation errors etc. in the DB.
  • [22] HEZQ273S improve the error messages when invalid declarative jobsets are defined
  • [23] HPEG2RHV Merge the BuildResultInfo table into the Builds table
  • [24] WQXF2T3D hydra-evaluator: Don't require $HYDRA_CONFIG
  • [25] SQATLPIN Use git rev-list --count
  • [26] JAH3UPWA Support revision control systems via plugins
  • [27] 5SHCWE7X * Prevent repeated evaluation of a jobset with the same inputs. This
  • [28] SS4TZXNU Distinguish between permanent evaluation errors and transient input errors
  • [29] VU2OLHD2 Move most of AddBuilds to hydra-eval-jobset
  • [30] NEWDDAOF * Allow users to change the value of a build's "keep" flag, which
  • [31] NI5BVF2V * In job inputs of type "build", allow the project and jobset names of
  • [32] KXGOUX7P * Creating releases.
  • [33] TJK27WSB Open the DB using Hydra::Model::DB->new
  • [34] H66SHOS7 Fix and clean up editing project settings
  • [35] WYXO75RJ Add support for fetching URLs as inputs.
  • [36] 6WRGCITD Enable declarative projects.
  • [37] IBW53PUC HipChat notification: add support for Mercurial inputs for determining who might have broken the build.
  • [38] ZPHREC7X hydra-eval-jobset: Support flakes
  • [39] 6BDFG7DC Fix declarative flake builds
  • [40] S6OISBQ3 * Mark the "current" builds in a jobset, i.e. those corresponding to
  • [41] AMFMXR52 Provide a command ‘hydra-init’ to initialise/upgrade the database
  • [42] LZVO64YG Merge in the first bits of the API work
  • [43] UWVMQIAC * Refactoring.
  • [44] DDMYFZ5X Fix the jobset unchanged check
  • [45] J5ITV54P Make restartBuilds faster
  • [46] BPT4WJ7U Remove Persona support
  • [47] BDSD2JLV * Speed up manifest generation.
  • [48] PMNWRTGJ Add multiple output support
  • [49] MBRAFK6F Register restarted derivations as GC roots
  • [50] SW7STLQ7 Cache flake-based jobset evaluations
  • [51] K63JYJDH Compose release name for an evaluation if none has been defined
  • [52] WVD3YYON hydra-evaluator: Add some debug code
  • [53] RXVJFQ5A Evaluator cleanups
  • [54] SRCWWMGU Do not use local clone for Bazaar inputs.
  • [55] TQVKZQUG Use the REST API in the web interface for editing jobsets
  • [56] YWS3TOWA Fix restarting builds
  • [57] 6US6LEC7 * Add a NarSize field to Hydra manifests. This allows nix-env
  • [58] BOGEJ3H2 Additional helpful information in error messages.
  • [59] VHV6GI4L Add a jobset eval action to restart all aborted/cancelled builds
  • [60] CCIORPJ5 When manually scheduling an eval, force re-instantiation of store derivations
  • [61] 2T42QGZD * Register builds as GC roots so they don't get deleted.
  • [62] UOINKJ2J Add an action to cancel all builds in a jobset eval
  • [63] FPK5LF53 * Put the project-related actions in a separate controller. Put the
  • [64] S5PV6IIM * Represent jobs explicitly in the DB.
  • [65] SGRUPSLK Only send email notification of evaluation error when the evaluation error has changed. Fixes #121.
  • [66] 53PW36WS hydra-evaluator: When evaluating a single jobset, exit with a failure code if evaluation fails
  • [67] SM5M2J3A Pass inputs to release expressions using -I
  • [68] NS7SND6R hydra-evaluator: Send statistics to statsd
  • [69] GEADFVZ5 hydra-queue-runner: Improved scheduling
  • [70] NLJJZVHO * Use ->update({...}) properly.
  • [71] OR5SJ42Y Show releases in a tab on the project page
  • [72] ZQS3ZNA3 Fix broken redirect when editing a release
  • [73] DAPOSS44 Use the REST API in the web interface for editing projects
  • [74] RBNQKATL * Adding persistant releases. A release is a named set of builds.
  • [75] T273UOB7 Support obtaining the contents of an evaluation as a channel
  • [76] 3BTJRSU3 GitInput.pm: Don't do a chdir to the Git clone
  • [77] LSZLZHJY Allow users to edit their own settings
  • [78] MQMF2LBW Re-enable adding new users via the web interface
  • [79] I6QMKSIS Move getBaseUrl
  • [80] IN272KZW * Automatically keep all builds in the latest successful release in
  • [81] GPHLV42M * Allow the description of a release member to be edited, and to
  • [82] 3PNG7NIB Remove trailing whitespace
  • [83] JY7BXXOP Split viewing and editing a project
  • [84] WJBYXFCK Doh
  • [85] XJRJ4J7M Add user registration
  • [86] AWMM5OGV Use delete instead of delete_all
  • [87] PCKLFRT5 Support push notification of repository changes
  • [88] KQZQI2WN Allow creating a release from an evaluation
  • [89] 4NTIBJ74 Implement DELETE for jobsets and use it in the web interface
  • [90] XHOZT4WT Add a command `hydra-create-user' for managing user accounts
  • [91] 6KJXJB7N qualify ordery_by clauses when necessary, remove unnecessary order_by's, reported by Ludo, resulted in errors in sqlite
  • [92] ZWCTAZGL added newsitems, added some admin options to clear various caches.
  • [93] L54KA7IM handleDeclarativeJobsetBuild: handle errors from readNixFile
  • [94] AFTXA575 * $HYDRA_DATA environment variable.
  • [*] BKOIYITR added some json responses
  • [*] LBNVQXUB * Build the /build stuff in a separate controller.
  • [*] 3HZY24CX * Make jobsets viewable under
  • [*] U4TD3AIQ Add support for viewing jobset evaluations
  • [*] OOQ2D3KC * Refactoring: move fetchInput out of hydra_scheduler into a separate
  • [*] 2GK5DOU7 * Downloading closures.
  • [*] N22GPKYT * Put info about logs / build products in the DB.

Change contents

  • replacement in src/lib/Hydra/Controller/API.pm at line 217
    [9.91][9.297:339](),[7.151][9.297:339](),[9.297][9.297:339]()
    txn_do($c->model('DB')->schema, sub {
    [7.151]
    [9.339]
    $c->model('DB')->schema->txn_do(sub {
  • replacement in src/lib/Hydra/Controller/Admin.pm at line 93
    [9.1919][9.1919:1961]()
    txn_do($c->model('DB')->schema, sub {
    [9.1892]
    [9.1961]
    $c->model('DB')->schema->txn_do(sub {
  • replacement in src/lib/Hydra/Controller/Build.pm at line 529
    [9.379][9.86:128]()
    txn_do($c->model('DB')->schema, sub {
    [9.1]
    [9.3773]
    $c->model('DB')->schema->txn_do(sub {
  • replacement in src/lib/Hydra/Controller/Jobset.pm at line 65
    [9.8225][9.8225:8271]()
    txn_do($c->model('DB')->schema, sub {
    [9.7995]
    [9.8271]
    $c->model('DB')->schema->txn_do(sub {
  • replacement in src/lib/Hydra/Controller/Jobset.pm at line 77
    [9.9826][9.9826:9872]()
    txn_do($c->model('DB')->schema, sub {
    [9.9826]
    [9.9872]
    $c->model('DB')->schema->txn_do(sub {
  • replacement in src/lib/Hydra/Controller/Jobset.pm at line 103
    [9.109][9.109:151]()
    txn_do($c->model('DB')->schema, sub {
    [9.109]
    [9.259]
    $c->model('DB')->schema->txn_do(sub {
  • replacement in src/lib/Hydra/Controller/JobsetEval.pm at line 149
    [9.410][9.410:452]()
    txn_do($c->model('DB')->schema, sub {
    [9.410]
    [9.452]
    $c->model('DB')->schema->txn_do(sub {
  • replacement in src/lib/Hydra/Controller/Project.pm at line 44
    [9.12][9.17085:17131](),[9.17085][9.17085:17131]()
    txn_do($c->model('DB')->schema, sub {
    [9.12]
    [9.17131]
    $c->model('DB')->schema->txn_do(sub {
  • replacement in src/lib/Hydra/Controller/Project.pm at line 58
    [9.18594][9.18594:18640]()
    txn_do($c->model('DB')->schema, sub {
    [9.18594]
    [9.18640]
    $c->model('DB')->schema->txn_do(sub {
  • replacement in src/lib/Hydra/Controller/Project.pm at line 80
    [9.2076][9.461:503]()
    txn_do($c->model('DB')->schema, sub {
    [9.2076]
    [9.355]
    $c->model('DB')->schema->txn_do(sub {
  • replacement in src/lib/Hydra/Controller/Project.pm at line 201
    [9.452][9.452:494]()
    txn_do($c->model('DB')->schema, sub {
    [9.452]
    [9.494]
    $c->model('DB')->schema->txn_do(sub {
  • replacement in src/lib/Hydra/Controller/Release.pm at line 66
    [9.430][9.60:106](),[9.60][9.60:106]()
    txn_do($c->model('DB')->schema, sub {
    [9.430]
    [9.106]
    $c->model('DB')->schema->txn_do(sub {
  • replacement in src/lib/Hydra/Controller/Release.pm at line 72
    [9.306][9.306:352]()
    txn_do($c->model('DB')->schema, sub {
    [9.306]
    [9.352]
    $c->model('DB')->schema->txn_do(sub {
  • replacement in src/lib/Hydra/Controller/User.pm at line 166
    [9.2769][9.2769:2811]()
    txn_do($c->model('DB')->schema, sub {
    [9.2643]
    [9.2811]
    $c->model('DB')->schema->txn_do(sub {
  • replacement in src/lib/Hydra/Controller/User.pm at line 264
    [9.2055][9.782:824]()
    txn_do($c->model('DB')->schema, sub {
    [9.2055]
    [9.824]
    $c->model('Db')->schema->txn_do(sub {
  • replacement in src/lib/Hydra/Helper/AddBuilds.pm at line 49
    [9.1280][9.1280:1302]()
    txn_do($db, sub {
    [9.1280]
    [9.1302]
    $db->txn_do(sub {
  • replacement in src/lib/Hydra/Helper/AddBuilds.pm at line 82
    [9.2344][9.2344:2370]()
    txn_do($db, sub {
    [9.2344]
    [9.2370]
    $db->txn_do(sub {
  • replacement in src/lib/Hydra/Helper/Nix.pm at line 17
    [9.619][9.123:173]()
    getHydraHome getHydraConfig getBaseUrl txn_do
    [9.619]
    [9.1502]
    getHydraHome getHydraConfig getBaseUrl
  • edit in src/lib/Hydra/Helper/Nix.pm at line 61
    [9.287][9.287:291](),[9.291][9.588:781](),[9.53][9.588:781](),[9.781][9.1099:1112](),[9.1112][9.781:812](),[9.781][9.781:812](),[9.812][9.1113:1155](),[9.1155][9.847:858](),[9.847][9.847:858](),[9.858][9.1156:1184](),[9.1184][9.879:935](),[9.879][9.879:935]()
    }
    # Awful hack to handle timeouts in SQLite: just retry the transaction.
    # DBD::SQLite *has* a 30 second retry window, but apparently it
    # doesn't work.
    sub txn_do {
    my ($db, $coderef) = @_;
    my $res;
    while (1) {
    eval {
    $res = $db->txn_do($coderef);
    };
    return $res if !$@;
    die $@ unless $@ =~ "database is locked";
    }
  • replacement in src/lib/Hydra/Helper/Nix.pm at line 433
    [9.1236][9.1236:1265]()
    return txn_do($db, sub {
    [9.1236]
    [2.0]
    return $db->txn_do(sub {
  • replacement in src/lib/Hydra/Helper/Nix.pm at line 460
    [9.1102][5.243:265]()
    txn_do($db, sub {
    [9.1102]
    [9.274]
    $db->txn_do(sub {
  • replacement in src/lib/Hydra/Plugin/BazaarInput.pm at line 61
    [4.173][9.4393:4427](),[9.4393][9.4393:4427]()
    txn_do($self->{db}, sub {
    [4.173]
    [9.4427]
    $self->{db}->txn_do(sub {
  • replacement in src/lib/Hydra/Plugin/DarcsInput.pm at line 80
    [9.2988][9.2988:3022]()
    txn_do($self->{db}, sub {
    [9.2988]
    [9.3022]
    $self->{db}->txn_do(sub {
  • replacement in src/lib/Hydra/Plugin/GitInput.pm at line 221
    [4.347][9.9485:9519](),[9.9485][9.9485:9519]()
    txn_do($self->{db}, sub {
    [4.347]
    [9.9519]
    $self->{db}->txn_do(sub {
  • replacement in src/lib/Hydra/Plugin/MercurialInput.pm at line 88
    [4.520][9.12821:12855](),[9.12821][9.12821:12855]()
    txn_do($self->{db}, sub {
    [4.520]
    [9.12855]
    $self->{db}->txn_do(sub {
  • replacement in src/lib/Hydra/Plugin/PathInput.pm at line 57
    [9.15107][9.15107:15145]()
    txn_do($self->{db}, sub {
    [9.15107]
    [9.15145]
    $self->{db}->txn_do(sub {
  • replacement in src/lib/Hydra/Plugin/PathInput.pm at line 68
    [9.15553][9.15553:15591]()
    txn_do($self->{db}, sub {
    [9.15553]
    [9.15591]
    $self->{db}->txn_do(sub {
  • replacement in src/lib/Hydra/Plugin/SubversionInput.pm at line 74
    [9.18651][9.18651:18685]()
    txn_do($self->{db}, sub {
    [9.18651]
    [9.18685]
    $self->{db}->txn_do(sub {
  • replacement in src/script/hydra-create-user at line 57
    [9.1850][9.1850:1868]()
    txn_do($db, sub {
    [9.1850]
    [9.1868]
    $db->txn_do(sub {
  • replacement in src/script/hydra-eval-jobset at line 402
    [9.13374][9.13374:13396]()
    txn_do($db, sub {
    [9.13374]
    [8.0]
    $db->txn_do(sub {
  • replacement in src/script/hydra-eval-jobset at line 504
    [9.3030][9.1416:1442]()
    txn_do($db, sub {
    [9.3030]
    [9.770]
    $db->txn_do(sub {
  • replacement in src/script/hydra-eval-jobset at line 606
    [3.84][9.1003:1029](),[9.1003][9.1003:1029]()
    txn_do($db, sub {
    [3.84]
    [3.85]
    $db->txn_do(sub {
  • replacement in src/script/hydra-eval-jobset at line 622
    [9.482][9.2449:2475](),[9.2019][9.2449:2475](),[9.2449][9.2449:2475]()
    txn_do($db, sub {
    [9.482]
    [9.1145]
    $db->txn_do(sub {
  • replacement in src/script/hydra-eval-jobset at line 663
    [6.18][9.1601:1623](),[9.6141][9.1601:1623]()
    txn_do($db, sub {
    [6.18]
    [9.1439]
    $db->txn_do(sub {
  • replacement in src/script/hydra-eval-jobset at line 809
    [3.269][9.1624:1650](),[9.1300][9.1624:1650](),[9.2998][9.1624:1650](),[9.2355][9.1624:1650]()
    txn_do($db, sub {
    [3.269]
    [9.2381]
    $db->txn_do(sub {