----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/42367/#review118712 -----------------------------------------------------------
Ship it! Ship It! - Di Li On Jan. 22, 2016, 7:14 p.m., Keta Patel wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/42367/ > ----------------------------------------------------------- > > (Updated Jan. 22, 2016, 7:14 p.m.) > > > Review request for Ambari, Alexandr Antonenko, Di Li, and Jaimin Jetly. > > > Bugs: AMBARI-14574 > https://issues.apache.org/jira/browse/AMBARI-14574 > > > Repository: ambari > > > Description > ------- > > On installation wizard, multiple clicks on the "Next" button can cause > skipping of steps. The timing of the 2nd click decides if that click will be > processed again or not. The following JIRAs had the same issue: > AMBARI-7195 > AMBARI-7315 > The fix for the above issues helps to resolve most part of the problem. But > if the user happened to click again at the point when the last callback > function has just completed (and thus, has made the "Next" button clickable > again) but the next step has not yet completed its rendering, then the 2nd > click gets processed again. The "current step" was already updated in the > code to point to the next step, from the 1st click. So when this 2nd click > calls the "next" function in the router, the subsequent step of the "current > step" gets set as the current step. As a result we skip steps. > > > Diffs > ----- > > ambari-web/app/controllers/wizard/step0_controller.js 5f134b5 > ambari-web/app/controllers/wizard/step3_controller.js a43303b > ambari-web/app/controllers/wizard/step4_controller.js 17ce7a6 > ambari-web/app/controllers/wizard/step7_controller.js 7b423b6 > ambari-web/app/mixins/wizard/assign_master_components.js 5545e92 > ambari-web/app/router.js 92b2bae > ambari-web/app/routes/installer.js e37a05d > ambari-web/app/views/wizard/step0_view.js 07d3414 > ambari-web/app/views/wizard/step10_view.js 858a4b2 > ambari-web/app/views/wizard/step1_view.js 452e676 > ambari-web/app/views/wizard/step2_view.js 1988f4e > ambari-web/app/views/wizard/step3_view.js 0aa5460 > ambari-web/app/views/wizard/step4_view.js 3def0c5 > ambari-web/app/views/wizard/step5_view.js a3f57b5 > ambari-web/app/views/wizard/step6_view.js e8ae176 > ambari-web/app/views/wizard/step7_view.js 9cea52f > ambari-web/app/views/wizard/step8_view.js c653fdd > ambari-web/app/views/wizard/step9_view.js e58186b > ambari-web/test/controllers/wizard/step0_test.js 4349d04 > ambari-web/test/controllers/wizard/step3_test.js 7b6684f > ambari-web/test/controllers/wizard/step4_test.js 9227279 > ambari-web/test/controllers/wizard/step5_test.js e0f8b71 > ambari-web/test/controllers/wizard/step7_test.js 762cf1f > > Diff: https://reviews.apache.org/r/42367/diff/ > > > Testing > ------- > > CAUSE & FIX: > The issue is seen in most of the wizard installation steps because the > properties responsible to disable the duplicate submit calls are unable to > account for the transition between the 'actions' and 'render' queues used by > the Ember framework. > The installation steps use the 'submit' function from controllers or the > 'next' function from installer to set the properties used in the checks for > processing the Next button clicks. These properties are reset again in the > views of next step if it renders or in the same controller/installer in case > of failures. Hence, the property that is responsible for the checks must be > accessible across controllers, installer and views. > > The fix proposed for this issue involves creating a new property > 'nextBtnClickInProgress' in the router, hence accessible in all the above > places. This property is set at suitable places in the controller/installer. > It is reset in Views of all the 11 steps of the installation wizard and also > at appropriate places in some controllers (resetting for failure cases). > The following steps have been found to skip steps and have been fixed with > the required checks: > Step 1 > Step 3 > Step 4 > Step 5 > Step 7 > > TEST CASES: > The test cases check if multiple submit calls succeed in skipping subsequent > steps. This is verified by checking the status of router's transitions call > after each submit call. Since the router's 'next' function for a step is the > last step before the context changes its current step to point to the next > step, checking if a router has made this transition or not gives an > indication of whether the next step was transitioned or not. > There are 5 new tests added to test this scenario. > > > File Attachments > ---------------- > > AMBARI-14574_Jan20_with_fix.patch > > https://reviews.apache.org/media/uploaded/files/2016/01/21/3754e2c0-d245-4ca1-9547-353b59b09ea5__AMBARI-14574_Jan20_with_fix.patch > AMBARI-14574_Jan20_manual_testing.patch > > https://reviews.apache.org/media/uploaded/files/2016/01/21/6daf6aa3-dfef-4fbb-8b2d-098faabc56f3__AMBARI-14574_Jan20_manual_testing.patch > AMBARI-14574_Jan22.patch > > https://reviews.apache.org/media/uploaded/files/2016/01/22/b40f2a4d-a5c1-45b7-a624-4a80dc7ecaaf__AMBARI-14574_Jan22.patch > > > Thanks, > > Keta Patel > >
