Re: Review Request 32377: Add a mechanism to lazily instantiate module classes.
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/32377/#review77449 --- Ship it! Master (3bb1372) 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 March 23, 2015, 6:51 p.m., Bill Farner wrote: --- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/32377/ --- (Updated March 23, 2015, 6:51 p.m.) Review request for Aurora and Kevin Sweeney. Bugs: AURORA-1217 https://issues.apache.org/jira/browse/AURORA-1217 Repository: aurora Description --- Add an indirection for modules that must not be statically instantiated. Diffs - src/main/java/org/apache/aurora/scheduler/app/Modules.java e95cb2a255e6986e0678a4085036deb24f9cb359 src/main/java/org/apache/aurora/scheduler/http/api/security/ApiSecurityModule.java cc9cfd38239f909b8a77bd1a773e31ec30130d41 src/main/java/org/apache/aurora/scheduler/http/api/security/ModuleParser.java fe6409ab14ebfb89b161f919f764879d42e53877 src/test/java/org/apache/aurora/scheduler/app/ModulesTest.java PRE-CREATION Diff: https://reviews.apache.org/r/32377/diff/ Testing --- Thanks, Bill Farner
Re: Review Request 32377: Add a mechanism to lazily instantiate module classes.
On March 23, 2015, 5:43 p.m., Joshua Cohen wrote: src/main/java/org/apache/aurora/scheduler/app/Modules.java, line 77 https://reviews.apache.org/r/32377/diff/1/?file=902301#file902301line77 This method also appears to be used here: https://github.com/apache/incubator-aurora/blob/master/src/main/java/org/apache/aurora/scheduler/thrift/auth/ThriftAuthModule.java#L81 Nevermind, RB is hiding the override. *whew* was questioning my sanity. - Joshua --- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/32377/#review77424 --- On March 22, 2015, 6:37 p.m., Bill Farner wrote: --- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/32377/ --- (Updated March 22, 2015, 6:37 p.m.) Review request for Aurora and Kevin Sweeney. Bugs: AURORA-1217 https://issues.apache.org/jira/browse/AURORA-1217 Repository: aurora Description --- Add an indirection for modules that must not be statically instantiated. Diffs - src/main/java/org/apache/aurora/scheduler/app/Modules.java e95cb2a255e6986e0678a4085036deb24f9cb359 src/main/java/org/apache/aurora/scheduler/http/api/security/ApiSecurityModule.java cc9cfd38239f909b8a77bd1a773e31ec30130d41 src/test/java/org/apache/aurora/scheduler/app/ModulesTest.java PRE-CREATION Diff: https://reviews.apache.org/r/32377/diff/ Testing --- Thanks, Bill Farner
Re: Review Request 32377: Add a mechanism to lazily instantiate module classes.
On March 23, 2015, 10:43 a.m., Kevin Sweeney wrote: src/main/java/org/apache/aurora/scheduler/http/api/security/ApiSecurityModule.java, line 61 https://reviews.apache.org/r/32377/diff/1/?file=902302#file902302line61 Can you push the lazy instantiation logic to ModuleParser and change this back to ArgSetModule? To be clear I suggest defining ```java private static final ArgSetModule SHIRO_REALM_MODULES = Arg.create(ImmutableSet.of(Modules.lazilyInstantiated(IniShiroRealmModule.class))); ``` - Kevin --- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/32377/#review77423 --- On March 22, 2015, 11:37 a.m., Bill Farner wrote: --- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/32377/ --- (Updated March 22, 2015, 11:37 a.m.) Review request for Aurora and Kevin Sweeney. Bugs: AURORA-1217 https://issues.apache.org/jira/browse/AURORA-1217 Repository: aurora Description --- Add an indirection for modules that must not be statically instantiated. Diffs - src/main/java/org/apache/aurora/scheduler/app/Modules.java e95cb2a255e6986e0678a4085036deb24f9cb359 src/main/java/org/apache/aurora/scheduler/http/api/security/ApiSecurityModule.java cc9cfd38239f909b8a77bd1a773e31ec30130d41 src/test/java/org/apache/aurora/scheduler/app/ModulesTest.java PRE-CREATION Diff: https://reviews.apache.org/r/32377/diff/ Testing --- Thanks, Bill Farner
Re: Review Request 32377: Add a mechanism to lazily instantiate module classes.
On March 23, 2015, 5:43 p.m., Joshua Cohen wrote: src/main/java/org/apache/aurora/scheduler/app/Modules.java, line 77 https://reviews.apache.org/r/32377/diff/1/?file=902301#file902301line77 This method also appears to be used here: https://github.com/apache/incubator-aurora/blob/master/src/main/java/org/apache/aurora/scheduler/thrift/auth/ThriftAuthModule.java#L81 Joshua Cohen wrote: Nevermind, RB is hiding the override. *whew* was questioning my sanity. s/override/overload. - Joshua --- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/32377/#review77424 --- On March 22, 2015, 6:37 p.m., Bill Farner wrote: --- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/32377/ --- (Updated March 22, 2015, 6:37 p.m.) Review request for Aurora and Kevin Sweeney. Bugs: AURORA-1217 https://issues.apache.org/jira/browse/AURORA-1217 Repository: aurora Description --- Add an indirection for modules that must not be statically instantiated. Diffs - src/main/java/org/apache/aurora/scheduler/app/Modules.java e95cb2a255e6986e0678a4085036deb24f9cb359 src/main/java/org/apache/aurora/scheduler/http/api/security/ApiSecurityModule.java cc9cfd38239f909b8a77bd1a773e31ec30130d41 src/test/java/org/apache/aurora/scheduler/app/ModulesTest.java PRE-CREATION Diff: https://reviews.apache.org/r/32377/diff/ Testing --- Thanks, Bill Farner
Re: Review Request 32377: Add a mechanism to lazily instantiate module classes.
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/32377/#review77423 --- src/main/java/org/apache/aurora/scheduler/app/Modules.java https://reviews.apache.org/r/32377/#comment125482 Can you push this to ModuleParser? src/main/java/org/apache/aurora/scheduler/http/api/security/ApiSecurityModule.java https://reviews.apache.org/r/32377/#comment125483 Can you push the lazy instantiation logic to ModuleParser and change this back to ArgSetModule? - Kevin Sweeney On March 22, 2015, 11:37 a.m., Bill Farner wrote: --- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/32377/ --- (Updated March 22, 2015, 11:37 a.m.) Review request for Aurora and Kevin Sweeney. Bugs: AURORA-1217 https://issues.apache.org/jira/browse/AURORA-1217 Repository: aurora Description --- Add an indirection for modules that must not be statically instantiated. Diffs - src/main/java/org/apache/aurora/scheduler/app/Modules.java e95cb2a255e6986e0678a4085036deb24f9cb359 src/main/java/org/apache/aurora/scheduler/http/api/security/ApiSecurityModule.java cc9cfd38239f909b8a77bd1a773e31ec30130d41 src/test/java/org/apache/aurora/scheduler/app/ModulesTest.java PRE-CREATION Diff: https://reviews.apache.org/r/32377/diff/ Testing --- Thanks, Bill Farner
Re: Review Request 32377: Add a mechanism to lazily instantiate module classes.
On March 23, 2015, 5:43 p.m., Kevin Sweeney wrote: src/main/java/org/apache/aurora/scheduler/app/Modules.java, line 99 https://reviews.apache.org/r/32377/diff/1/?file=902301#file902301line99 Can you push this to ModuleParser? Good call, done. On March 23, 2015, 5:43 p.m., Kevin Sweeney wrote: src/main/java/org/apache/aurora/scheduler/http/api/security/ApiSecurityModule.java, line 61 https://reviews.apache.org/r/32377/diff/1/?file=902302#file902302line61 Can you push the lazy instantiation logic to ModuleParser and change this back to ArgSetModule? Kevin Sweeney wrote: To be clear I suggest defining ```java private static final ArgSetModule SHIRO_REALM_MODULES = Arg.create(ImmutableSet.of(Modules.lazilyInstantiated(IniShiroRealmModule.class))); ``` Done. - Bill --- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/32377/#review77423 --- On March 22, 2015, 6:37 p.m., Bill Farner wrote: --- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/32377/ --- (Updated March 22, 2015, 6:37 p.m.) Review request for Aurora and Kevin Sweeney. Bugs: AURORA-1217 https://issues.apache.org/jira/browse/AURORA-1217 Repository: aurora Description --- Add an indirection for modules that must not be statically instantiated. Diffs - src/main/java/org/apache/aurora/scheduler/app/Modules.java e95cb2a255e6986e0678a4085036deb24f9cb359 src/main/java/org/apache/aurora/scheduler/http/api/security/ApiSecurityModule.java cc9cfd38239f909b8a77bd1a773e31ec30130d41 src/test/java/org/apache/aurora/scheduler/app/ModulesTest.java PRE-CREATION Diff: https://reviews.apache.org/r/32377/diff/ Testing --- Thanks, Bill Farner
Re: Review Request 32377: Add a mechanism to lazily instantiate module classes.
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/32377/ --- (Updated March 23, 2015, 6:51 p.m.) Review request for Aurora and Kevin Sweeney. Bugs: AURORA-1217 https://issues.apache.org/jira/browse/AURORA-1217 Repository: aurora Description --- Add an indirection for modules that must not be statically instantiated. Diffs (updated) - src/main/java/org/apache/aurora/scheduler/app/Modules.java e95cb2a255e6986e0678a4085036deb24f9cb359 src/main/java/org/apache/aurora/scheduler/http/api/security/ApiSecurityModule.java cc9cfd38239f909b8a77bd1a773e31ec30130d41 src/main/java/org/apache/aurora/scheduler/http/api/security/ModuleParser.java fe6409ab14ebfb89b161f919f764879d42e53877 src/test/java/org/apache/aurora/scheduler/app/ModulesTest.java PRE-CREATION Diff: https://reviews.apache.org/r/32377/diff/ Testing --- Thanks, Bill Farner
Re: Review Request 32377: Add a mechanism to lazily instantiate module classes.
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/32377/#review77424 --- src/main/java/org/apache/aurora/scheduler/app/Modules.java https://reviews.apache.org/r/32377/#comment125484 This method also appears to be used here: https://github.com/apache/incubator-aurora/blob/master/src/main/java/org/apache/aurora/scheduler/thrift/auth/ThriftAuthModule.java#L81 - Joshua Cohen On March 22, 2015, 6:37 p.m., Bill Farner wrote: --- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/32377/ --- (Updated March 22, 2015, 6:37 p.m.) Review request for Aurora and Kevin Sweeney. Bugs: AURORA-1217 https://issues.apache.org/jira/browse/AURORA-1217 Repository: aurora Description --- Add an indirection for modules that must not be statically instantiated. Diffs - src/main/java/org/apache/aurora/scheduler/app/Modules.java e95cb2a255e6986e0678a4085036deb24f9cb359 src/main/java/org/apache/aurora/scheduler/http/api/security/ApiSecurityModule.java cc9cfd38239f909b8a77bd1a773e31ec30130d41 src/test/java/org/apache/aurora/scheduler/app/ModulesTest.java PRE-CREATION Diff: https://reviews.apache.org/r/32377/diff/ Testing --- Thanks, Bill Farner
Re: Review Request 32377: Add a mechanism to lazily instantiate module classes.
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/32377/#review77447 --- Ship it! src/main/java/org/apache/aurora/scheduler/app/Modules.java https://reviews.apache.org/r/32377/#comment125503 consider adding a Class? extends Module... overload. - Kevin Sweeney On March 23, 2015, 11:51 a.m., Bill Farner wrote: --- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/32377/ --- (Updated March 23, 2015, 11:51 a.m.) Review request for Aurora and Kevin Sweeney. Bugs: AURORA-1217 https://issues.apache.org/jira/browse/AURORA-1217 Repository: aurora Description --- Add an indirection for modules that must not be statically instantiated. Diffs - src/main/java/org/apache/aurora/scheduler/app/Modules.java e95cb2a255e6986e0678a4085036deb24f9cb359 src/main/java/org/apache/aurora/scheduler/http/api/security/ApiSecurityModule.java cc9cfd38239f909b8a77bd1a773e31ec30130d41 src/main/java/org/apache/aurora/scheduler/http/api/security/ModuleParser.java fe6409ab14ebfb89b161f919f764879d42e53877 src/test/java/org/apache/aurora/scheduler/app/ModulesTest.java PRE-CREATION Diff: https://reviews.apache.org/r/32377/diff/ Testing --- Thanks, Bill Farner
Re: Review Request 32377: Add a mechanism to lazily instantiate module classes.
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/32377/ --- (Updated March 24, 2015, 12:31 a.m.) Review request for Aurora and Kevin Sweeney. Bugs: AURORA-1217 https://issues.apache.org/jira/browse/AURORA-1217 Repository: aurora Description --- Add an indirection for modules that must not be statically instantiated. Diffs (updated) - src/main/java/org/apache/aurora/scheduler/app/Modules.java e95cb2a255e6986e0678a4085036deb24f9cb359 src/main/java/org/apache/aurora/scheduler/http/api/security/ApiSecurityModule.java cc9cfd38239f909b8a77bd1a773e31ec30130d41 src/main/java/org/apache/aurora/scheduler/http/api/security/ModuleParser.java fe6409ab14ebfb89b161f919f764879d42e53877 src/test/java/org/apache/aurora/scheduler/app/ModulesTest.java PRE-CREATION Diff: https://reviews.apache.org/r/32377/diff/ Testing --- Thanks, Bill Farner
Re: Review Request 32377: Add a mechanism to lazily instantiate module classes.
On March 23, 2015, 6:56 p.m., Kevin Sweeney wrote: src/main/java/org/apache/aurora/scheduler/app/Modules.java, line 99 https://reviews.apache.org/r/32377/diff/2/?file=903369#file903369line99 consider adding a Class? extends Module... overload. -1 on the overload, +1 on the switch to that as the only implementation (since it's the only use case). - Bill --- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/32377/#review77447 --- On March 23, 2015, 6:51 p.m., Bill Farner wrote: --- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/32377/ --- (Updated March 23, 2015, 6:51 p.m.) Review request for Aurora and Kevin Sweeney. Bugs: AURORA-1217 https://issues.apache.org/jira/browse/AURORA-1217 Repository: aurora Description --- Add an indirection for modules that must not be statically instantiated. Diffs - src/main/java/org/apache/aurora/scheduler/app/Modules.java e95cb2a255e6986e0678a4085036deb24f9cb359 src/main/java/org/apache/aurora/scheduler/http/api/security/ApiSecurityModule.java cc9cfd38239f909b8a77bd1a773e31ec30130d41 src/main/java/org/apache/aurora/scheduler/http/api/security/ModuleParser.java fe6409ab14ebfb89b161f919f764879d42e53877 src/test/java/org/apache/aurora/scheduler/app/ModulesTest.java PRE-CREATION Diff: https://reviews.apache.org/r/32377/diff/ Testing --- Thanks, Bill Farner
Re: Review Request 32377: Add a mechanism to lazily instantiate module classes.
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/32377/#review77354 --- Ship it! Master (a3a35e9) 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 March 22, 2015, 6:37 p.m., Bill Farner wrote: --- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/32377/ --- (Updated March 22, 2015, 6:37 p.m.) Review request for Aurora and Kevin Sweeney. Bugs: AURORA-1217 https://issues.apache.org/jira/browse/AURORA-1217 Repository: aurora Description --- Add an indirection for modules that must not be statically instantiated. Diffs - src/main/java/org/apache/aurora/scheduler/app/Modules.java e95cb2a255e6986e0678a4085036deb24f9cb359 src/main/java/org/apache/aurora/scheduler/http/api/security/ApiSecurityModule.java cc9cfd38239f909b8a77bd1a773e31ec30130d41 src/test/java/org/apache/aurora/scheduler/app/ModulesTest.java PRE-CREATION Diff: https://reviews.apache.org/r/32377/diff/ Testing --- Thanks, Bill Farner