-
Notifications
You must be signed in to change notification settings - Fork 63
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
Adding support of transient federates #2213
base: master
Are you sure you want to change the base?
Conversation
…ut the coordination and the target
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.
Looks great! The tests are quite nice. I wonder whether they will prove flaky, since there is always a risk of the launched federates taking an indeterminate amount of time to launch. Have you seen any flaky failures?
core/src/main/java/org/lflang/federated/launcher/FedLauncherGenerator.java
Outdated
Show resolved
Hide resolved
test/C/src/federated/transient/TransientDownstreamWithTwoUpstream.lf
Outdated
Show resolved
Hide resolved
=} | ||
|
||
/** Persistent federate that is responsible for lauching the transient federate */ | ||
reactor TransientExec(offset: time = 0, period: time = 0, fed_instance_name: char* = "instance") { |
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.
Same comment about offset
and period
. These seem identical across files. Wouldn't it be better to import them from just one file?
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.
When TransientExec
is imported, the execution fails with a segmentation fault when launching mid
.
Having a char *
as a parameter (fed_instance_name
) when instantiating an imported federate causes this.
Any idea about how to fix this?
…nerator.java Co-authored-by: Edward A. Lee <[email protected]>
Co-authored-by: Edward A. Lee <[email protected]>
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.
I have significant concerns about this approach, and I don't think that we should merge this lightheartedly without being clear about the benefits and the costs. See my comment in the discussion thread for an explanation.
…sts and reduce redundancy
… of launching time in transient federates. This is simply done by increasing the timeout to 3s instead of 2s, and adjusting the check accordingly
I agree that there are chances of having the tests prove flaky... But I have not encountered such a case so far on my machine. As a proactive workaround, I increased the timeout in this commit 3503ee1. |
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
This PR replaces #1695.
The companion PR in
reactor-c
is lf-lang/reactor-c#358.It implements the transient feature in the federation execution. Details of the implementation are documented in Discussion #2212.