fix(selfhost): surface failed orb relay drains - #3785
Merged
Conversation
Contributor
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3785 +/- ##
=======================================
Coverage 93.29% 93.29%
=======================================
Files 317 317
Lines 32368 32369 +1
Branches 11872 11873 +1
=======================================
+ Hits 30199 30200 +1
Misses 1537 1537
Partials 632 632
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
drainresult (including[]) as proof of broker progress, but the productiondrainOrbRelaycollapsed non-OK HTTP responses and caught errors into[], making broker failures indistinguishable from successful empty polls.Description
drainOrbRelayinsrc/orb/broker-client.tsto throw on non-OK broker responses and propagate thrown/rejected errors instead of returning[], while preserving the[]no-op when not in broker mode.test/unit/orb-broker-client.test.tsto assert the newdrainOrbRelaybehavior for non-OK responses, thrown errors, and unsafe URLs.test/unit/selfhost-monitored-work.test.tsthat wires the realdrainOrbRelaythroughdrainOrbRelayWithMonitorand verifies a 503 broker response does not stamplastDrainAtMsor clear pending acks.Testing
npm run typecheckand it completed without type errors.npm test -- --run test/unit/orb-broker-client.test.ts test/unit/selfhost-monitored-work.test.tsand all tests passed (55 tests across the two files).npm run test:coverage; the full coverage job was observed to take an extended time and was terminated to keep the submit cycle bounded, so a complete unsharded coverage report was not included in this PR submission.Codex Task