Hydra::Helper::Nix: getHydraNotifyPrometheusConfig fixup strict warning around double-declaring cfg

[?]
Sep 7, 2021, 2:03 AM
XRTTPPRMWP6LWPVILLNDCSL57CE6VFMBGKVIZ474VG3GDEYIDMJAC

Dependencies

  • [2] 33GPMIWV Nix::getHydraNotifyPrometheusConfig: print errors if the configuration provided is invalid.
  • [3] I6QMKSIS Move getBaseUrl
  • [4] 5DXGOH6Q statsd: add a chance to set hostname and port in hydra.conf
  • [5] 4H6FVIWG hydra-notify: make the prometheus endpoint configurable, default-off
  • [*] 2GK5DOU7 * Downloading closures.

Change contents

  • replacement in src/lib/Hydra/Helper/Nix.pm at line 87
    [3.634][3.945:979](),[3.979][2.186:212]()
    my $cfg = $cfg->{prometheus};
    if (!defined($cfg)) {
    [3.634]
    [2.212]
    my $promcfg = $cfg->{prometheus};
    if (!defined($promcfg)) {
  • replacement in src/lib/Hydra/Helper/Nix.pm at line 92
    [2.241][2.241:271]()
    if (ref $cfg ne "HASH") {
    [2.241]
    [2.271]
    if (ref $promcfg ne "HASH") {
  • replacement in src/lib/Hydra/Helper/Nix.pm at line 97
    [3.635][3.1056:1128]()
    if (defined($cfg->{"listen_address"}) && defined($cfg->{"port"})) {
    [3.635]
    [3.1128]
    if (defined($promcfg->{"listen_address"}) && defined($promcfg->{"port"})) {
  • replacement in src/lib/Hydra/Helper/Nix.pm at line 99
    [3.1145][3.1145:1241]()
    "listen_address" => $cfg->{'listen_address'},
    "port" => $cfg->{'port'},
    [3.1145]
    [3.1241]
    "listen_address" => $promcfg->{'listen_address'},
    "port" => $promcfg->{'port'},