Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/hydra
base: c4104fe1fa7f
Choose a base ref
...
head repository: NixOS/hydra
compare: 03f14f46d737
Choose a head ref
  • 3 commits
  • 2 files changed
  • 2 contributors

Commits on May 15, 2020

  1. Handle missing values in declarative jobsets

    The current implementation will pass all values to `create_or_update` method. The
    missing values will end up as `undef` (or `NULL`) when assigned to `%update`.
    Thus, for columns that are NOT NULL, when, for example, flakes are not used,
    will result in a horrible:
    
        DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::Pg::st execute failed:
        ERROR:  null value in column "type" violates not-null constraint
    
        DETAIL:  Failing row contains (.jobsets, 118, hydra, hydra jobsets, src, hydra/jobsets.nix, null,
        null, null, 1589536378, 1, 0, 0, , 3, 30, 100, null, null, 1589536379, null, null). [for Statement
        "UPDATE jobsets SET checkinterval = ?, description = ?, enableemail = ?, nixexprinput = ?,
        nixexprpath = ?, type = ? WHERE ( ( name = ? AND project = ? ) )" with ParamValues: 1='30',
        2='hydra jobsets', 3='0', 4='src', 5='hydra/jobsets.nix', 6=undef, 7='.jobsets', 8='hydra'] at
        /nix/store/lsf81ip9ybxihk5praf2n0nh14a6i9j0-hydra-0.1.19700101.DIRTY/libexec/hydra/lib/Hydra/Helper/AddBuilds.pm line 50
    
    This change just omits adding such values to `%update`, which results in
    PostgreSQL assigning the default values.
    knl committed May 15, 2020
    Copy the full SHA
    5751133 View commit details
    Browse the repository at this point in the history

Commits on May 18, 2020

  1. Add missing SQL upgrade script for NOT NULL on type

    `type` column in `Jobsets` is defined as NOT NULL. However, the original upgrade
    script adding this column ommited the constraint.
    knl committed May 18, 2020
    Copy the full SHA
    e9922c4 View commit details
    Browse the repository at this point in the history
  2. Merge pull request #762 from knl/fix-declarative-jobset-missing-type-…

    …value
    
    Fix declarative jobset missing type value
    basvandijk committed May 18, 2020
    Copy the full SHA
    03f14f4 View commit details
    Browse the repository at this point in the history