-
Notifications
You must be signed in to change notification settings - Fork 0
feat(control-plane)!: /ws/events says when it is live, over an ordered in-process event bus #1863
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from 4 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
cebbbb6
feat(engine): subscribe reports when its subscription is live
tato123 80a5cb9
feat(control-plane): /ws/events tells a subscriber when its subscript…
tato123 9a4bfb8
fix(engine): the live-signal test locks the signal rather than the clock
tato123 623f2b6
test(control-plane): the tap frame gets a lock, and a break names itself
tato123 ef9e401
refactor(engine)!: the control-plane event bus is an in-process registry
tato123 d721c0d
fix(control-plane): a lagging /ws/events client is closed, not buffer…
tato123 c15eb45
fix(control-plane): the lag latch cannot be missed, and the handler s…
tato123 423605f
refactor(engine): events are queued FIFO, then dispatched in order
tato123 d14f9be
feat(control-plane)!: /ws/events is a best-effort stream, not a record
tato123 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
Large diffs are not rendered by default.
Oops, something went wrong.
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🩺 Stability & Availability | 🟠 Major | ⚡ Quick win
A fixed
runtime_idmakes the test bus shared across processes.PUBSUB.initderives iceoryx2 service names from theruntime_id."test-api-server-control-plane"is a constant, so every process that runs this test binary on one machine opens the same services. Two concurrent runs, or a stale subscriber from a previous run, then publish into each other's sample windows.tools_call_logs_returns_bounded_window_sampleassertsreceived == 0, and#[serial]cannot protect it, because#[serial]is intra-process only.The engine's own tests avoid this:
create_initialized_businruntime/streamlib-engine/src/core/pubsub/integration_tests.rsline 82 builds a per-bus id from a UUID. Do the same here.🛡️ Make the test bus per-process
INITIALIZED.call_once(|| { let node = ::streamlib::sdk::iceoryx2::Iceoryx2Node::new() .expect("iceoryx2 node for the control-plane test bus"); - ::streamlib::sdk::pubsub::PUBSUB.init("test-api-server-control-plane", node); + // Per-process id: the runtime_id names the iceoryx2 services, so a + // constant would let a concurrent or stale run of this binary publish + // into another run's sample window. + ::streamlib::sdk::pubsub::PUBSUB.init( + &format!( + "test-api-server-control-plane-{}", + std::process::id() + ), + node, + ); }); }🤖 Prompt for AI Agents