You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@aurora.apache.org by Zameer Manji <zm...@apache.org> on 2015/04/07 00:58:47 UTC

Review Request 32905: Remove factory.py

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/32905/
-----------------------------------------------------------

Review request for Aurora and Bill Farner.


Repository: aurora


Description
-------

This patch removes `src/main/python/apache/aurora/client/factory.py` which was a pile of technical debt. By removing the indirection of creating client object the code is much easier to understand. As a result of removing this file many tests had to be touched because they were patching CLUSTERS via factory.py. The need to patch CLUSTERS at each test site was removed and replaced by modifying `AuroraClientCommandTest` to patch CLUSTERS before running any test. This approach is required because `FakeAuroraCommandContext` inherits from `AuroraCommandContext` which causes the execute on import code in clusters.py to execute for each test.


Diffs
-----

  src/main/python/apache/aurora/admin/BUILD 7a100d1a4a74aae034082f34db051c9cc31f8540 
  src/main/python/apache/aurora/admin/admin.py d9ed66c490d7d8351fd1b37b83ae82830a304b0b 
  src/main/python/apache/aurora/client/BUILD bf196bf86b36db0d72f8e096260c9a900f74d07c 
  src/main/python/apache/aurora/client/cli/BUILD ebe681a0d1735b7cc695dc3b7a14c4292d87ae32 
  src/main/python/apache/aurora/client/cli/context.py 51c7d24dca664e476e62f1864d095416dfab70e4 
  src/main/python/apache/aurora/client/factory.py 4b31e8503938a3f2af2c2d2a9a7c812cd489fa65 
  src/test/python/apache/aurora/client/BUILD 831a72d39b27ca2aca466a389140000bbf40ff94 
  src/test/python/apache/aurora/client/cli/BUILD e1f9ebf96774b8f5c75de8570c6ba87d953ab649 
  src/test/python/apache/aurora/client/cli/test_api_from_cli.py 78f21d2f20cf71fa2dfe0614885d44d2948decd2 
  src/test/python/apache/aurora/client/cli/test_cancel_update.py c15e142930c9474c7873dd931261b6ab4eb5967f 
  src/test/python/apache/aurora/client/cli/test_context.py PRE-CREATION 
  src/test/python/apache/aurora/client/cli/test_diff.py 38629b63c082cf81cb891dace2a70d9e8f418e18 
  src/test/python/apache/aurora/client/cli/test_kill.py e3a366bf67074e50787394cad58d5e01359b641e 
  src/test/python/apache/aurora/client/cli/test_quota.py 88fb9aec4d1eae6ad05da01752a670f902bafb1b 
  src/test/python/apache/aurora/client/cli/test_restart.py 92aefe612dd59df75188fd7fc8cf080c9a878dde 
  src/test/python/apache/aurora/client/cli/test_sla.py a1a3d8161ba747aa23a5e614e9ae31473d2058c1 
  src/test/python/apache/aurora/client/cli/test_status.py 721d9764190bdc4b1c5b65e416a039803b7c507c 
  src/test/python/apache/aurora/client/cli/test_task.py 2580664ec913003e518b44a0278b8951b69e0504 
  src/test/python/apache/aurora/client/cli/test_update.py 8b7d11202b35deb09a0000248cfe0a96458fb70c 
  src/test/python/apache/aurora/client/cli/util.py 95a2123e127c9811fd2305e71cfc5c7c4376f904 
  src/test/python/apache/aurora/client/test_factory.py PRE-CREATION 
  src/test/python/apache/aurora/client/util.py PRE-CREATION 

Diff: https://reviews.apache.org/r/32905/diff/


Testing
-------

./pants test.pytest src/test/python/apache/aurora/client/cli::


Thanks,

Zameer Manji


Re: Review Request 32905: Remove factory.py

Posted by Aurora ReviewBot <wf...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/32905/#review79076
-----------------------------------------------------------


