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

[SDL-0190] Handle response from HMI during resumption data #3475

Conversation

ychernysheva
Copy link
Contributor

@ychernysheva ychernysheva commented Aug 14, 2020

Fixes #2486

This PR is ready for review.

Risk

This PR makes no API changes.

Testing Plan

  • ATF Tests
  • Manual testing
  • Unit tests

Fixes:

Summary

Implemented logic of HMI erroneous responses handling during resumption process

CLA

Fix RAI default timeout

As RAI request does not depend on any HMI response
there is no need to track any timeout for it. RAI
request will be removed from/ RequestController
queue upon RAI response which will be sent anyway
Update UT
Update SDL logic to avoid sending of unsubscribeVD
to HMI during vehicle data resumption for case
when another application is also have pending
subscription for the same vehicle data.
Changed SDL logic to update subscription results for
each pending subscription request before notifying
resumption processor about current subscription is
processed.
This should be done beforehand because after raising
event to processor it can finish resumption process
and if it has failed then it can trigger sending of
the next subscription request. So at that point, each
subscription request should contain updated subscriptions
status, otherwise some redundant requests might be sent.
* @brief The ResumptionRequestIDs struct contains fields, needed during
* processing events, related to responses from HMI to each resumption request
*/
struct ResumptionRequestIDs {
Copy link
Contributor

Choose a reason for hiding this comment

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

ResumptionRequestIDs -> ResumptionRequestID

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done in eb41075

return has_subscriptions_to_restore;
}

bool ResumptionRequestIDs::operator<(const ResumptionRequestIDs& other) const {
Copy link
Contributor

Choose a reason for hiding this comment

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

move it upper as util function

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done in eb41075

<< function_id << " correlation id: " << corr_id);

auto found_app_id = GetAppIdWaitingForResponse(function_id, corr_id);
if (!found_app_id) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Add logging that response was not expected

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done in eb41075

@SNiukalov
Copy link
Contributor

SNiukalov commented Sep 2, 2020

Please be informed, we have added two more additional commits (5360321 & cf5b42d), according to
comments: #3480 (comment) #3480 (comment) #3480 (comment)

UPD: cherry-picked after 'develop' merge commit one more time:
5360321 -> f35e573
cf5b42d - > 47832c9

@AKalinich-Luxoft AKalinich-Luxoft force-pushed the feature/sdl_0190_resumption_data_error_handling branch from cf5b42d to 47832c9 Compare September 2, 2020 22:07
@iCollin
Copy link
Collaborator

iCollin commented Sep 3, 2020

@AKalinich-Luxoft We would appreciate if developers did not force push on sdl_core repository to a pr that is in review. It makes it difficult to review a PR because we cannot tell what was changed since the last review. In general, please do not rebase, do not force push against sdl_core. Instead, you can merge the current develop branch into your PR branch. Thank you

@iCollin
Copy link
Collaborator

iCollin commented Sep 3, 2020

If we are going to include f35e573 in this PR, lets fix the structure of extension_subscriptions in this PR.

Should be subscriptions[vehicle_info] = Array<bool> where they are not at the root level. We should not be just differentiating the subscriptions by type. I am fine with all this code going in 0188 as you said previously, but there is no reason to include f35e573 in this PR if we go that route.

@AKalinich-Luxoft
Copy link
Contributor

@AKalinich-Luxoft We would appreciate if developers did not force push on sdl_core repository to a pr that is in review. It makes it difficult to review a PR because we cannot tell what was changed since the last review. In general, please do not rebase, do not force push against sdl_core. Instead, you can merge the current develop branch into your PR branch. Thank you

@iCollin sorry for that. We will avoid force-pushes in a future during PR review

@AKalinich-Luxoft
Copy link
Contributor

If we are going to include f35e573 in this PR, lets fix the structure of extension_subscriptions in this PR.

Should be subscriptions[vehicle_info] = Array<bool> where they are not at the root level. We should not be just differentiating the subscriptions by type. I am fine with all this code going in 0188 as you said previously, but there is no reason to include f35e573 in this PR if we go that route.

I think it is better to update entire structure and align it with the rest of plugins in 0188. In terms of this PR, we can keep this structure simple as it has the only place of usage.
Reverted in 4bb87a5
Should be addressed in #3480

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.

8 participants