Get rid of dependency to SQLite

[?]
Apr 10, 2020, 4:13 PM
75BCCX2TABRXQFYV73D6QU3VCT7LZUZEOWUK4X5USPWWTBTVJTLQC

Dependencies

  • [2] 3K3YNRYU Don't barf if the SQLite DB is missing
  • [3] H4KMCXGU Use triggers for all notifications on Builds table changes
  • [4] 3HRBFWGK tests: change postgresql socket dir to /tmp
  • [5] TOLUNFAC Create extension pg_trgm in the NixOS module
  • [6] FZR7ET5D Jobsets: add a SERIAL, unique, non-null id column
  • [7] UCTIA3HC Fix Mercurial tests
  • [8] AJSFZ2YN Fix Mercurial tests
  • [9] RWNXH3H2 lastModified -> lastModifiedDate
  • [10] ACBS7C6Q hydra-queue-runner: Detect changes to the scheduling shares
  • [11] 3PNG7NIB Remove trailing whitespace
  • [12] N22GPKYT * Put info about logs / build products in the DB.
  • [13] 6COLDXKS Create a pg_trgm index on builds.drvpath
  • [14] PHX2HIVG * Store info about the build inputs in the build record.
  • [15] 5SHCWE7X * Prevent repeated evaluation of a jobset with the same inputs. This
  • [16] I3TU2UJQ
  • [17] KSBB33RE Add a dashboard
  • [18] AMFMXR52 Provide a command ‘hydra-init’ to initialise/upgrade the database
  • [19] 4YCF3KBG Concurrent hydra-evaluator
  • [20] J5UVLXOK * Start of a basic Catalyst web interface.
  • [21] 7VQ4ALFY Update "make check" for the new queue runner
  • [22] G2ZB6464 first test, not yet in buildprocess
  • [23] 4HPT4SDD Revert "Remove now-unused SystemTypes table"
  • [24] BXHG3HYL When renaming a jobset, add a redirect from the old name
  • [25] 4MBKR4XM Gratuitous whitespace.
  • [26] TJK27WSB Open the DB using Hydra::Model::DB->new
  • [27] RULEA52Y Fix SQL syntax for migration 50. It failed with PostgreSQL 9.4. (#416)
  • [28] 3VRZBVFX hydra-eval-jobs -> nix eval-hydra-jobs
  • [29] UUGBVEGY * Development notes.
  • [30] HX4QYOYA add first evaluations tests
  • [31] CLJQCY2X * Store info about all the build actions and allow them to be
  • [32] V2ALOFRR Fix the test
  • [33] ZWCTAZGL added newsitems, added some admin options to clear various caches.
  • [34] GAZHOBWE Better fix
  • [35] RBNQKATL * Adding persistant releases. A release is a named set of builds.
  • [36] ZHBEOOUQ show evaluation errors in log of tests
  • [37] 2M7J26V4 inital version of links to diff in scm
  • [38] RYTQLATY Keep track of failed paths in the Hydra database
  • [39] VOBFCHIX use top_srcdir in stead of srcdir
  • [40] WE5Q2NVI Allow build to be bumped to the front of the queue via the web interface
  • [41] S2NXJOJE Fix a race that can cause hydra-queue-runner to ignore newly added builds
  • [42] OB7GB5DL Test environment cleanups
  • [43] 6ZHQKBZP Fix indentation
  • [44] A43SLRSH Fix handling of IPC::Run::run exit status
  • [45] RVHBV3B3 Notify the queue runner when a build is deleted
  • [46] N3KBVX6G Set $PERL5LIB properly in hydra-init in "make check"
  • [47] PKE6I67S doc: Import the "Creating Projects" chapter by Visser & Dolstra.
  • [48] L2E6EVE2 * Merged the Build and Job tables.
  • [49] B7ENVLRS hydra-queue-runner: Make build notification more reliable
  • [50] BD3GRK4B * Get rid of "positive failures" and separate log phases.
  • [51] KN3VYE5P * Cleaned up the foreign key constraints.
  • [52] SMCOU72F hydra: add some admin for adding/enabling/etc build machines
  • [53] WHS5RMPO
  • [54] 32MXC7NN hydra-init: show SQL commands being executed
  • [55] FANTYCR7 Materialize the number of finished builds
  • [56] RFE6T5LG * Store jobset evaluations in the database explicitly. This includes
  • [57] 7RO7CINM setup environment variables for tests
  • [58] 67P45PY4
  • [59] LAJHRL6O Fix tests
  • [60] EDDTVGB4 set BZR_HOME env var so bzr won't fail
  • [61] E7FID72S Remove the BuildMachines and BuildMachinesSystemTypes tables
  • [62] 2KLEQJTG sql: refactor some sql statements to lowercase
  • [63] PLOZBRTR Add command ‘hydra-queue-runner --status’ to show current status
  • [64] NQPGIRXX Revert "hydra-eval-jobs -> nix eval-hydra-jobs"
  • [*] GBCPEGYC Add a .gitignore

Change contents

  • edit in .gitignore at line 35
    [4.7]
    tests/jobs/config.nix
  • replacement in doc/dev-notes.txt at line 11
    [10.69][10.69:168]()
    $ sqlite3 hydra.sqlite "insert into SystemTypes(system, maxConcurrent) values('i686-linux', 3);"
    [10.69]
    [10.579]
    $ psql -d hydra <<< "insert into SystemTypes(system, maxConcurrent) values('i686-linux', 3);"
  • replacement in doc/dev-notes.txt at line 15
    [10.600][10.600:763]()
    $ sqlite3 hydra.sqlite "insert into Users(userName, emailAddress, password) values('root', 'e.dolstra@tudelft.nl', '$(echo -n foobar | sha1sum | cut -c1-40)');"
    [10.600]
    [10.763]
    $ hydra-create-user root --email-address 'e.dolstra@tudelft.nl' \
    --password-hash "$(echo -n foobar | sha1sum | cut -c1-40)"
  • replacement in doc/dev-notes.txt at line 22
    [10.843][10.843:933]()
    $ sqlite3 hydra.sqlite "insert into UserRoles(userName, role) values('root', 'admin');"
    [10.843]
    [10.933]
    $ hydra-create-user root --role admin
  • replacement in doc/dev-notes.txt at line 25
    [10.983][10.983:1090]()
    $ sqlite3 hydra.sqlite "insert into UserRoles(userName, role) values('alice', 'create-projects');"
    [10.983]
    [10.1090]
    $ hydra-create-user root --role create-projects
  • replacement in doc/manual/projects.xml at line 46
    [10.1694][10.1694:1730]()
    get an error message such as:
    [10.1694]
    [10.1730]
    get an error message from the database.
  • replacement in doc/manual/projects.xml at line 48
    [10.1731][10.1731:1740](),[10.1740][10.218:257](),[10.257][10.1780:2122](),[10.1780][10.1780:2122]()
    <screen>
    I'm very sorry, but an error occurred:
    DBIx::Class::ResultSet::create(): DBI Exception: DBD::SQLite::st execute failed: column name is not unique(19) at dbdimp.c line 402
    </screen>
    So try to create the project after entering just the general
    information to figure out if you have chosen a unique name.
    Job sets can be added once the project has been created.
    [10.1731]
    [10.2122]
    So try to create the project after entering just the general
    information to figure out if you have chosen a unique name.
    Job sets can be added once the project has been created.
  • edit in flake.nix at line 65
    [9.2050][9.2050:2076]()
    DBDSQLite
  • replacement in flake.nix at line 105
    [9.3021][9.3021:3119]()
    [ makeWrapper autoconf automake libtool unzip nukeReferences pkgconfig sqlite libpqxx
    [9.3021]
    [9.3119]
    [ makeWrapper autoconf automake libtool unzip nukeReferences pkgconfig libpqxx
  • replacement in flake.nix at line 116
    [9.3539][9.3539:3614]()
    [ sqlite subversion openssh final.nix coreutils findutils pixz
    [9.3539]
    [9.3614]
    [ subversion openssh final.nix coreutils findutils pixz
  • replacement in src/lib/Hydra/Model/DB.pm at line 13
    [10.419][10.419:529](),[10.529][2.0:74](),[2.74][10.596:627](),[10.596][10.596:627]()
    my $db = $ENV{"HYDRA_DBI"};
    return $db if defined $db;
    my $path = getHydraPath . '/hydra.sqlite';
    #warn "The Hydra database ($path) does not exist!\n" unless -f $path;
    return "dbi:SQLite:$path";
    [10.419]
    [10.627]
    return $ENV{"HYDRA_DBI"} || "dbi:Pg:dbname=hydra;";
  • edit in src/script/hydra-init at line 28
    [10.3345][10.0:76]()
    $dbh->{Driver}->{Name} eq 'SQLite' ? "$home/sql/hydra-sqlite.sql" :
  • replacement in src/script/hydra-init at line 29
    [10.152][10.152:196]()
    die "unsupported database type\n");
    [10.152]
    [10.3520]
    die "unsupported database type $dbh->{Driver}->{Name}\n");
  • edit in src/sql/hydra.sql at line 82
    [6.807][10.5604:5726](),[10.5604][10.5604:5726]()
    #ifdef SQLITE
    ,
    foreign key (project, name, nixExprInput) references JobsetInputs(project, jobset, name)
    #endif
  • edit in src/sql/hydra.sql at line 84
    [10.3366][10.1359:1377](),[10.1377][10.3366:3367](),[10.3366][10.3366:3367]()
    #ifdef POSTGRESQL
  • edit in src/sql/hydra.sql at line 100
    [10.10349][10.10349:10350](),[10.10350][10.1689:1697](),[10.1689][10.1689:1697]()
    #endif
  • edit in src/sql/hydra.sql at line 151
    [10.8976][10.7519:7537]()
    #ifdef POSTGRESQL
  • edit in src/sql/hydra.sql at line 152
    [10.7584][10.7584:7590](),[10.7590][10.24:86](),[10.8976][10.24:86](),[10.24][10.24:86](),[10.86][10.7591:7598]()
    #else
    id integer primary key autoincrement not null,
    #endif
  • edit in src/sql/hydra.sql at line 234
    [10.117][10.117:135](),[10.135][3.0:1]()
    #ifdef POSTGRESQL
  • edit in src/sql/hydra.sql at line 248
    [10.3862][10.3862:3863](),[10.3863][10.395:402](),[10.395][10.395:402]()
    #endif
  • edit in src/sql/hydra.sql at line 318
    [10.8082][10.8082:8100]()
    #ifdef POSTGRESQL
  • edit in src/sql/hydra.sql at line 319
    [10.8147][10.8147:8153](),[10.8153][10.4781:4843](),[10.10125][10.4781:4843](),[10.4781][10.4781:4843](),[10.4843][10.8154:8161]()
    #else
    id integer primary key autoincrement not null,
    #endif
  • edit in src/sql/hydra.sql at line 484
    [10.6572][10.6572:6590]()
    #ifdef POSTGRESQL
  • edit in src/sql/hydra.sql at line 485
    [10.6637][10.6637:6712]()
    #else
    id integer primary key autoincrement not null,
    #endif
  • edit in src/sql/hydra.sql at line 555
    [10.11643][10.11643:11661]()
    #ifdef POSTGRESQL
  • edit in src/sql/hydra.sql at line 556
    [10.11708][10.11708:11783]()
    #else
    id integer primary key autoincrement not null,
    #endif
  • edit in src/sql/hydra.sql at line 588
    [10.4188][10.4188:4206]()
    #ifdef POSTGRESQL
  • edit in src/sql/hydra.sql at line 595
    [10.4429][10.4429:4436]()
    #endif
  • edit in src/sql/hydra.sql at line 611
    [10.1559][10.1559:1577]()
    #ifdef POSTGRESQL
  • edit in src/sql/hydra.sql at line 629
    [10.2240][10.2240:2247](),[10.2247][10.4:5](),[10.12399][10.4:5]()
    #endif
  • edit in src/sql/hydra.sql at line 673
    [10.1][10.1:19]()
    #ifdef POSTGRESQL
  • edit in src/sql/hydra.sql at line 689
    [10.108][10.202:209](),[5.1256][10.202:209](),[10.202][10.202:209]()
    #endif
  • resurrect zombie in tests/Makefile.am at line 17
    [10.213][7.0:16](),[10.213][7.0:16]()
    PYTHONPATH= \
  • edit in tests/Makefile.am at line 18
    [10.213][8.0:16]()
    PYTHONPATH= \
  • resolve order conflict in tests/Makefile.am at line 18
    [7.16]
    [10.10106]
  • edit in tests/Makefile.am at line 33
    [10.27][10.147:148](),[10.27][10.147:148](),[10.149][10.147:148](),[10.250][10.147:148](),[10.330][10.147:148](),[10.516][10.147:148](),[10.1695][10.147:148](),[10.147][10.147:148](),[10.148][10.3575:3625](),[10.3625][10.59:117](),[10.51][10.59:117]()
    db.sqlite: $(top_srcdir)/src/sql/hydra-sqlite.sql
    $(TESTS_ENVIRONMENT) $(top_srcdir)/src/script/hydra-init