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

feat: early deploy at network generation #445

Open
wants to merge 30 commits into
base: transition-to-runkit
Choose a base branch
from

Conversation

wvmcastro
Copy link

@wvmcastro wvmcastro commented Dec 6, 2024

On top of:

Depends on:

Opening this PR for getting a CI run with test failures and an early request for comments

@wvmcastro wvmcastro requested review from doudou and jhonasiv December 6, 2024 13:47
@wvmcastro wvmcastro self-assigned this Dec 6, 2024
@wvmcastro wvmcastro force-pushed the early-deploy-on-generation branch 5 times, most recently from 309e84c to 396f3b5 Compare December 19, 2024 01:05
@wvmcastro wvmcastro force-pushed the early-deploy-on-generation branch from 396f3b5 to d7d69a0 Compare January 7, 2025 16:28
@wvmcastro wvmcastro force-pushed the early-deploy-on-generation branch from d7d69a0 to b25b027 Compare January 16, 2025 18:12
@wvmcastro wvmcastro force-pushed the early-deploy-on-generation branch from 6907422 to 1c41f2b Compare January 29, 2025 14:30
@wvmcastro wvmcastro changed the title WIP chore: early deploy at network generation chore: early deploy at network generation Jan 29, 2025
lib/syskit/exceptions.rb Outdated Show resolved Hide resolved
lib/syskit/network_generation/system_network_generator.rb Outdated Show resolved Hide resolved
test/test/test_profile_assertions.rb Outdated Show resolved Hide resolved
test/test/test_profile_assertions.rb Outdated Show resolved Hide resolved
@wvmcastro wvmcastro force-pushed the early-deploy-on-generation branch 3 times, most recently from bc98f43 to a5e3faf Compare January 31, 2025 20:41
@wvmcastro wvmcastro requested a review from doudou January 31, 2025 20:42
@wvmcastro wvmcastro force-pushed the early-deploy-on-generation branch 2 times, most recently from 03d9cfe to d999c66 Compare February 3, 2025 12:17
@wvmcastro wvmcastro force-pushed the early-deploy-on-generation branch from d999c66 to 5d3caa1 Compare February 3, 2025 16:14
lib/syskit/exceptions.rb Outdated Show resolved Hide resolved
lib/syskit/network_generation/merge_solver.rb Outdated Show resolved Hide resolved
lib/syskit/network_generation/system_network_generator.rb Outdated Show resolved Hide resolved
@wvmcastro
Copy link
Author

ping @doudou @jhonasiv

lib/syskit/exceptions.rb Show resolved Hide resolved
lib/syskit/network_generation/engine.rb Show resolved Hide resolved
lib/syskit/network_generation/engine.rb Outdated Show resolved Hide resolved
lib/syskit/network_generation/merge_solver.rb Outdated Show resolved Hide resolved
lib/syskit/network_generation/merge_solver.rb Outdated Show resolved Hide resolved
lib/syskit/exceptions.rb Outdated Show resolved Hide resolved
lib/syskit/network_generation/system_network_generator.rb Outdated Show resolved Hide resolved
the test was "succeding" because can_merge? was returning false,
and not because both execution agents were non nil, as the test intended
In order to it be possible, I had to change merge_solver.merge_identical_tasks call
to merge_solver.merge_compositions at Engine#finalize_deployed_tasks. With
merged previously because all had non nil execution agents, but now when
this rule changes with early_deploy and the merge solver would attempt to
merge tasks contexts because their agents are non nil.

It particulary breaks when for some reason the current task context cannot
be deployed by its transaction proxy counter part as in
"ensures that the old task gets garbage collected when child
of another still useful task test"
when early deploying, a non deployed task can't be merged with
a deployed one, because the basic assumption is that all tasks
should have a deployment'
verifying it earlier led throwing deploying errors where there were primary
instantiation errors
when early deploying the assumption changes to "every task should have an execution agent" so
merging one that does with one that doesn't would be wrong.

Note that when not early_deploying the merge criteria is exactly the opposite, two task contexts
should be merged when just one of them has an execution agent
because all validate_* paramenters are passed to generate so far
@wvmcastro wvmcastro force-pushed the early-deploy-on-generation branch from f3236cc to d726d8e Compare February 7, 2025 20:32
@wvmcastro wvmcastro requested a review from doudou February 11, 2025 12:22
lib/syskit/exceptions.rb Outdated Show resolved Hide resolved
lib/syskit/exceptions.rb Outdated Show resolved Hide resolved
lib/syskit/network_generation/system_network_generator.rb Outdated Show resolved Hide resolved
@doudou doudou changed the title chore: early deploy at network generation feat: early deploy at network generation Feb 12, 2025
Copy link
Contributor

@jhonasiv jhonasiv left a comment

Choose a reason for hiding this comment

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

Just this small suggestion, I am fine with the rest of the PR

test/network_generation/test_merge_solver.rb Outdated Show resolved Hide resolved
@wvmcastro wvmcastro requested a review from doudou February 13, 2025 13:36
lib/syskit/exceptions.rb Outdated Show resolved Hide resolved
lib/syskit/exceptions.rb Outdated Show resolved Hide resolved
Comment on lines 479 to 480
agent = tasks.first.execution_agent
deployment_m = agent.deployed_orogen_model_by_name(orocos_name)
Copy link
Member

Choose a reason for hiding this comment

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

You need to extract this information in the constructor. There is no guarantee that the plan will be the way it was once pretty_print is called

wvmcastro and others added 3 commits February 14, 2025 16:33
The task->agent relation is registered in the plan graph
and it changes between exception raise and the moment it
is printed
@wvmcastro wvmcastro requested a review from doudou February 14, 2025 19:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants