Skip to content
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

Multiple fixes for federated programs with TypeScript target #1752

Merged
merged 52 commits into from
Jun 3, 2023

Conversation

byeonggiljun
Copy link
Collaborator

@byeonggiljun byeonggiljun commented May 19, 2023

After fixing the launch script so that its exit code reflects that when the RTI cannot be found this amounts to an error, it became clear that quite a few of the federated tests were failing.

Of those failing tests, the following were successfully repaired:

  • ChainWithDelay.lf
  • DistributedCount.lf
  • DistributedCountPhysical.lf
  • DistributedDoublePort.lf
  • DistributedLoopedAction.lf
  • DistributedLoopedPhysicalAction.lf
  • DistributedStop.lf
  • DistributedStopZero.lf
  • HelloDistributed.lf
  • StopAtShutdown.lf
  • TopLevelArtifacts.lf

The following tests need more work and have temporarily been marked as failing:

  • DistributedCountPhysicalAfterDelay.lf
  • LoopDistributedCentralized.lf
  • LoopDistributedDouble.lf
  • PingPongDistributed.lf
  • PingPongDistributedPhysical.lf
  • SimpleFederated.lf

Relevant PR: lf-lang/reactor-ts#152

@byeonggiljun
Copy link
Collaborator Author

Known error: The keepAlive should be set to true in a federation, but it isn't. I think several tests can pass after fixing this.

@hokeun
Copy link
Member

hokeun commented May 20, 2023

Known error: The keepAlive should be set to true in a federation, but it isn't. I think several tests can pass after fixing this.

I fixed this by preventing the federateConfig.keepAlive from being overwritten by the app parameter in 3b1ad06

There are still errors in PingPongDistributed.lf and LoopDistributedDouble.lfdue to the PTAG handling. This might be related to the FIXME here, which temporarily disabled PTAG handling: https://github.com/lf-lang/reactor-ts/blob/master/src/core/federation.ts#L1379

@lhstrh
Copy link
Member

lhstrh commented May 20, 2023

The check boxes in the PR description are meant to track progress of the PR, so we should only lists the tests that are failing, and check off the ones that we fixed...

@lhstrh lhstrh mentioned this pull request May 20, 2023
2 tasks
@byeonggiljun
Copy link
Collaborator Author

byeonggiljun commented May 22, 2023

I suggest merging this PR first by moving failed tests to the failing folder. Because fixing all failed tests pass requires lots of time and makes this PR too heavy. Currently, just 27/42 Python federated tests are passing. Also, I realized that we have to add PTAG handling to fix the remaining failing tests in reactor-ts. And it requires handling of the input_control_reaction, the output _control_reaction, and port_absent messages.

Because we get some improvements (finding the fault of the script and fixing some TypeScript federated Tests) with this PR, I think it's fine to merge this PR first and create other PRs that solve Python tests and TypeScript tests.

For some reason, creating a trap for SIGTERM results in SIGTERM not
causing the program to exit.

In any case, we really do not want the program to exit without killing
the RTI and federates under any circumstance unless we are sure that the
program terminated successfully. Therefore, it seems safest to require
positive confirmation via an EXITED_SUCCESSFULLY flag that the program
really did exit successfully.
This replaces all instances in the test/Python/src directory.
This is not the right solution. The right solution is not to do the
files property merging in the first place. This has been discusssed.
I think everyone agrees about this, but probably it will not be fixed
until the package manager is more complete.
@petervdonovan petervdonovan linked an issue Jun 1, 2023 that may be closed by this pull request
@lhstrh lhstrh marked this pull request as ready for review June 1, 2023 01:22
Copy link
Member

@lhstrh lhstrh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assuming that @byeong-gil will document the issues with the TypeScript tests now marked as failing, let's merge this so that we regain testing ability for federated execution in Python and TypeScript.

@lhstrh lhstrh enabled auto-merge June 1, 2023 01:26
lhstrh and others added 9 commits May 31, 2023 21:58
StringBuffers differ from StringBuilders mainly in that they are
synchronized. It is not entirely clear to me where the concurrent
accesses would be coming from since there is only one thread writing to
this StringBuffer (right?) but it is one more thing to check.
@lhstrh lhstrh merged commit 8e585f6 into master Jun 3, 2023
@petervdonovan petervdonovan deleted the fix-ts-federated-tests branch June 3, 2023 15:18
@petervdonovan petervdonovan changed the title Federated launch script to error when RTI is missing Multiple fixes for federated programs with TypeScript target Aug 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Debug logging in CI causes OutOfMemoryError
4 participants