Skip to content

Commit

Permalink
[backend] catch errors in the publish filter
Browse files Browse the repository at this point in the history
We do not want to crash the scheduler, but return a meaningful
error.
  • Loading branch information
mlschroe committed May 27, 2024
1 parent 75fe30b commit 100ae72
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/backend/BSSched/PublishRepo.pm
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,12 @@ sub prpfinished {
$filter = $bconf->{'publishfilter'} if $bconf;
undef $filter if $filter && !@$filter;
$filter ||= $default_publishfilter;
$filter = compile_publishfilter($filter);
eval { $filter = compile_publishfilter($filter) };
if ($@) {
my $err = $@;
chomp $err;
return "invalid publish filter: $err";
}

my $seen_binary;
my $singleexport;
Expand Down

0 comments on commit 100ae72

Please sign in to comment.