@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Acccept any HTTP 2xx status as success in Harbormaster

Summary: Ref T9478. This should probably be configurable eventually, but for now treat any 200-block status as success. Also show the result code.

Test Plan:
- Hit a bad URI, saw "HTTP 503" + failure.
- Hit a good URI, saw "HTTP 200" + success.

Reviewers: chad, hach-que

Reviewed By: chad, hach-que

Maniphest Tasks: T9478

Differential Revision: https://secure.phabricator.com/D14226

+7 -1
+7 -1
src/applications/harbormaster/step/HarbormasterHTTPRequestBuildStepImplementation.php
··· 75 75 list($status, $body, $headers) = $future->resolve(); 76 76 77 77 $header_lines = array(); 78 + 79 + // TODO: We don't currently preserve the entire "HTTP" response header, but 80 + // should. Once we do, reproduce it here faithfully. 81 + $status_code = $status->getStatusCode(); 82 + $header_lines[] = "HTTP {$status_code}"; 83 + 78 84 foreach ($headers as $header) { 79 85 list($head, $tail) = $header; 80 86 $header_lines[] = "{$head}: {$tail}"; ··· 89 95 ->newLog($uri, 'http.body') 90 96 ->append($body); 91 97 92 - if ($status->getStatusCode() != 200) { 98 + if ($status->isError()) { 93 99 throw new HarbormasterBuildFailureException(); 94 100 } 95 101 }