Master (5587bce) is red with this patch.
  ./build-support/jenkins/build.sh

                                 original = getattr(target, name, DEFAULT)
                             else:
                                 local = True
                         
                             if not self.create and original is DEFAULT:
                                 raise AttributeError(
                     >               "%s does not have the attribute %r" % (target, name)
                                 )
                     E           AttributeError: <module 'apache.aurora.admin.admin' from '/tmp/user/20000/tmphB0hBL/apache/aurora/admin/admin.py'> does not have the attribute 'make_client'
                     
                     /tmp/user/20000/tmphB0hBL/.deps/mock-1.0.1-py2-none-any.whl/mock.py:1242: AttributeError
                      generated xml file: /home/jenkins/jenkins-slave/workspace/AuroraBot/dist/test-results/src.test.python.apache.aurora.admin.admin.xml 
                     ====== 9 failed, 14 passed in 1.35 seconds =======
                     src.test.python.apache.aurora.admin.admin                                       .....   FAILURE
                     src.test.python.apache.aurora.client.api.updater                                .....   SUCCESS
                     src.test.python.apache.aurora.client.cli.config                                 .....   SUCCESS
                     src.test.python.apache.aurora.client.cli.cron                                   .....   SUCCESS
                     src.test.python.apache.aurora.client.cli.sla                                    .....   SUCCESS
                     src.test.python.apache.aurora.client.hooks.non_hooked_api                       .....   SUCCESS
                     src.test.python.apache.aurora.common.test_aurora_job_key                        .....   SUCCESS
                     src.test.python.apache.aurora.common.test_cluster                               .....   SUCCESS
                     src.test.python.apache.aurora.common.test_cluster_option                        .....   SUCCESS
                     src.test.python.apache.aurora.common.test_clusters                              .....   SUCCESS
                     src.test.python.apache.aurora.common.test_http_signaler                         .....   SUCCESS
                     src.test.python.apache.aurora.common.test_pex_version                           .....   SUCCESS
                     src.test.python.apache.aurora.common.test_shellify                              .....   SUCCESS
                     src.test.python.apache.aurora.common.test_transport                             .....   SUCCESS
                     src.test.python.apache.aurora.executor.common.path_detector                     .....   SUCCESS
                     src.test.python.apache.aurora.executor.common.task_info                         .....   SUCCESS
                     src.test.python.apache.thermos.cli.commands.commands                            .....   SUCCESS
                     src.test.python.apache.thermos.cli.common                                       .....   SUCCESS
                     src.test.python.apache.thermos.cli.main                                         .....   SUCCESS
                     src.test.python.apache.thermos.common.test_pathspec                             .....   SUCCESS
                     src.test.python.apache.thermos.core.test_runner_integration                     .....   SUCCESS
                     src.test.python.apache.thermos.monitoring.test_disk                             .....   SUCCESS
                     
FAILURE


               FAILURE


I will refresh this build result if you post a review containing "@ReviewBot retry"

- Aurora ReviewBot


On April 6, 2015, 10:58 p.m., Zameer Manji wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/32905/
> -----------------------------------------------------------
> 
> (Updated April 6, 2015, 10:58 p.m.)
> 
> 
> Review request for Aurora and Bill Farner.
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> This patch removes `src/main/python/apache/aurora/client/factory.py` which was a pile of technical debt. By removing the indirection of creating client object the code is much easier to understand. As a result of removing this file many tests had to be touched because they were patching CLUSTERS via factory.py. The need to patch CLUSTERS at each test site was removed and replaced by modifying `AuroraClientCommandTest` to patch CLUSTERS before running any test. This approach is required because `FakeAuroraCommandContext` inherits from `AuroraCommandContext` which causes the execute on import code in clusters.py to execute for each test.
> 
> 
> Diffs
> -----
> 
>   src/main/python/apache/aurora/admin/BUILD 7a100d1a4a74aae034082f34db051c9cc31f8540 
>   src/main/python/apache/aurora/admin/admin.py d9ed66c490d7d8351fd1b37b83ae82830a304b0b 
>   src/main/python/apache/aurora/client/BUILD bf196bf86b36db0d72f8e096260c9a900f74d07c 
>   src/main/python/apache/aurora/client/cli/BUILD ebe681a0d1735b7cc695dc3b7a14c4292d87ae32 
>   src/main/python/apache/aurora/client/cli/context.py 51c7d24dca664e476e62f1864d095416dfab70e4 
>   src/main/python/apache/aurora/client/factory.py 4b31e8503938a3f2af2c2d2a9a7c812cd489fa65 
>   src/test/python/apache/aurora/client/BUILD 831a72d39b27ca2aca466a389140000bbf40ff94 
>   src/test/python/apache/aurora/client/cli/BUILD e1f9ebf96774b8f5c75de8570c6ba87d953ab649 
>   src/test/python/apache/aurora/client/cli/test_api_from_cli.py 78f21d2f20cf71fa2dfe0614885d44d2948decd2 
>   src/test/python/apache/aurora/client/cli/test_cancel_update.py c15e142930c9474c7873dd931261b6ab4eb5967f 
>   src/test/python/apache/aurora/client/cli/test_context.py PRE-CREATION 
>   src/test/python/apache/aurora/client/cli/test_diff.py 38629b63c082cf81cb891dace2a70d9e8f418e18 
>   src/test/python/apache/aurora/client/cli/test_kill.py e3a366bf67074e50787394cad58d5e01359b641e 
>   src/test/python/apache/aurora/client/cli/test_quota.py 88fb9aec4d1eae6ad05da01752a670f902bafb1b 
>   src/test/python/apache/aurora/client/cli/test_restart.py 92aefe612dd59df75188fd7fc8cf080c9a878dde 
>   src/test/python/apache/aurora/client/cli/test_sla.py a1a3d8161ba747aa23a5e614e9ae31473d2058c1 
>   src/test/python/apache/aurora/client/cli/test_status.py 721d9764190bdc4b1c5b65e416a039803b7c507c 
>   src/test/python/apache/aurora/client/cli/test_task.py 2580664ec913003e518b44a0278b8951b69e0504 
>   src/test/python/apache/aurora/client/cli/test_update.py 8b7d11202b35deb09a0000248cfe0a96458fb70c 
>   src/test/python/apache/aurora/client/cli/util.py 95a2123e127c9811fd2305e71cfc5c7c4376f904 
>   src/test/python/apache/aurora/client/test_factory.py PRE-CREATION 
>   src/test/python/apache/aurora/client/util.py PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/32905/diff/
> 
> 
> Testing
> -------
> 
> ./pants test.pytest src/test/python/apache/aurora/client/cli::
> 
> 
> Thanks,
> 
> Zameer Manji
> 
>


