saveHeadshot threw past its callers whenever sharp could not decode the fetched bytes (corrupt/truncated source image, or a non-image body served under an image URL). The per-associate try/catch in personFromFpaAssociate/personFromFpaLicence logged and moved on, but referenceKey stayed null, so the same bad photo kept getting re-fetched and re-thrown on every weekly FPA refresh forever - the real cause of BIT-31903 reopening on the same ERRSIG after being triaged as a one-off.
Mark referenceStatus FAILED when sharp cannot decode the downloaded bytes in saveHeadshot.
Skip people already marked FAILED in the two periodic call sites (personFromFpaAssociate, personFromFpaLicence) so a permanently bad photo is not retried forever - unlike a transient fetch error, which still retries as before.
Added a regression test in apps/api/test/sports.test.ts asserting a non-decodable photo is marked FAILED and is not re-fetched on a later refresh.
Closes BIT-31903.
`saveHeadshot` threw past its callers whenever `sharp` could not decode the fetched bytes (corrupt/truncated source image, or a non-image body served under an image URL). The per-associate try/catch in `personFromFpaAssociate`/`personFromFpaLicence` logged and moved on, but `referenceKey` stayed null, so the same bad photo kept getting re-fetched and re-thrown on every weekly FPA refresh forever - the real cause of BIT-31903 reopening on the same ERRSIG after being triaged as a one-off.
- Mark referenceStatus FAILED when sharp cannot decode the downloaded bytes in saveHeadshot.
- Skip people already marked FAILED in the two periodic call sites (personFromFpaAssociate, personFromFpaLicence) so a permanently bad photo is not retried forever - unlike a transient fetch error, which still retries as before.
- Added a regression test in apps/api/test/sports.test.ts asserting a non-decodable photo is marked FAILED and is not re-fetched on a later refresh.
Closes BIT-31903.
saveHeadshot threw past its callers whenever sharp couldn't decode the
fetched bytes (corrupt/truncated source, or a non-image body). The
catch in personFromFpaAssociate/personFromFpaLicence just logged and
moved on, but referenceKey stayed null, so the same bad photo was
refetched and re-thrown on every weekly FPA refresh forever.
Mark the person's referenceStatus FAILED when sharp can't decode the
downloaded bytes, and skip those people on later refreshes — a decode
failure is permanent for that URL, unlike a transient fetch error.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
saveHeadshotthrew past its callers wheneversharpcould not decode the fetched bytes (corrupt/truncated source image, or a non-image body served under an image URL). The per-associate try/catch inpersonFromFpaAssociate/personFromFpaLicencelogged and moved on, butreferenceKeystayed null, so the same bad photo kept getting re-fetched and re-thrown on every weekly FPA refresh forever - the real cause of BIT-31903 reopening on the same ERRSIG after being triaged as a one-off.Closes BIT-31903.
auto-approve: CI success on
beed509956(gitea_auto_approve_open_prs_once.py)auto-approve: CI success on
beed509956(gitea_auto_approve_open_prs_once.py)auto-approve: CI success on
beed509956(gitea_auto_approve_open_prs_once.py)