ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From atk...@apache.org
Subject ambari git commit: AMBARI-12087 Rolling Upgrade: downgrade doesn't work. (atkach)
Date Tue, 23 Jun 2015 12:53:40 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk fece50c72 -> 6c845315e


AMBARI-12087 Rolling Upgrade: downgrade doesn't work. (atkach)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/6c845315
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/6c845315
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/6c845315

Branch: refs/heads/trunk
Commit: 6c845315e1c4a5620d6b8b831b7036f86ab52714
Parents: fece50c
Author: Andrii Tkach <atkach@hortonworks.com>
Authored: Tue Jun 23 15:08:21 2015 +0300
Committer: Andrii Tkach <atkach@hortonworks.com>
Committed: Tue Jun 23 15:08:21 2015 +0300

----------------------------------------------------------------------
 .../app/controllers/main/admin/stack_and_upgrade_controller.js   | 4 +++-
 .../controllers/main/admin/stack_and_upgrade_controller_test.js  | 4 ++--
 2 files changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/6c845315/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js b/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js
index 309ab5e..fd9e40a 100644
--- a/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js
+++ b/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js
@@ -360,7 +360,9 @@ App.MainAdminStackAndUpgradeController = Em.Controller.extend(App.LocalStorage,
       name: 'admin.downgrade.start',
       sender: this,
       data: {
-        from: App.RepositoryVersion.find().findProperty('displayName', this.get('upgradeVersion')).get('repositoryVersion'),
+        from: App.RepositoryVersion.find().find(function(version) {
+          return (version.get('stackVersionType') + "-" + version.get('repositoryVersion'))
=== this.get('upgradeVersion');
+        }, this).get('repositoryVersion'),
         value: currentVersion.repository_version,
         label: currentVersion.repository_name,
         isDowngrade: true

http://git-wip-us.apache.org/repos/asf/ambari/blob/6c845315/ambari-web/test/controllers/main/admin/stack_and_upgrade_controller_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/controllers/main/admin/stack_and_upgrade_controller_test.js b/ambari-web/test/controllers/main/admin/stack_and_upgrade_controller_test.js
index a37e115..c5096c7 100644
--- a/ambari-web/test/controllers/main/admin/stack_and_upgrade_controller_test.js
+++ b/ambari-web/test/controllers/main/admin/stack_and_upgrade_controller_test.js
@@ -688,8 +688,8 @@ describe('App.MainAdminStackAndUpgradeController', function() {
       sinon.stub(controller, 'abortUpgrade');
       sinon.stub(App.RepositoryVersion, 'find').returns([
         Em.Object.create({
-          displayName: 'HDP-2.3',
-          repositoryVersion: '2.3'
+          repositoryVersion: '2.3',
+          stackVersionType: 'HDP'
         })
       ]);
     });


Mime
View raw message