Re: Review Request 32905: Remove factory.py

Posted by Zameer Manji <zm...@apache.org>.

> On April 8, 2015, 7:41 p.m., Bill Farner wrote:
> > src/test/python/apache/aurora/client/cli/test_api_from_cli.py, line 74
> > <https://reviews.apache.org/r/32905/diff/2/?file=918522#file918522line74>
> >
> >     +4 indent.  here and elsewhere

Spoke with Bill offline and he agreed to drop this because tweaking the indentation here is weird.


> On April 8, 2015, 7:41 p.m., Bill Farner wrote:
> > src/main/python/apache/aurora/admin/admin.py, line 69
> > <https://reviews.apache.org/r/32905/diff/2/?file=918514#file918514line69>
> >
> >     Consider including the list of known clusters in this message (`CLUSTERS.keys()`)

Done.


> On April 8, 2015, 7:41 p.m., Bill Farner wrote:
> > src/test/python/apache/aurora/client/cli/test_context.py, lines 23-25
> > <https://reviews.apache.org/r/32905/diff/2/?file=918524#file918524line23>
> >
> >     Make this a one-liner

Done.


- Zameer


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/32905/#review79469
-----------------------------------------------------------


On April 9, 2015, 3:57 p.m., Zameer Manji wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/32905/
> -----------------------------------------------------------
> 
> (Updated April 9, 2015, 3:57 p.m.)
> 
> 
> Review request for Aurora and Bill Farner.
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> This patch removes `src/main/python/apache/aurora/client/factory.py` which was a pile of technical debt. By removing the indirection of creating client object the code is much easier to understand. As a result of removing this file many tests had to be touched because they were patching CLUSTERS via factory.py. The need to patch CLUSTERS at each test site was removed and replaced by modifying `AuroraClientCommandTest` to patch CLUSTERS before running any test. This approach is required because `FakeAuroraCommandContext` inherits from `AuroraCommandContext` which causes the execute on import code in clusters.py to execute for each test.
> 
> 
> Diffs
> -----
> 
>   src/main/python/apache/aurora/admin/BUILD 84305f92a34564e9e8abec9250addb85141bde67 
>   src/main/python/apache/aurora/admin/admin.py d9ed66c490d7d8351fd1b37b83ae82830a304b0b 
>   src/main/python/apache/aurora/client/BUILD 351fc55a23ad23026194c9e0f0451abb525a1313 
>   src/main/python/apache/aurora/client/cli/BUILD c6b4e8a09d1315cf5defee2155a6e0c697892a30 
>   src/main/python/apache/aurora/client/cli/context.py 3d4a428bb0bf408c7d90a9e310feb2a97bfca056 
>   src/main/python/apache/aurora/client/factory.py f3ae66b33daec79b971717d11d3463e7a95f9790 
>   src/test/python/apache/aurora/admin/test_admin_sla.py 225251baf54f4f181855014ae501d3d91a59a1ad 
>   src/test/python/apache/aurora/client/BUILD fb706bd4d35e614b27e54b783f365c2704be4564 
>   src/test/python/apache/aurora/client/cli/BUILD c75568990915747174f22914754ecfef2743c218 
>   src/test/python/apache/aurora/client/cli/test_api_from_cli.py ba59957f8412db9270d826937ec02eccf762000a 
>   src/test/python/apache/aurora/client/cli/test_cancel_update.py b0eef0eb2c0e9c1ab6c081fa89608b99a921cf06 
>   src/test/python/apache/aurora/client/cli/test_context.py da3c003bd9b49d193c7e31cc6612cc5909544abe 
>   src/test/python/apache/aurora/client/cli/test_diff.py c8b27a4c92a7a59f9650c3bf9e7b0ec64cd41aa7 
>   src/test/python/apache/aurora/client/cli/test_kill.py 7d258600a31d79b4cac918aa6c83fbaf0d1833cc 
>   src/test/python/apache/aurora/client/cli/test_quota.py b97e5c470a6b8b841cd9dac3d03401f6d84c3d4b 
>   src/test/python/apache/aurora/client/cli/test_restart.py 488c6c996c590177aef397efe52f41c9b1c5d283 
>   src/test/python/apache/aurora/client/cli/test_sla.py 3d6d99cab1b2662008ab2d2bd16a8c787ace4757 
>   src/test/python/apache/aurora/client/cli/test_status.py cf69de88e449b3dea14dd079444ec42278b75f40 
>   src/test/python/apache/aurora/client/cli/test_task.py 2580664ec913003e518b44a0278b8951b69e0504 
>   src/test/python/apache/aurora/client/cli/test_update.py 03c286f37f0d5c44929340ee4b2ac8b1ea79da6e 
>   src/test/python/apache/aurora/client/cli/util.py f856fcca3a96f9971f0444db9b422cec2c584315 
>   src/test/python/apache/aurora/client/test_factory.py 55985673acd4f989634cea62d7396f28b17f21a6 
>   src/test/python/apache/aurora/client/util.py 059869791af837dd71571bb6420237a7091cf001 
> 
> Diff: https://reviews.apache.org/r/32905/diff/
> 
> 
> Testing
> -------
> 
> ./pants test.pytest src/test/python/apache/aurora/client/cli::
> 
> 
> Thanks,
> 
> Zameer Manji
> 
>


