> On May 16, 2017, 9 a.m., Dmitro Lisnichenko wrote: > > ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java > > Lines 576 (patched) > > <https://reviews.apache.org/r/59277/diff/1/?file=1718429#file1718429line619> > > > > :)
lol, but...well, better to make it via // ToDo: .....as this name have good chances to leave in the code - Dmytro ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/59277/#review175070 ----------------------------------------------------------- On May 15, 2017, 5:35 p.m., Jonathan Hurley wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/59277/ > ----------------------------------------------------------- > > (Updated May 15, 2017, 5:35 p.m.) > > > Review request for Ambari, Dmytro Grinenko, Dmitro Lisnichenko, and Nate Cole. > > > Bugs: AMBARI-21022 > https://issues.apache.org/jira/browse/AMBARI-21022 > > > Repository: ambari > > > Description > ------- > > The upgrade entity is modeled currently to store only references to versions > For example, to_version is "2.5.0.0-1234" and from_version is "2.3.0.0-1". > This presents a problem with support for multiple repositories since two > stacks could potentially have the same version, thus preventing a repository > from being retrieved simply by its no-longer-unique version. > > Instead, the upgrade should be associated with a {{RepositoryVersionEntity}} > and enforced in the database. > > Using repository associations will also help to track the to/from history for > components included in the upgrade. > > Some new terminology here: > - "associated_repository" is the repository you're upgrade to (UPGRADE) or > downgrading from (DOWNGRADE). It's always singular > - "target_repositories" are the repositories you're trying to get to. In an > UPGRADE, these are all the same for all components. In a downgrade, they are > the original values of those components before the failed upgrade > > > Diffs > ----- > > > ambari-server/src/main/java/org/apache/ambari/server/alerts/ComponentVersionAlertRunnable.java > ec5c85ea35 > > ambari-server/src/main/java/org/apache/ambari/server/audit/request/eventcreator/UpgradeEventCreator.java > 456aa00df4 > > ambari-server/src/main/java/org/apache/ambari/server/checks/PreviousUpgradeCompleted.java > ef165a5ba5 > > ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariCustomCommandExecutionHelper.java > 617d7c0771 > > ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java > 882f583a2d > > ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractControllerResourceProvider.java > a762e2b156 > > ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java > 7ca6164e75 > > ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ServiceComponentDesiredStateDAO.java > 92f1d09ff0 > > ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ServiceComponentDesiredStateEntity.java > 7576e00e54 > > ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ServiceComponentHistoryEntity.java > 15214684e5 > > ambari-server/src/main/java/org/apache/ambari/server/orm/entities/UpgradeEntity.java > e5e2de385f > > ambari-server/src/main/java/org/apache/ambari/server/orm/entities/UpgradeHistoryEntity.java > PRE-CREATION > > ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/AbstractUpgradeServerAction.java > de0f282fbb > > ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/ComponentVersionCheckAction.java > 4a3bd9b4c7 > > ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/FinalizeUpgradeAction.java > 1b9fb23100 > > ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/UpdateDesiredStackAction.java > 4500b5d179 > > ambari-server/src/main/java/org/apache/ambari/server/stack/MasterHostResolver.java > ce105686f5 > > ambari-server/src/main/java/org/apache/ambari/server/state/UpgradeContext.java > a68a2e1235 > > ambari-server/src/main/java/org/apache/ambari/server/state/UpgradeContextFactory.java > 4f15ee2af8 > > ambari-server/src/main/java/org/apache/ambari/server/state/UpgradeHelper.java > 3ec907f1c3 > > ambari-server/src/main/java/org/apache/ambari/server/state/services/RetryUpgradeActionService.java > c43d3bab7e > > ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/Direction.java > cb4f501544 > > ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/HostOrderGrouping.java > d19406edd5 > > ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog220.java > a11fd961c6 > ambari-server/src/main/resources/Ambari-DDL-Derby-CREATE.sql a2a1ea9747 > ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql 6dcbf3de5b > ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql 15de29cab5 > ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql 9e2f2a7c69 > ambari-server/src/main/resources/Ambari-DDL-SQLAnywhere-CREATE.sql > 473e8ca365 > ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql 72189aaffd > ambari-server/src/main/resources/META-INF/persistence.xml 8fd539ae2d > > > Diff: https://reviews.apache.org/r/59277/diff/1/ > > > Testing > ------- > > I'm considering just commeting out the upgrade test classes for now as there > are about 200 compile errors. Most tests need to be re-written anyway. This > review is mainly to look over the overall approach to upgrade->repo > associations. > > > Thanks, > > Jonathan Hurley > >