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

Re-order rai logic for plugins #3526

Merged
merged 5 commits into from
Oct 6, 2020

Conversation

Jack-Byrne
Copy link
Collaborator

Fixes #3172 #3162

This PR is Ready for review.

Risk

This PR makes no API changes.

Testing Plan

Send on vehicle data notification at same time app registers. Core should not crash.

Summary

Moves the call to add the newly registered app to the applications list later in the registration process. This ensures that an app has all of its necessary plugins added before it is accessible by the applications accessor.

CLA

@@ -558,6 +558,9 @@ class ApplicationManager {
const std::shared_ptr<smart_objects::SmartObject>&
request_for_registration) = 0;

virtual void FinalizeAppRegistration(ApplicationSharedPtr application,
Copy link
Contributor

Choose a reason for hiding this comment

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

Would be nice to have doxygen description

plugin.OnApplicationEvent(plugin_manager::kApplicationRegistered,
application);
};
application_manager_.ApplyFunctorForEachPlugin(on_app_registered);
Copy link
Contributor

Choose a reason for hiding this comment

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

In this case it is important to remember that when the plugin received kApplicationRegistered event, the application is not finally registered. I would add this as a comment in the kApplicationRegistered enum

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Noting that this placement is the most important part of the change. This event needed to happen before an app was added to the applications accessor in the app manager.

@Jack-Byrne Jack-Byrne merged commit 8539a42 into release/7.0.0 Oct 6, 2020
@Jack-Byrne Jack-Byrne deleted the fix/reorder_rai_logic_for_plugins branch October 6, 2020 13:21
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