Re: Review Request 32905: Remove factory.py

Posted by Bill Farner <wf...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/32905/#review79469
-----------------------------------------------------------

Ship it!


Well done!


src/main/python/apache/aurora/admin/admin.py
<https://reviews.apache.org/r/32905/#comment128866>

    Consider including the list of known clusters in this message (`CLUSTERS.keys()`)



src/test/python/apache/aurora/client/cli/test_api_from_cli.py
<https://reviews.apache.org/r/32905/#comment128867>

    +4 indent.  here and elsewhere



src/test/python/apache/aurora/client/cli/test_context.py
<https://reviews.apache.org/r/32905/#comment128868>

    Make this a one-liner


- Bill Farner


On April 7, 2015, 12:05 a.m., Zameer Manji wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/32905/
> -----------------------------------------------------------
> 
> (Updated April 7, 2015, 12:05 a.m.)
> 
> 
> Review request for Aurora and Bill Farner.
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> This patch removes `src/main/python/apache/aurora/client/factory.py` which was a pile of technical debt. By removing the indirection of creating client object the code is much easier to understand. As a result of removing this file many tests had to be touched because they were patching CLUSTERS via factory.py. The need to patch CLUSTERS at each test site was removed and replaced by modifying `AuroraClientCommandTest` to patch CLUSTERS before running any test. This approach is required because `FakeAuroraCommandContext` inherits from `AuroraCommandContext` which causes the execute on import code in clusters.py to execute for each test.
> 
> 
> Diffs
> -----
> 
>   src/main/python/apache/aurora/admin/BUILD 7a100d1a4a74aae034082f34db051c9cc31f8540 
>   src/main/python/apache/aurora/admin/admin.py d9ed66c490d7d8351fd1b37b83ae82830a304b0b 
>   src/main/python/apache/aurora/client/BUILD bf196bf86b36db0d72f8e096260c9a900f74d07c 
>   src/main/python/apache/aurora/client/cli/BUILD ebe681a0d1735b7cc695dc3b7a14c4292d87ae32 
>   src/main/python/apache/aurora/client/cli/context.py 51c7d24dca664e476e62f1864d095416dfab70e4 
>   src/main/python/apache/aurora/client/factory.py 4b31e8503938a3f2af2c2d2a9a7c812cd489fa65 
>   src/test/python/apache/aurora/admin/test_admin_sla.py 225251baf54f4f181855014ae501d3d91a59a1ad 
>   src/test/python/apache/aurora/client/BUILD 831a72d39b27ca2aca466a389140000bbf40ff94 
>   src/test/python/apache/aurora/client/cli/BUILD e1f9ebf96774b8f5c75de8570c6ba87d953ab649 
>   src/test/python/apache/aurora/client/cli/test_api_from_cli.py 78f21d2f20cf71fa2dfe0614885d44d2948decd2 
>   src/test/python/apache/aurora/client/cli/test_cancel_update.py c15e142930c9474c7873dd931261b6ab4eb5967f 
>   src/test/python/apache/aurora/client/cli/test_context.py PRE-CREATION 
>   src/test/python/apache/aurora/client/cli/test_diff.py 38629b63c082cf81cb891dace2a70d9e8f418e18 
>   src/test/python/apache/aurora/client/cli/test_kill.py e3a366bf67074e50787394cad58d5e01359b641e 
>   src/test/python/apache/aurora/client/cli/test_quota.py 88fb9aec4d1eae6ad05da01752a670f902bafb1b 
>   src/test/python/apache/aurora/client/cli/test_restart.py 92aefe612dd59df75188fd7fc8cf080c9a878dde 
>   src/test/python/apache/aurora/client/cli/test_sla.py a1a3d8161ba747aa23a5e614e9ae31473d2058c1 
>   src/test/python/apache/aurora/client/cli/test_status.py 721d9764190bdc4b1c5b65e416a039803b7c507c 
>   src/test/python/apache/aurora/client/cli/test_task.py 2580664ec913003e518b44a0278b8951b69e0504 
>   src/test/python/apache/aurora/client/cli/test_update.py 8b7d11202b35deb09a0000248cfe0a96458fb70c 
>   src/test/python/apache/aurora/client/cli/util.py 95a2123e127c9811fd2305e71cfc5c7c4376f904 
>   src/test/python/apache/aurora/client/test_factory.py PRE-CREATION 
>   src/test/python/apache/aurora/client/util.py PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/32905/diff/
> 
> 
> Testing
> -------
> 
> ./pants test.pytest src/test/python/apache/aurora/client/cli::
> 
> 
> Thanks,
> 
> Zameer Manji
> 
>


