6ed61f9
Emit ResendIn event when replaying inbound messages
Click to expand commit body
Add a ResendIn message event type that records the original stream ID
and bandwidth ID without duplicating body or media fields. The webhook
handler emits this event instead of a normal In event when the
X-JMP-Resend header is present.
Amolith
created
980b24a
fix: make sure ARGV[0] is set for all tests
each test runs on its own reactor. stopping it means that `assert`s are
never called, which meant that gateway shutdown was counted as test
success. no bueno!
Phillip Davis
created
34f259b
Add resend-inbounds script for replaying messages from Redis
ee1ac92
Merge branch 'emit-messages-to-event-stream' of https://git.secluded.site/sgx-bwmsgsv2
Click to expand commit body
* 'emit-messages-to-event-stream' of https://git.secluded.site/sgx-bwmsgsv2:
Separate message_id into bandwidth/stanza IDs, make timestamp optional
Switch from ValueSemantics to normal OOP Ruby
Use stream name in example
Remove unused wait_for
Pin ruby-bandwidth-iris to ~> 2.7
Add Redis stream trim example
Emit messages and statuses to Redis stream
- The first commit was broken since it didn't include the `with_stubs`
helper
- The second one was included in a previous patchset but I'm including
it as a standalone to get upstream tests 'fixed.' Apparnetly this test
reliably passed without stubbing TnOptiions.get, but clearly it should
be stubbed or mocked.
The following changes since commit 710dfae450ea52a53a46f92776451e9e3f1afa19:
Merge branch '380-conditionally-show-command' of https://git.secluded.site/sgx-bwmsgsv2 (2025-10-22 09:49:51 -0500)
are available in the Git repository at:
test_fixes
for you to fetch changes up to 23cca00d8274c7f8bf808d5f0af6993369c7a76d:
fix `test_port_out_pin` (2026-01-31 10:17:03 -0500)
----------------------------------------------------------------
Phillip Davis (2):
fix: handle 404 in tn_eligible_for_port_out_pin?
fix `test_port_out_pin`
lib/bandwidth_tn_options.rb | 8 +++++++-
test/test_bandwidth_tn_options.rb | 19 +++++++++++++++++++
test/test_component.rb | 34 ++++++++++++++++++++++++----------
test/test_helper.rb | 11 +++++++++++
4 files changed, 61 insertions(+), 11 deletions(-)
create mode 100644 test/test_bandwidth_tn_options.rb
So it doesn't fall over on errors and we have to rely on a supervisor to
bring it back up a couple minutes after. This also adds Sentry error
reporting, only tested with the mock, not with actual GlitchTip.
Amolith
created
324d4e3
Separate message_id into bandwidth/stanza IDs, make timestamp optional
Click to expand commit body
Having both bandwidth and stanza IDs would be useful instead of only
ever capturing one. With both, message_id becomes redundant.
Use provided timestamp everywhere, don't generate a timestamp when one's
not provided and instead just rely on the event ID from redis, because
stream IDs are timestamps.
Amolith
created
d71aff8
Switch from ValueSemantics to normal OOP Ruby
Click to expand commit body
The more I tried to clean up and improve the use of ValueSemantics, the
more I came to the conclusion it would either have way too much
duplication or deduplicating would be too messy and complex.
- depend on Amolith's fork of Rantly. Fix has moved into upstream but
requires jump to Ruby 3.3; should do eventually, but 3.3 isn't even
packaged in our Guix commit.
- pin to same Rubocop version as sgx-jmp.
- pry-byebug
Some dependencies or other depend on them, but don't add them to their
Gemfile. However, they were removed from the stdlib in later Ruby
versions, so things break if we don't explicitly include them.
Phillip Davis
created
752795f
fix: handle 404 in tn_eligible_for_port_out_pin?