----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/51762/#review148497 -----------------------------------------------------------
Ship it! Ship It! - Jonathan Hurley On Sept. 9, 2016, 1:07 p.m., Dmitro Lisnichenko wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/51762/ > ----------------------------------------------------------- > > (Updated Sept. 9, 2016, 1:07 p.m.) > > > Review request for Ambari, Jonathan Hurley and Nate Cole. > > > Bugs: AMBARI-18350 > https://issues.apache.org/jira/browse/AMBARI-18350 > > > Repository: ambari > > > Description > ------- > > Repository info for a stack can contain any number of repo definitions. For > HDP, there are two repos used (HDP and HDP-UTILS). When checking > repositories for duplicate URL, the code does this: > {noformat} > if (! repositoryEntity.getRepositoryId().startsWith("HDP-UTILS") && // > HDP-UTILS is shared between repo versions > ! existingRepoVersion.getId().equals(repositoryVersion.getId())) { // Allow > modifying already defined repo version > existingRepoUrls.add(repositoryEntity.getBaseUrl()); > } > {noformat} > > We should make the unique declaration directly for the repository so authors > don't have to guess. This entails: > * Change {{repoinfo.xml}} to support a {{<unique>}} element within {{<repo>}} > * {{<unique>}} should apply to, say, versions of HDP that change with each > release. Absence of said element implies {{false}} for backward > compatibility. > * Change {{RepositoryVersionResourceProvider.validateRepositoryVersion(...)}} > to use this boolean for uniqueness check. > * Update the {{version_definition.xsd}} to include this new element. > > > Diffs > ----- > > ambari-funtest/src/test/resources/stacks/HDP/0.1/repos/repoinfo.xml 1ea1809 > ambari-funtest/src/test/resources/stacks/HDP/0.2/repos/repoinfo.xml c0095b5 > ambari-funtest/src/test/resources/stacks/HDP/1.2.0/repos/repoinfo.xml > 04613ad > ambari-funtest/src/test/resources/stacks/HDP/1.3.0/repos/repoinfo.xml > ec0be8f > ambari-funtest/src/test/resources/stacks/HDP/1.3.1/repos/repoinfo.xml > ed1aed8 > ambari-funtest/src/test/resources/stacks/HDP/2.0.1/repos/repoinfo.xml > eb026a7 > ambari-funtest/src/test/resources/stacks/HDP/2.0.5/repos/repoinfo.xml > 91f0f02 > ambari-funtest/src/test/resources/stacks/HDP/2.0.6.1/repos/repoinfo.xml > 2739c5c > ambari-funtest/src/test/resources/stacks/HDP/2.0.6/repos/repoinfo.xml > 2739c5c > ambari-funtest/src/test/resources/stacks/HDP/2.0.7/repos/repoinfo.xml > 8ebea21 > > ambari-funtest/src/test/resources/stacks/HDP/2.0.7/services/HBASE/metainfo.xml > e3ebea1 > ambari-funtest/src/test/resources/stacks/HDP/2.0.8/repos/repoinfo.xml > f8542d0 > ambari-funtest/src/test/resources/stacks/HDP/2.1.1/repos/repoinfo.xml > 9d8a232 > ambari-funtest/src/test/resources/stacks/HDP/2.2.0.ECS/repos/repoinfo.xml > 6c2f99a > ambari-funtest/src/test/resources/stacks/HDP/2.2.0/repos/repoinfo.xml > 2a939f1 > ambari-funtest/src/test/resources/stacks/OTHER/1.0/repos/repoinfo.xml > 9d8a232 > ambari-funtest/src/test/resources/stacks/OTHER/2.0/repos/repoinfo.xml > 9d8a232 > > ambari-server/src/main/java/org/apache/ambari/server/controller/RepositoryResponse.java > 30bd0db > > ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RepositoryResourceProvider.java > 3203539 > > ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RepositoryVersionResourceProvider.java > e440460 > > ambari-server/src/main/java/org/apache/ambari/server/orm/entities/RepositoryEntity.java > 8dc2ec9 > > ambari-server/src/main/java/org/apache/ambari/server/state/RepositoryInfo.java > 811113a > > ambari-server/src/main/java/org/apache/ambari/server/state/stack/RepositoryXml.java > 4a0ae3b > > ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/RepositoryVersionHelper.java > d26b834 > ambari-server/src/main/resources/stacks/BIGTOP/0.8/repos/repoinfo.xml > 6a385c4 > > ambari-server/src/main/resources/stacks/HDP/2.0.6.GlusterFS/repos/repoinfo.xml > 9b62568 > ambari-server/src/main/resources/stacks/HDP/2.0.6/repos/repoinfo.xml > 9855074 > ambari-server/src/main/resources/stacks/HDP/2.0/repos/repoinfo.xml a5d8a51 > > ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/repos/repoinfo.xml > cfee6f5 > ambari-server/src/main/resources/stacks/HDP/2.1/repos/repoinfo.xml 938f627 > ambari-server/src/main/resources/stacks/HDP/2.2/repos/repoinfo.xml dbf8506 > ambari-server/src/main/resources/stacks/HDP/2.3.ECS/repos/repoinfo.xml > b44cca5 > > ambari-server/src/main/resources/stacks/HDP/2.3.GlusterFS/repos/repoinfo.xml > 24b05b0 > ambari-server/src/main/resources/stacks/HDP/2.3/repos/repoinfo.xml ec9fba0 > ambari-server/src/main/resources/stacks/HDP/2.4/repos/repoinfo.xml 1087d9c > ambari-server/src/main/resources/stacks/HDP/2.5/repos/repoinfo.xml 8657d91 > ambari-server/src/main/resources/stacks/HDPWIN/2.1/repos/repoinfo.xml > 7f9e075 > ambari-server/src/main/resources/stacks/HDPWIN/2.2/repos/repoinfo.xml > e429adb > ambari-server/src/main/resources/stacks/HDPWIN/2.3/repos/repoinfo.xml > 54a0bf0 > ambari-server/src/main/resources/version_definition.xsd bd49028 > > ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RepositoryVersionResourceProviderTest.java > 8ba141b > > ambari-server/src/test/java/org/apache/ambari/server/state/stack/upgrade/RepositoryVersionHelperTest.java > 8d82d09 > ambari-server/src/test/resources/bad-stacks/HDP/0.1/repos/repoinfo.xml > 6948ae7 > ambari-server/src/test/resources/hbase_version_test.xml ca8018b > ambari-server/src/test/resources/stacks/HDP/0.1/repos/repoinfo.xml 1ea1809 > ambari-server/src/test/resources/stacks/HDP/0.2/repos/repoinfo.xml c0095b5 > ambari-server/src/test/resources/stacks/HDP/1.2.0/repos/repoinfo.xml > 04613ad > ambari-server/src/test/resources/stacks/HDP/1.3.0/repos/repoinfo.xml > ec0be8f > ambari-server/src/test/resources/stacks/HDP/1.3.1/repos/repoinfo.xml > ed1aed8 > ambari-server/src/test/resources/stacks/HDP/2.0.1/repos/repoinfo.xml > eb026a7 > ambari-server/src/test/resources/stacks/HDP/2.0.5/repos/repoinfo.xml > 91f0f02 > ambari-server/src/test/resources/stacks/HDP/2.0.6.1/repos/repoinfo.xml > 2739c5c > ambari-server/src/test/resources/stacks/HDP/2.0.6/repos/repoinfo.xml > 2739c5c > ambari-server/src/test/resources/stacks/HDP/2.0.7/repos/repoinfo.xml > 8ebea21 > > ambari-server/src/test/resources/stacks/HDP/2.0.7/services/HBASE/metainfo.xml > e3ebea1 > ambari-server/src/test/resources/stacks/HDP/2.0.8/repos/repoinfo.xml > f8542d0 > ambari-server/src/test/resources/stacks/HDP/2.1.1/repos/repoinfo.xml > 9d8a232 > ambari-server/src/test/resources/stacks/HDP/2.2.0.ECS/repos/repoinfo.xml > 6c2f99a > ambari-server/src/test/resources/stacks/HDP/2.2.0/repos/repoinfo.xml > 207d258 > > ambari-server/src/test/resources/stacks/HDP/2.2.0/repos/version-2.2.0.4-123.xml > 0b027ee > > ambari-server/src/test/resources/stacks/HDP/2.2.0/repos/version-2.2.0.4-124-suse11.xml > 68d811a > ambari-server/src/test/resources/stacks/OTHER/1.0/repos/repoinfo.xml > 9d8a232 > ambari-server/src/test/resources/stacks/OTHER/2.0/repos/repoinfo.xml > 9d8a232 > > ambari-server/src/test/resources/stacks_with_common_services/HDP/0.1/repos/repoinfo.xml > 1ea1809 > > ambari-server/src/test/resources/stacks_with_common_services/HDP/0.2/repos/repoinfo.xml > c0095b5 > > ambari-server/src/test/resources/stacks_with_cycle/OTHER/1.0/repos/repoinfo.xml > 9d8a232 > > ambari-server/src/test/resources/stacks_with_cycle/OTHER/2.0/repos/repoinfo.xml > 9d8a232 > > ambari-server/src/test/resources/stacks_with_cycle2/stack1/1.0/repos/repoinfo.xml > 9d8a232 > > ambari-server/src/test/resources/stacks_with_cycle2/stack2/1.0/repos/repoinfo.xml > 9d8a232 > > ambari-server/src/test/resources/stacks_with_cycle2/stack3/1.0/repos/repoinfo.xml > 9d8a232 > > ambari-server/src/test/resources/stacks_with_extensions/HDP/0.1/repos/repoinfo.xml > 1ea1809 > > ambari-server/src/test/resources/stacks_with_extensions/HDP/0.2/repos/repoinfo.xml > c0095b5 > > ambari-server/src/test/resources/stacks_with_upgrade_cycle/HDP/2.2.0/repos/repoinfo.xml > 207d258 > > ambari-server/src/test/resources/stacks_with_upgrade_cycle/HDP/2.2.0/repos/version-2.2.0.4-123.xml > 0b027ee > ambari-server/src/test/resources/version_definition_resource_provider.xml > 55cd1c1 > ambari-server/src/test/resources/version_definition_test.xml 1520774 > ambari-server/src/test/resources/version_definition_test_all_services.xml > 7557f7a > > Diff: https://reviews.apache.org/r/51762/diff/ > > > Testing > ------- > > mvn clean test > > > Thanks, > > Dmitro Lisnichenko > >