Re: Review Request 32905: Remove factory.py

Posted by Aurora ReviewBot <wf...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/32905/#review79091
-----------------------------------------------------------

Ship it!


Master (6fc7f58) is green with this patch.
  ./build-support/jenkins/build.sh

I will refresh this build result if you post a review containing "@ReviewBot retry"

- Aurora ReviewBot


On April 7, 2015, 12:05 a.m., Zameer Manji wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/32905/
> -----------------------------------------------------------
> 
> (Updated April 7, 2015, 12:05 a.m.)
> 
> 
> Review request for Aurora and Bill Farner.
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> This patch removes `src/main/python/apache/aurora/client/factory.py` which was a pile of technical debt. By removing the indirection of creating client object the code is much easier to understand. As a result of removing this file many tests had to be touched because they were patching CLUSTERS via factory.py. The need to patch CLUSTERS at each test site was removed and replaced by modifying `AuroraClientCommandTest` to patch CLUSTERS before running any test. This approach is required because `FakeAuroraCommandContext` inherits from `AuroraCommandContext` which causes the execute on import code in clusters.py to execute for each test.
> 
> 
> Diffs
> -----
> 
>   src/main/python/apache/aurora/admin/BUILD 7a100d1a4a74aae034082f34db051c9cc31f8540 
>   src/main/python/apache/aurora/admin/admin.py d9ed66c490d7d8351fd1b37b83ae82830a304b0b 
>   src/main/python/apache/aurora/client/BUILD bf196bf86b36db0d72f8e096260c9a900f74d07c 
>   src/main/python/apache/aurora/client/cli/BUILD ebe681a0d1735b7cc695dc3b7a14c4292d87ae32 
>   src/main/python/apache/aurora/client/cli/context.py 51c7d24dca664e476e62f1864d095416dfab70e4 
>   src/main/python/apache/aurora/client/factory.py 4b31e8503938a3f2af2c2d2a9a7c812cd489fa65 
>   src/test/python/apache/aurora/admin/test_admin_sla.py 225251baf54f4f181855014ae501d3d91a59a1ad 
>   src/test/python/apache/aurora/client/BUILD 831a72d39b27ca2aca466a389140000bbf40ff94 
>   src/test/python/apache/aurora/client/cli/BUILD e1f9ebf96774b8f5c75de8570c6ba87d953ab649 
>   src/test/python/apache/aurora/client/cli/test_api_from_cli.py 78f21d2f20cf71fa2dfe0614885d44d2948decd2 
>   src/test/python/apache/aurora/client/cli/test_cancel_update.py c15e142930c9474c7873dd931261b6ab4eb5967f 
>   src/test/python/apache/aurora/client/cli/test_context.py PRE-CREATION 
>   src/test/python/apache/aurora/client/cli/test_diff.py 38629b63c082cf81cb891dace2a70d9e8f418e18 
>   src/test/python/apache/aurora/client/cli/test_kill.py e3a366bf67074e50787394cad58d5e01359b641e 
>   src/test/python/apache/aurora/client/cli/test_quota.py 88fb9aec4d1eae6ad05da01752a670f902bafb1b 
>   src/test/python/apache/aurora/client/cli/test_restart.py 92aefe612dd59df75188fd7fc8cf080c9a878dde 
>   src/test/python/apache/aurora/client/cli/test_sla.py a1a3d8161ba747aa23a5e614e9ae31473d2058c1 
>   src/test/python/apache/aurora/client/cli/test_status.py 721d9764190bdc4b1c5b65e416a039803b7c507c 
>   src/test/python/apache/aurora/client/cli/test_task.py 2580664ec913003e518b44a0278b8951b69e0504 
>   src/test/python/apache/aurora/client/cli/test_update.py 8b7d11202b35deb09a0000248cfe0a96458fb70c 
>   src/test/python/apache/aurora/client/cli/util.py 95a2123e127c9811fd2305e71cfc5c7c4376f904 
>   src/test/python/apache/aurora/client/test_factory.py PRE-CREATION 
>   src/test/python/apache/aurora/client/util.py PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/32905/diff/
> 
> 
> Testing
> -------
> 
> ./pants test.pytest src/test/python/apache/aurora/client/cli::
> 
> 
> Thanks,
> 
> Zameer Manji
> 
>


