-
Notifications
You must be signed in to change notification settings - Fork 43
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
Fix missing request type in OnSystemRequest #315
base: develop
Are you sure you want to change the base?
Conversation
There was found a few issues while working with HMI in ExternalPolicies = true mode: 1. HMI is sending OnSystemRequest twice 2. First OnSystremRequest notification does not contain requestType parameter To fix that, HMI logic was updated to launch retry sequence only after the response received by pack client. By some reason, retry sequence was additionally been started right after GetPolicyConfigurationData response. This extra call has been removed to make HMI send notification just once. Also, retry sequence function was updated to use request params received by pack client (if available).
app/controller/SettingsController.js
Outdated
*/ | ||
policyUpdateRetry: function(abort) { | ||
policyUpdateRetry: function(action, request_params) { |
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.
@AKalinich-Luxoft just a suggestion. How about removing action
parameter? The only check for this parameter is action !== 'ABORT'
. So, maybe, it would be better to have an additional abortion function? Moreover, as far as I understand, if isIterationInProgress == true
, abort parameter is pointless. And when we get to abort code block, the timer is already cleaned up.
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.
@mkorniichuk good idea. I made some code refactoring in 9567fea
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.
@AKalinich-Luxoft it looks like this PR might need to be rethought a bit with the changes made in #366
…_request_missing_type
@jacobkeeler after merge of #366 as I can see issues #313 and #339 are not reproducible on develop branch. So current PR after the conflicts resolution looks like just a refactoring of existing code. It's not a big deal to merge it now, however I recommend to do that as it makes proprietary code much cleaner and better documented. |
Fixes #313 and #339
This PR is ready for review.
Testing Plan
Will be tested manually
Summary
There was found a few issues while working with HMI in
ExternalPolicies = true
mode:To fix that, HMI logic was updated to launch retry sequence only after the response received by pack client. By some reason, retry sequence was additionally been started right after
GetPolicyConfigurationData
response. This extra call has been removed to make HMI send notification just once. Also, retry sequence function was updated to use request params received by pack client (if available).CLA