-
Notifications
You must be signed in to change notification settings - Fork 15
/
extra-debug.patch
54 lines (53 loc) · 3.16 KB
/
extra-debug.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
diff --git a/src/hydra-queue-runner/hydra-queue-runner.cc b/src/hydra-queue-runner/hydra-queue-runner.cc
index 70329a9e..862dbf7b 100644
--- a/src/hydra-queue-runner/hydra-queue-runner.cc
+++ b/src/hydra-queue-runner/hydra-queue-runner.cc
@@ -487,6 +487,7 @@ void State::notificationSender()
argv = {"hydra-notify", "step-finished", std::to_string(item.id), std::to_string(item.stepNr), item.logPath};
break;
};
+ printMsg(lvlChatty, "hydra-notify " + concatStringsSep(" ", argv));
execvp("hydra-notify", (char * *) stringsToCharPtrs(argv).data()); // FIXME: remove cast
throw SysError("cannot start hydra-notify");
});
diff --git a/src/lib/Hydra/Plugin/GithubStatus.pm b/src/lib/Hydra/Plugin/GithubStatus.pm
index 08ba25bb..08d770e3 100644
--- a/src/lib/Hydra/Plugin/GithubStatus.pm
+++ b/src/lib/Hydra/Plugin/GithubStatus.pm
@@ -31,6 +31,7 @@ sub common {
my $ua = LWP::UserAgent->new();
foreach my $conf (@config) {
+ print STDERR "GithubStatus_Debug job name $jobName\n";
next unless $jobName =~ /^$conf->{jobs}$/;
# Don't send out "pending" status updates if the build is already finished
next if !$finished && $b->finished == 1;
@@ -47,7 +48,10 @@ sub common {
my @inputs = defined $inputs_cfg ? ref $inputs_cfg eq "ARRAY" ? @$inputs_cfg : ($inputs_cfg) : ();
my %seen = map { $_ => {} } @inputs;
while (my $eval = $evals->next) {
+ print STDERR "GithubStatus_Debug eval $eval\n";
foreach my $input (@inputs) {
+ print STDERR "GithubStatus_Debug input $input\n";
+
my $i = $eval->jobsetevalinputs->find({ name => $input, altnr => 0 });
next unless defined $i;
my $uri = $i->uri;
@@ -58,13 +62,16 @@ sub common {
$uri =~ m![:/]([^/]+)/([^/]+?)(?:.git)?$!;
my $owner = $1;
my $repo = $2;
- my $req = HTTP::Request->new('POST', "https://api.github.com/repos/$owner/$repo/statuses/$rev");
+ my $url = "https://api.github.com/repos/$owner/$repo/statuses/$rev";
+ print STDERR "GithubStatus_Debug ", $url, "\n";
+ my $req = HTTP::Request->new('POST', $url);
$req->header('Content-Type' => 'application/json');
$req->header('Accept' => 'application/vnd.github.v3+json');
$req->header('Authorization' => ($self->{config}->{github_authorization}->{$owner} // $conf->{authorization}));
$req->content($body);
my $res = $ua->request($req);
- print STDERR $res->status_line, ": ", $res->decoded_content, "\n" unless $res->is_success;
+ print STDERR "GithubStatus_Debug ", $res->status_line, ": ", $res->decoded_content, "\n";
+ print STDERR "GithubStatus_Error ", $res->status_line, ": ", $res->decoded_content, "\n" unless $res->is_success;
}
}
}