Re: Review Request 32905: Remove factory.py

Posted by Aurora ReviewBot <wf...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/32905/#review79593
-----------------------------------------------------------

Ship it!


Master (f48d0e1) is green with this patch.
  ./build-support/jenkins/build.sh

I will refresh this build result if you post a review containing "@ReviewBot retry"

- Aurora ReviewBot


On April 9, 2015, 10:57 p.m., Zameer Manji wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/32905/
> -----------------------------------------------------------
> 
> (Updated April 9, 2015, 10:57 p.m.)
> 
> 
> Review request for Aurora and Bill Farner.
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> This patch removes `src/main/python/apache/aurora/client/factory.py` which was a pile of technical debt. By removing the indirection of creating client object the code is much easier to understand. As a result of removing this file many tests had to be touched because they were patching CLUSTERS via factory.py. The need to patch CLUSTERS at each test site was removed and replaced by modifying `AuroraClientCommandTest` to patch CLUSTERS before running any test. This approach is required because `FakeAuroraCommandContext` inherits from `AuroraCommandContext` which causes the execute on import code in clusters.py to execute for each test.
> 
> 
> Diffs
> -----
> 
>   src/main/python/apache/aurora/admin/BUILD 84305f92a34564e9e8abec9250addb85141bde67 
>   src/main/python/apache/aurora/admin/admin.py d9ed66c490d7d8351fd1b37b83ae82830a304b0b 
>   src/main/python/apache/aurora/client/BUILD 351fc55a23ad23026194c9e0f0451abb525a1313 
>   src/main/python/apache/aurora/client/cli/BUILD c6b4e8a09d1315cf5defee2155a6e0c697892a30 
>   src/main/python/apache/aurora/client/cli/context.py 3d4a428bb0bf408c7d90a9e310feb2a97bfca056 
>   src/main/python/apache/aurora/client/factory.py f3ae66b33daec79b971717d11d3463e7a95f9790 
>   src/test/python/apache/aurora/admin/test_admin_sla.py 225251baf54f4f181855014ae501d3d91a59a1ad 
>   src/test/python/apache/aurora/client/BUILD fb706bd4d35e614b27e54b783f365c2704be4564 
>   src/test/python/apache/aurora/client/cli/BUILD c75568990915747174f22914754ecfef2743c218 
>   src/test/python/apache/aurora/client/cli/test_api_from_cli.py ba59957f8412db9270d826937ec02eccf762000a 
>   src/test/python/apache/aurora/client/cli/test_cancel_update.py b0eef0eb2c0e9c1ab6c081fa89608b99a921cf06 
>   src/test/python/apache/aurora/client/cli/test_context.py da3c003bd9b49d193c7e31cc6612cc5909544abe 
>   src/test/python/apache/aurora/client/cli/test_diff.py c8b27a4c92a7a59f9650c3bf9e7b0ec64cd41aa7 
>   src/test/python/apache/aurora/client/cli/test_kill.py 7d258600a31d79b4cac918aa6c83fbaf0d1833cc 
>   src/test/python/apache/aurora/client/cli/test_quota.py b97e5c470a6b8b841cd9dac3d03401f6d84c3d4b 
>   src/test/python/apache/aurora/client/cli/test_restart.py 488c6c996c590177aef397efe52f41c9b1c5d283 
>   src/test/python/apache/aurora/client/cli/test_sla.py 3d6d99cab1b2662008ab2d2bd16a8c787ace4757 
>   src/test/python/apache/aurora/client/cli/test_status.py cf69de88e449b3dea14dd079444ec42278b75f40 
>   src/test/python/apache/aurora/client/cli/test_task.py 2580664ec913003e518b44a0278b8951b69e0504 
>   src/test/python/apache/aurora/client/cli/test_update.py 03c286f37f0d5c44929340ee4b2ac8b1ea79da6e 
>   src/test/python/apache/aurora/client/cli/util.py f856fcca3a96f9971f0444db9b422cec2c584315 
>   src/test/python/apache/aurora/client/test_factory.py 55985673acd4f989634cea62d7396f28b17f21a6 
>   src/test/python/apache/aurora/client/util.py 059869791af837dd71571bb6420237a7091cf001 
> 
> Diff: https://reviews.apache.org/r/32905/diff/
> 
> 
> Testing
> -------
> 
> ./pants test.pytest src/test/python/apache/aurora/client/cli::
> 
> 
> Thanks,
> 
> Zameer Manji
> 
>


