----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/34889/#review86726 -----------------------------------------------------------
ambari-web/app/views/main/admin/stack_upgrade/upgrade_version_box_view.js <https://reviews.apache.org/r/34889/#comment138787> This code allows undefined and other falsy values (except null) to be the possible return values. The only falsy value that function `getStackVersionNumber` should possibly return should be null as that is being handled ahead in the controller. This can be achieved by checking if stackVersion is a truthy value instead of checking it against null value. if (stackVersion) { return stackVersion; } - Jaimin Jetly On June 3, 2015, 4:05 p.m., Di Li wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/34889/ > ----------------------------------------------------------- > > (Updated June 3, 2015, 4:05 p.m.) > > > Review request for Ambari and Jaimin Jetly. > > > Bugs: AMBARI-11185 > https://issues.apache.org/jira/browse/AMBARI-11185 > > > Repository: ambari > > > Description > ------- > > I used HDP beta build: > http://s3.amazonaws.com/dev.hortonworks.com/ambari/centos6/2.x/BUILDS/2.1.0-630 > > On the Stack and Versions page, under Versions tab, user cannot update the > repo URL of an added Repo version. Users can add repo versions via the > "Manage Versions" button, however after the repo is added, user cannot update > the repo URL anymore. > > As part of the update repo URL feature introduced in Ambari 2.0, a repo > version check was added to make sure the repo added has the same version info > as the one installed, due to Ambari 2.0 's rolling upgrade limitations. > > In the Ambari 2.1 build I tried, the repo version check > (AmbariManagementControllerImpl.verifyRepository) is still the Ambari 2.0 > behavior where it rejects any updates of HDP 2.3 repo URL. > > > Diffs > ----- > > ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js > 223685b > ambari-web/app/views/main/admin/stack_upgrade/upgrade_version_box_view.js > 4401bae > ambari-web/test/controllers/main/admin/stack_and_upgrade_controller_test.js > 7041a38 > > ambari-web/test/views/main/admin/stack_upgrade/upgrade_version_box_view_test.js > 21cea1c > > Diff: https://reviews.apache.org/r/34889/diff/ > > > Testing > ------- > > Unit test > 6168 tests complete (29 seconds) > > Manual test via Ambari UI > > > Thanks, > > Di Li > >
