> On Oct. 4, 2017, 5:18 p.m., Nate Cole wrote: > > ambari-common/src/main/python/resource_management/core/providers/package/__init__.py > > Lines 42-43 (original), 42-43 (patched) > > <https://reviews.apache.org/r/62764/diff/1/?file=1845759#file1845759line42> > > > > This type of change from a set to a dictionary is very risky at this > > point for 2.6. Is there anyway to just fix the apt code for this? > > > > In addition, make sure you run this through CI in order to make sure > > acceptance tests won't go crazy.
I doubt this breaks anything. It seems `use_repos` has been "dead code" for at least 2 years: it was broken on Debian/Ubuntu since May 2015 and nobody noticed, until AMBARI-22076 introduced code that started using it. We could probably check the OS in the OS-agnostic code and pass different sets in each case. Sounds like an ugly hack to me. > On Oct. 4, 2017, 5:18 p.m., Nate Cole wrote: > > ambari-common/src/main/python/resource_management/core/providers/package/apt.py > > Lines 351 (patched) > > <https://reviews.apache.org/r/62764/diff/1/?file=1845760#file1845760line351> > > > > This % syntax is old, we typically use string.format() This line is old code, just moved around a bit. - Attila ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/62764/#review187101 ----------------------------------------------------------- On Oct. 4, 2017, 4:32 p.m., Attila Doroszlai wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/62764/ > ----------------------------------------------------------- > > (Updated Oct. 4, 2017, 4:32 p.m.) > > > Review request for Ambari, Andrew Onischuk, Dmitro Lisnichenko, Jonathan > Hurley, Nate Cole, and Sebastian Toader. > > > Bugs: AMBARI-22127 > https://issues.apache.org/jira/browse/AMBARI-22127 > > > Repository: ambari > > > Description > ------- > > Need to pass both repo IDs and repo file names via `use_repos`, because > Debian/Ubuntu selects specific repos by file name, while RedHat/SuSE by repo > ID. > > > Diffs > ----- > > ambari-agent/src/test/python/resource_management/TestPackageResource.py > 49e3adf6782021977ff3edce850da35e3adc7116 > > ambari-common/src/main/python/resource_management/core/providers/package/__init__.py > 94047571b5113716ee041e890fea559b4ce263ee > > ambari-common/src/main/python/resource_management/core/providers/package/apt.py > f6a5538a30cf86eb4125ff088a1a8ca24c5adece > > ambari-common/src/main/python/resource_management/core/providers/package/choco.py > db552964279f509de90d2fde884bfc0fea12f7b0 > > ambari-common/src/main/python/resource_management/core/providers/package/yumrpm.py > a4a55da7c9c5e9ac554d91edd19e9cb668615671 > > ambari-common/src/main/python/resource_management/core/providers/package/zypper.py > 5b8e5ab94091bf181e97defd6a13dea4e3a46863 > > ambari-common/src/main/python/resource_management/core/resources/packaging.py > e3adc30f46abd3f33670f817421d88270b3e7ade > > ambari-common/src/main/python/resource_management/libraries/functions/repository_util.py > f1074ee7b3748cfedb3e1a813be52df894cff97f > ambari-server/src/main/resources/custom_actions/scripts/install_packages.py > dcf354447756d2e1c826feb8515cfe3b9711f19d > ambari-server/src/test/python/custom_actions/TestInstallPackages.py > 0f303bee541ea3ac06fadb67eb44f5aab97fa1d5 > > > Diff: https://reviews.apache.org/r/62764/diff/1/ > > > Testing > ------- > > Tested package installation (both pre-upgrade "Install Version" and regular > "Add Service") on Debian 7.6 and CentOS 6.4. > > Unit tests pass (both branch-2.6 and trunk): > > ``` > $ mvn -am -pl ambari-agent,ambari-server -DskipSurefireTests test > ... > Total run:1192 > Total errors:0 > Total failures:0 > OK > ... > Ran 453 tests in 137.865s > > OK > ... > [INFO] Ambari Server ...................................... SUCCESS [01:28 > min] > [INFO] Ambari Agent ....................................... SUCCESS [02:21 > min] > ``` > > > Thanks, > > Attila Doroszlai > >