Re: Review Request 32905: Remove factory.py

Posted by Zameer Manji <zm...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/32905/
-----------------------------------------------------------

(Updated April 9, 2015, 3:57 p.m.)


Review request for Aurora and Bill Farner.


Changes
-------

Bill's feedback.


Repository: aurora


Description
-------

This patch removes `src/main/python/apache/aurora/client/factory.py` which was a pile of technical debt. By removing the indirection of creating client object the code is much easier to understand. As a result of removing this file many tests had to be touched because they were patching CLUSTERS via factory.py. The need to patch CLUSTERS at each test site was removed and replaced by modifying `AuroraClientCommandTest` to patch CLUSTERS before running any test. This approach is required because `FakeAuroraCommandContext` inherits from `AuroraCommandContext` which causes the execute on import code in clusters.py to execute for each test.


Diffs (updated)
-----

  src/main/python/apache/aurora/admin/BUILD 84305f92a34564e9e8abec9250addb85141bde67 
  src/main/python/apache/aurora/admin/admin.py d9ed66c490d7d8351fd1b37b83ae82830a304b0b 
  src/main/python/apache/aurora/client/BUILD 351fc55a23ad23026194c9e0f0451abb525a1313 
  src/main/python/apache/aurora/client/cli/BUILD c6b4e8a09d1315cf5defee2155a6e0c697892a30 
  src/main/python/apache/aurora/client/cli/context.py 3d4a428bb0bf408c7d90a9e310feb2a97bfca056 
  src/main/python/apache/aurora/client/factory.py f3ae66b33daec79b971717d11d3463e7a95f9790 
  src/test/python/apache/aurora/admin/test_admin_sla.py 225251baf54f4f181855014ae501d3d91a59a1ad 
  src/test/python/apache/aurora/client/BUILD fb706bd4d35e614b27e54b783f365c2704be4564 
  src/test/python/apache/aurora/client/cli/BUILD c75568990915747174f22914754ecfef2743c218 
  src/test/python/apache/aurora/client/cli/test_api_from_cli.py ba59957f8412db9270d826937ec02eccf762000a 
  src/test/python/apache/aurora/client/cli/test_cancel_update.py b0eef0eb2c0e9c1ab6c081fa89608b99a921cf06 
  src/test/python/apache/aurora/client/cli/test_context.py da3c003bd9b49d193c7e31cc6612cc5909544abe 
  src/test/python/apache/aurora/client/cli/test_diff.py c8b27a4c92a7a59f9650c3bf9e7b0ec64cd41aa7 
  src/test/python/apache/aurora/client/cli/test_kill.py 7d258600a31d79b4cac918aa6c83fbaf0d1833cc 
  src/test/python/apache/aurora/client/cli/test_quota.py b97e5c470a6b8b841cd9dac3d03401f6d84c3d4b 
  src/test/python/apache/aurora/client/cli/test_restart.py 488c6c996c590177aef397efe52f41c9b1c5d283 
  src/test/python/apache/aurora/client/cli/test_sla.py 3d6d99cab1b2662008ab2d2bd16a8c787ace4757 
  src/test/python/apache/aurora/client/cli/test_status.py cf69de88e449b3dea14dd079444ec42278b75f40 
  src/test/python/apache/aurora/client/cli/test_task.py 2580664ec913003e518b44a0278b8951b69e0504 
  src/test/python/apache/aurora/client/cli/test_update.py 03c286f37f0d5c44929340ee4b2ac8b1ea79da6e 
  src/test/python/apache/aurora/client/cli/util.py f856fcca3a96f9971f0444db9b422cec2c584315 
  src/test/python/apache/aurora/client/test_factory.py 55985673acd4f989634cea62d7396f28b17f21a6 
  src/test/python/apache/aurora/client/util.py 059869791af837dd71571bb6420237a7091cf001 

