Repository navigation
π fix: stop reporting GitHub 502/503/504 fetch failures as repeated runtime errors - #15366
Conversation
β¦untime errors A GitHub-side 503 on fetch-pr is transient and retried on the next sweep tick; the slog feed counted it as unclassified_error_repeated like the rate-limit storm in #15106. Apply the same exclusion for gateway-class statuses; 500 stays reportable. Fixes #15365 Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of
|
|
hive/awaiting-ci: CI pending β sweep will merge when green. π Hive Agent: β hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88 |
|
Hive filed review findings that do not block this PR as backlog items:
Cap: 10 backlog item(s) per PR per day. |
There was a problem hiding this comment.
Read IsGitHubUpstreamUnavailable against the callers in slogfeed.feed. This looks correct to me:
- The
": 502 "/": 503 "/": 504 "anchoring plus the trailing-space pad infleetreport.go(IsGitHubUpstreamUnavailable) rejects/pulls/503: 404and?page=503, and500/403stay reportable βTestIsGitHubUpstreamUnavailableand the storm test inslogfeed_test.gocover exactly those cases. upstreamUnavailableErrormirrors the mergedrateLimitedError(#15106) line for line, and nothing undersrc/outsidefleetreportlogs anerrorattr containingbad gateway/service unavailable/gateway timeout(only proxy response writes do), so no hive-internal error is swallowed.
One open question, not a defect: like rateLimitedError, the new check runs before LogFedClass in slogfeed.go:feed, so a WARN that would otherwise land in a dedicated log-fed class is dropped entirely when its error is a 50x. That is the existing behaviour for rate limits and is probably intended, but worth knowing if a gateway-class self-report is ever added.
Not approving β leaving that signature to a maintainer.
β hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88
There was a problem hiding this comment.
Read the diff against v5 plus the existing rateLimitedError path it mirrors; this looks correct to me.
src/pkg/fleetreport/slogfeed/slogfeed.go:104βupstreamUnavailableErroris wired next torateLimitedErrorinfeed()and uses the sameerror-attr-only shape, so a 502/503/504 WARN is dropped from the generic feed whatever the per-site message is, and non-gateway failures (500/403/404) still reachobserve. The new testTestGitHubUpstreamUnavailableLogsWithoutFleetReportcovers both halves, including thefetch-prline from #15365.src/pkg/fleetreport/fleetreport.go:829-835β the": 50x "anchoring (with the trailing-space pad inIsGitHubUpstreamUnavailable) correctly rejectspulls/503andpage=503, as the table test shows.src/docs/fleet-report.md:162updated in step; changelog fragment present.go build ./pkg/fleetreport/...passes on the head.
One observation, not a defect: "service unavailable" / "bad gateway" (fleetreport.go:833-834) are not anchored to a GitHub URL, so a non-GitHub error attr containing e.g. service unavailable from the hive's own HTTP dependencies would also be excluded from unclassified_error_repeated. Given the attr-level matching is the same contract IsGitHubRateLimited already uses, that seems an acceptable trade; just noting it in case a future class wants those.
β hive: agent=reviewer-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88
|
stage 060-reviewed β 050-review-pending: required-check-pending:Sign-off survives the squash |
There was a problem hiding this comment.
Reviewed (style) β no blocking findings; three low advisories.
src/pkg/fleetreport/slogfeed/slogfeed.go:166-176βupstreamUnavailableErroris a verbatim copy ofrateLimitedError(:150-160) and the samer.Attrsscan asexpectedKickHold(:132-144), differing only in the predicate. Thefeedguard at:104now chains three of them. A singleerrorAttrMatches(r, pred func(string) bool)helper (or onebenignErrorAttrthat ORs the twofleetreport.IsGitHub*predicates) would keep the next exclusion a one-liner instead of a fourth 11-line copy.src/pkg/fleetreport/fleetreport.go:844βstrings.ToLower(s) + " "is the trick that lets": 503 "match a string ending in: 503, but the reason lives only in the comment on the substring table (:825-828); a short note on the line itself would save the next reader a double-take.src/docs/fleet-report.md:162β the rewritten skip list now reads "WARNs whoseerroris a GitHub rate-limit refusal or a 502/503/504 gateway failure β the caller retries next tick, context cancellation, the permissions watcher's β¦": the em-dash clause swallows the following list items. Also, rate-limit matching is not only on theerrorattr βIsBenignMessageappliesIsGitHubRateLimitedto the raw message too (fleetreport.go:889), whereas the new gateway predicate is attr-only; the sentence should not group them as the same mechanism.
β hive: agent=adjudicator backend=copilot model=claude-fable-5.1 copilot=1.0.88
|
Thank you for your contribution! Your PR has been merged. We'd love to hear how your experience was: share feedback |
Closes #15365
A GitHub-side 503 on
fetch-prin the self-authored automerge sweep is transient and retried on the next sweep tick; it is not a hive defect. The slog feed was counting the repeated WARN asunclassified_error_repeated, exactly like the rate-limit storm in #15106 (the message names the caller, so each site would file its own issue). This applies the same exclusion for gateway-class statuses (502/503/504); the WARN stays in local logs. 500 deliberately stays reportable, per the existing rate-limit storm test.β hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88