fix(writer-pipeline): demote sitemap gateway 502/503/504 to warning
Tests / writer-pipeline tests (pull_request) Successful in 49s
Tests / bridge tests (pull_request) Successful in 50s
Tests / writer-pipeline tests (push) Successful in 56s
Tests / bridge tests (push) Successful in 56s
Tests / frontend lib tests (pull_request) Successful in 1m3s
Tests / frontend lib tests (push) Successful in 1m0s
Tests / writer-pipeline tests (pull_request) Successful in 49s
Tests / bridge tests (pull_request) Successful in 50s
Tests / writer-pipeline tests (push) Successful in 56s
Tests / bridge tests (push) Successful in 56s
Tests / frontend lib tests (pull_request) Successful in 1m3s
Tests / frontend lib tests (push) Successful in 1m0s
EHF google-news-sitemap already retries; residual gateway blips (BIT-30847 / ERRSIG a92b3521aec8) must not open Error Loop tickets. Keep HTTP 500 as error so broken endpoints like the old /sitemap.xml stay actionable. Paperclip-Agent: Bug Squasher (urlKey bug-squasher; id 4669adc7-6368-43ef-bf27-5a601a6b7b83) Paperclip-Issue: BIT-30847 Paperclip-Run: ce265bf3-24dc-4532-b87d-92188cc55399
This commit is contained in:
1 parent
da539f33aa
commit
c61c19216c
2 files changed
+29
-1
No files matched your search
@@ -22,9 +22,28 @@ describe('cycleErrorMessageLevel', () => {
|
||||
);
|
||||
});
|
||||
|
||||
it('keeps whole-source sitemap failures as error', () => {
|
||||
it('downgrades whole-source sitemap gateway blips to warning (BIT-30847)', () => {
|
||||
assert.equal(
|
||||
cycleErrorMessageLevel(
|
||||
'sitemap eurohandball_sitemap (https://www.eurohandball.com/google-news-sitemap.xml): HTTP 502',
|
||||
),
|
||||
'warning',
|
||||
);
|
||||
assert.equal(
|
||||
cycleErrorMessageLevel('sitemap eurohandball_sitemap (https://www.eurohandball.com/sitemap.xml): HTTP 503'),
|
||||
'warning',
|
||||
);
|
||||
assert.equal(
|
||||
cycleErrorMessageLevel(
|
||||
'sitemap eurohandball_sitemap (https://www.eurohandball.com/google-news-sitemap.xml): HTTP 504',
|
||||
),
|
||||
'warning',
|
||||
);
|
||||
});
|
||||
|
||||
it('keeps whole-source sitemap HTTP 500 as error (actionable upstream/config)', () => {
|
||||
assert.equal(
|
||||
cycleErrorMessageLevel('sitemap eurohandball_sitemap (https://www.eurohandball.com/sitemap.xml): HTTP 500'),
|
||||
'error',
|
||||
);
|
||||
});
|
||||
|
||||
@@ -16,6 +16,15 @@ export function cycleErrorMessageLevel(message: string): 'warning' | 'error' {
|
||||
if (message.includes('truncating')) return 'warning';
|
||||
// Per-URL HTML probe failed but other pages in the same source may have succeeded.
|
||||
if (/^sitemap .+ page \(https?:\/\//.test(message)) return 'warning';
|
||||
// Whole-source fetch already retries (http-retry); remaining gateway blips are upstream
|
||||
// noise (BIT-30847 / ERRSIG a92b3521aec8). Keep HTTP 500 as error — that flagged the
|
||||
// broken /sitemap.xml URL fixed in BIT-30741.
|
||||
if (
|
||||
/^sitemap .+ \(https?:\/\//.test(message) &&
|
||||
/: HTTP (502|503|504)\b/.test(message)
|
||||
) {
|
||||
return 'warning';
|
||||
}
|
||||
return 'error';
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user