Diff: https://reviews.apache.org/r/32905/diff/


Testing
-------

./pants test.pytest src/test/python/apache/aurora/client/cli::


Thanks,

Zameer Manji


Re: Review Request 32905: Remove factory.py

Posted by Zameer Manji <zm...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/32905/
-----------------------------------------------------------

(Updated April 6, 2015, 5:05 p.m.)


Review request for Aurora and Bill Farner.


Changes
-------

Fix broken admin tests.


Repository: aurora


Description
-------

This patch removes `src/main/python/apache/aurora/client/factory.py` which was a pile of technical debt. By removing the indirection of creating client object the code is much easier to understand. As a result of removing this file many tests had to be touched because they were patching CLUSTERS via factory.py. The need to patch CLUSTERS at each test site was removed and replaced by modifying `AuroraClientCommandTest` to patch CLUSTERS before running any test. This approach is required because `FakeAuroraCommandContext` inherits from `AuroraCommandContext` which causes the execute on import code in clusters.py to execute for each test.


Diffs (updated)
-----

  src/main/python/apache/aurora/admin/BUILD 7a100d1a4a74aae034082f34db051c9cc31f8540 
  src/main/python/apache/aurora/admin/admin.py d9ed66c490d7d8351fd1b37b83ae82830a304b0b 
  src/main/python/apache/aurora/client/BUILD bf196bf86b36db0d72f8e096260c9a900f74d07c 
  src/main/python/apache/aurora/client/cli/BUILD ebe681a0d1735b7cc695dc3b7a14c4292d87ae32 
  src/main/python/apache/aurora/client/cli/context.py 51c7d24dca664e476e62f1864d095416dfab70e4 
  src/main/python/apache/aurora/client/factory.py 4b31e8503938a3f2af2c2d2a9a7c812cd489fa65 
  src/test/python/apache/aurora/admin/test_admin_sla.py 225251baf54f4f181855014ae501d3d91a59a1ad 
  src/test/python/apache/aurora/client/BUILD 831a72d39b27ca2aca466a389140000bbf40ff94 
  src/test/python/apache/aurora/client/cli/BUILD e1f9ebf96774b8f5c75de8570c6ba87d953ab649 
  src/test/python/apache/aurora/client/cli/test_api_from_cli.py 78f21d2f20cf71fa2dfe0614885d44d2948decd2 
  src/test/python/apache/aurora/client/cli/test_cancel_update.py c15e142930c9474c7873dd931261b6ab4eb5967f 
  src/test/python/apache/aurora/client/cli/test_context.py PRE-CREATION 
  src/test/python/apache/aurora/client/cli/test_diff.py 38629b63c082cf81cb891dace2a70d9e8f418e18 
  src/test/python/apache/aurora/client/cli/test_kill.py e3a366bf67074e50787394cad58d5e01359b641e 
  src/test/python/apache/aurora/client/cli/test_quota.py 88fb9aec4d1eae6ad05da01752a670f902bafb1b 
  src/test/python/apache/aurora/client/cli/test_restart.py 92aefe612dd59df75188fd7fc8cf080c9a878dde 
  src/test/python/apache/aurora/client/cli/test_sla.py a1a3d8161ba747aa23a5e614e9ae31473d2058c1 
  src/test/python/apache/aurora/client/cli/test_status.py 721d9764190bdc4b1c5b65e416a039803b7c507c 
  src/test/python/apache/aurora/client/cli/test_task.py 2580664ec913003e518b44a0278b8951b69e0504 
  src/test/python/apache/aurora/client/cli/test_update.py 8b7d11202b35deb09a0000248cfe0a96458fb70c 
  src/test/python/apache/aurora/client/cli/util.py 95a2123e127c9811fd2305e71cfc5c7c4376f904 
  src/test/python/apache/aurora/client/test_factory.py PRE-CREATION 
  src/test/python/apache/aurora/client/util.py PRE-CREATION 

Diff: https://reviews.apache.org/r/32905/diff/


Testing
-------

./pants test.pytest src/test/python/apache/aurora/client/cli::


Thanks,

Zameer Manji