You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@aurora.apache.org by Kevin Sweeney <ke...@apache.org> on 2015/07/15 01:46:41 UTC

Review Request 36490: wip

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

Review request for Aurora and Bill Farner.


Bugs: AURORA-1352
    https://issues.apache.org/jira/browse/AURORA-1352


Repository: aurora


Description
-------

Use Provider<Optional<Subject>> instead of @Nullable Provider<Subject>.


Diffs
-----

  src/main/java/org/apache/aurora/auth/UnsecureSessionContext.java f547c4485eab97e4fe149eec9fa73af3ce807748 
  src/main/java/org/apache/aurora/scheduler/http/api/security/HttpSecurityModule.java a3b0a6bd573f04ff275a54b16f0ab5ebf139868e 
  src/test/java/org/apache/aurora/auth/UnsecureSessionContextTest.java 63917363f392e6d970fb7e0cb91b840ca5db173e 
  src/test/sh/org/apache/aurora/e2e/test_kerberos_end_to_end.sh 6e4a294d6ca7ffd3a733498211e66ad674ef0b39 

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


Testing
-------

./gradlew build


Thanks,

Kevin Sweeney


Re: Review Request 36490: Use Provider> instead of optional injection for Shiro audit logging.

Posted by Kevin Sweeney <ke...@apache.org>.

> On July 14, 2015, 4:52 p.m., Aurora ReviewBot wrote:
> > Master (d9dac92) is red with this patch.
> >   ./build-support/jenkins/build.sh
> > 
> > :api:classesThriftEntities
> > :api:compileJava UP-TO-DATE
> > :api:generateThriftResources
> > :api:processResources UP-TO-DATE
> > :api:classes
> > :api:jar
> > :compileJavaNote: Writing file:/home/jenkins/jenkins-slave/workspace/AuroraBot/dist/classes/main/com/twitter/common/args/apt/cmdline.arg.info.txt.2
> > /home/jenkins/jenkins-slave/workspace/AuroraBot/src/main/java/org/apache/aurora/scheduler/http/api/security/HttpSecurityModule.java:136: error: incompatible types: no instance(s) of type variable(s) T exist so that Optional<T> conforms to ? extends Optional<Subject>
> >       bind(new TypeLiteral<Optional<Subject>>() {}).toProvider(Optional::empty);
> >                                                                ^
> >   where T is a type-variable:
> >     T extends Object declared in method <T>empty()
> > /home/jenkins/jenkins-slave/workspace/AuroraBot/src/main/java/org/apache/aurora/scheduler/http/api/security/HttpSecurityModule.java:143: error: no suitable method found for toProvider(SecurityUt[...]bject)
> >     bind(Subject.class).toProvider(SecurityUtils::getSubject).in(RequestScoped.class);
> >                        ^
> >     method LinkedBindingBuilder.toProvider(com.google.inject.Provider<? extends Subject>) is not applicable
> >       (argument mismatch; bad return type in method reference
> >           Subject cannot be converted to ? extends Subject)
> >     method LinkedBindingBuilder.toProvider(Class<? extends javax.inject.Provider<? extends Subject>>) is not applicable
> >       (argument mismatch; Class is not a functional interface)
> >     method LinkedBindingBuilder.toProvider(TypeLiteral<? extends javax.inject.Provider<? extends Subject>>) is not applicable
> >       (argument mismatch; TypeLiteral is not a functional interface)
> >     method LinkedBindingBuilder.toProvider(Key<? extends javax.inject.Provider<? extends Subject>>) is not applicable
> >       (argument mismatch; Key is not a functional interface)
> > Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
> > 2 errors
> >  FAILED
> > 
> > FAILURE: Build failed with an exception.
> > 
> > * What went wrong:
> > Execution failed for task ':compileJava'.
> > > Compilation failed; see the compiler error output for details.
> > 
> > * Try:
> > Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
> > 
> > BUILD FAILED
> > 
> > Total time: 1 mins 33.58 secs
> > 
> > 
> > I will refresh this build result if you post a review containing "@ReviewBot retry"
> 
> Kevin Sweeney wrote:
>     This looks like: https://bugs.openjdk.java.net/browse/JDK-8051402

We should investigate using docker run for our CI so that we can be assured we have the same versions everywhere.


- Kevin


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


On July 14, 2015, 4:48 p.m., Kevin Sweeney wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/36490/
> -----------------------------------------------------------
> 
> (Updated July 14, 2015, 4:48 p.m.)
> 
> 
> Review request for Aurora and Bill Farner.
> 
> 
> Bugs: AURORA-1352
>     https://issues.apache.org/jira/browse/AURORA-1352
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> Use injection of an optional value instead of optional injection.
> 
> 
> Diffs
> -----
> 
>   src/main/java/org/apache/aurora/auth/UnsecureSessionContext.java f547c4485eab97e4fe149eec9fa73af3ce807748 
>   src/main/java/org/apache/aurora/scheduler/http/api/security/HttpSecurityModule.java a3b0a6bd573f04ff275a54b16f0ab5ebf139868e 
>   src/test/java/org/apache/aurora/auth/UnsecureSessionContextTest.java 63917363f392e6d970fb7e0cb91b840ca5db173e 
>   src/test/sh/org/apache/aurora/e2e/test_kerberos_end_to_end.sh 6e4a294d6ca7ffd3a733498211e66ad674ef0b39 
> 
> Diff: https://reviews.apache.org/r/36490/diff/
> 
> 
> Testing
> -------
> 
> ./gradlew build
> 
> 
> Thanks,
> 
> Kevin Sweeney
> 
>


Re: Review Request 36490: Use Provider> instead of optional injection for Shiro audit logging.

Posted by Kevin Sweeney <ke...@apache.org>.

> On July 14, 2015, 4:52 p.m., Aurora ReviewBot wrote:
> > Master (d9dac92) is red with this patch.
> >   ./build-support/jenkins/build.sh
> > 
> > :api:classesThriftEntities
> > :api:compileJava UP-TO-DATE
> > :api:generateThriftResources
> > :api:processResources UP-TO-DATE
> > :api:classes
> > :api:jar
> > :compileJavaNote: Writing file:/home/jenkins/jenkins-slave/workspace/AuroraBot/dist/classes/main/com/twitter/common/args/apt/cmdline.arg.info.txt.2
> > /home/jenkins/jenkins-slave/workspace/AuroraBot/src/main/java/org/apache/aurora/scheduler/http/api/security/HttpSecurityModule.java:136: error: incompatible types: no instance(s) of type variable(s) T exist so that Optional<T> conforms to ? extends Optional<Subject>
> >       bind(new TypeLiteral<Optional<Subject>>() {}).toProvider(Optional::empty);
> >                                                                ^
> >   where T is a type-variable:
> >     T extends Object declared in method <T>empty()
> > /home/jenkins/jenkins-slave/workspace/AuroraBot/src/main/java/org/apache/aurora/scheduler/http/api/security/HttpSecurityModule.java:143: error: no suitable method found for toProvider(SecurityUt[...]bject)
> >     bind(Subject.class).toProvider(SecurityUtils::getSubject).in(RequestScoped.class);
> >                        ^
> >     method LinkedBindingBuilder.toProvider(com.google.inject.Provider<? extends Subject>) is not applicable
> >       (argument mismatch; bad return type in method reference
> >           Subject cannot be converted to ? extends Subject)
> >     method LinkedBindingBuilder.toProvider(Class<? extends javax.inject.Provider<? extends Subject>>) is not applicable
> >       (argument mismatch; Class is not a functional interface)
> >     method LinkedBindingBuilder.toProvider(TypeLiteral<? extends javax.inject.Provider<? extends Subject>>) is not applicable
> >       (argument mismatch; TypeLiteral is not a functional interface)
> >     method LinkedBindingBuilder.toProvider(Key<? extends javax.inject.Provider<? extends Subject>>) is not applicable
> >       (argument mismatch; Key is not a functional interface)
> > Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
> > 2 errors
> >  FAILED
> > 
> > FAILURE: Build failed with an exception.
> > 
> > * What went wrong:
> > Execution failed for task ':compileJava'.
> > > Compilation failed; see the compiler error output for details.
> > 
> > * Try:
> > Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
> > 
> > BUILD FAILED
> > 
> > Total time: 1 mins 33.58 secs
> > 
> > 
> > I will refresh this build result if you post a review containing "@ReviewBot retry"

This looks like: https://bugs.openjdk.java.net/browse/JDK-8051402


- Kevin


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


On July 14, 2015, 4:48 p.m., Kevin Sweeney wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/36490/
> -----------------------------------------------------------
> 
> (Updated July 14, 2015, 4:48 p.m.)
> 
> 
> Review request for Aurora and Bill Farner.
> 
> 
> Bugs: AURORA-1352
>     https://issues.apache.org/jira/browse/AURORA-1352
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> Use injection of an optional value instead of optional injection.
> 
> 
> Diffs
> -----
> 
>   src/main/java/org/apache/aurora/auth/UnsecureSessionContext.java f547c4485eab97e4fe149eec9fa73af3ce807748 
>   src/main/java/org/apache/aurora/scheduler/http/api/security/HttpSecurityModule.java a3b0a6bd573f04ff275a54b16f0ab5ebf139868e 
>   src/test/java/org/apache/aurora/auth/UnsecureSessionContextTest.java 63917363f392e6d970fb7e0cb91b840ca5db173e 
>   src/test/sh/org/apache/aurora/e2e/test_kerberos_end_to_end.sh 6e4a294d6ca7ffd3a733498211e66ad674ef0b39 
> 
> Diff: https://reviews.apache.org/r/36490/diff/
> 
> 
> Testing
> -------
> 
> ./gradlew build
> 
> 
> Thanks,
> 
> Kevin Sweeney
> 
>


Re: Review Request 36490: Use Provider> instead of optional injection for Shiro audit logging.

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


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

:api:classesThriftEntities
:api:compileJava UP-TO-DATE
:api:generateThriftResources
:api:processResources UP-TO-DATE
:api:classes
:api:jar
:compileJavaNote: Writing file:/home/jenkins/jenkins-slave/workspace/AuroraBot/dist/classes/main/com/twitter/common/args/apt/cmdline.arg.info.txt.2
/home/jenkins/jenkins-slave/workspace/AuroraBot/src/main/java/org/apache/aurora/scheduler/http/api/security/HttpSecurityModule.java:136: error: incompatible types: no instance(s) of type variable(s) T exist so that Optional<T> conforms to ? extends Optional<Subject>
      bind(new TypeLiteral<Optional<Subject>>() {}).toProvider(Optional::empty);
                                                               ^
  where T is a type-variable:
    T extends Object declared in method <T>empty()
/home/jenkins/jenkins-slave/workspace/AuroraBot/src/main/java/org/apache/aurora/scheduler/http/api/security/HttpSecurityModule.java:143: error: no suitable method found for toProvider(SecurityUt[...]bject)
    bind(Subject.class).toProvider(SecurityUtils::getSubject).in(RequestScoped.class);
                       ^
    method LinkedBindingBuilder.toProvider(com.google.inject.Provider<? extends Subject>) is not applicable
      (argument mismatch; bad return type in method reference
          Subject cannot be converted to ? extends Subject)
    method LinkedBindingBuilder.toProvider(Class<? extends javax.inject.Provider<? extends Subject>>) is not applicable
      (argument mismatch; Class is not a functional interface)
    method LinkedBindingBuilder.toProvider(TypeLiteral<? extends javax.inject.Provider<? extends Subject>>) is not applicable
      (argument mismatch; TypeLiteral is not a functional interface)
    method LinkedBindingBuilder.toProvider(Key<? extends javax.inject.Provider<? extends Subject>>) is not applicable
      (argument mismatch; Key is not a functional interface)
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
2 errors
 FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileJava'.
> Compilation failed; see the compiler error output for details.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 1 mins 33.58 secs


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

- Aurora ReviewBot


On July 14, 2015, 11:48 p.m., Kevin Sweeney wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/36490/
> -----------------------------------------------------------
> 
> (Updated July 14, 2015, 11:48 p.m.)
> 
> 
> Review request for Aurora and Bill Farner.
> 
> 
> Bugs: AURORA-1352
>     https://issues.apache.org/jira/browse/AURORA-1352
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> Use injection of an optional value instead of optional injection.
> 
> 
> Diffs
> -----
> 
>   src/main/java/org/apache/aurora/auth/UnsecureSessionContext.java f547c4485eab97e4fe149eec9fa73af3ce807748 
>   src/main/java/org/apache/aurora/scheduler/http/api/security/HttpSecurityModule.java a3b0a6bd573f04ff275a54b16f0ab5ebf139868e 
>   src/test/java/org/apache/aurora/auth/UnsecureSessionContextTest.java 63917363f392e6d970fb7e0cb91b840ca5db173e 
>   src/test/sh/org/apache/aurora/e2e/test_kerberos_end_to_end.sh 6e4a294d6ca7ffd3a733498211e66ad674ef0b39 
> 
> Diff: https://reviews.apache.org/r/36490/diff/
> 
> 
> Testing
> -------
> 
> ./gradlew build
> 
> 
> Thanks,
> 
> Kevin Sweeney
> 
>


Re: Review Request 36490: Use Provider> instead of optional injection for Shiro audit logging.

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

Ship it!


Master (e63c518) 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 July 15, 2015, 6:34 p.m., Kevin Sweeney wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/36490/
> -----------------------------------------------------------
> 
> (Updated July 15, 2015, 6:34 p.m.)
> 
> 
> Review request for Aurora and Bill Farner.
> 
> 
> Bugs: AURORA-1352
>     https://issues.apache.org/jira/browse/AURORA-1352
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> Use injection of an optional value instead of optional injection.
> 
> 
> Diffs
> -----
> 
>   src/main/java/org/apache/aurora/auth/UnsecureSessionContext.java f547c4485eab97e4fe149eec9fa73af3ce807748 
>   src/main/java/org/apache/aurora/scheduler/http/api/security/HttpSecurityModule.java a3b0a6bd573f04ff275a54b16f0ab5ebf139868e 
>   src/test/java/org/apache/aurora/auth/UnsecureSessionContextTest.java 63917363f392e6d970fb7e0cb91b840ca5db173e 
>   src/test/sh/org/apache/aurora/e2e/test_kerberos_end_to_end.sh 6e4a294d6ca7ffd3a733498211e66ad674ef0b39 
> 
> Diff: https://reviews.apache.org/r/36490/diff/
> 
> 
> Testing
> -------
> 
> ./gradlew build
> 
> 
> Thanks,
> 
> Kevin Sweeney
> 
>


Re: Review Request 36490: Use Provider> instead of optional injection for Shiro audit logging.

Posted by Kevin Sweeney <ke...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/36490/
-----------------------------------------------------------

(Updated July 15, 2015, 11:34 a.m.)


Review request for Aurora and Bill Farner.


Changes
-------

Fix checkstyle for test sources too.


Bugs: AURORA-1352
    https://issues.apache.org/jira/browse/AURORA-1352


Repository: aurora


Description
-------

Use injection of an optional value instead of optional injection.


Diffs (updated)
-----

  src/main/java/org/apache/aurora/auth/UnsecureSessionContext.java f547c4485eab97e4fe149eec9fa73af3ce807748 
  src/main/java/org/apache/aurora/scheduler/http/api/security/HttpSecurityModule.java a3b0a6bd573f04ff275a54b16f0ab5ebf139868e 
  src/test/java/org/apache/aurora/auth/UnsecureSessionContextTest.java 63917363f392e6d970fb7e0cb91b840ca5db173e 
  src/test/sh/org/apache/aurora/e2e/test_kerberos_end_to_end.sh 6e4a294d6ca7ffd3a733498211e66ad674ef0b39 

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


Testing
-------

./gradlew build


Thanks,

Kevin Sweeney


Re: Review Request 36490: Use Provider> instead of optional injection for Shiro audit logging.

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


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

:api:compileJava UP-TO-DATE
:api:generateThriftResources
:api:processResources UP-TO-DATE
:api:classes
:api:jar
:compileJavaNote: Writing file:/home/jenkins/jenkins-slave/workspace/AuroraBot/dist/classes/main/com/twitter/common/args/apt/cmdline.arg.info.txt.2

:processResources
:classes
:jar
:startScripts
:distTar
:distZip
:assemble
:compileJmhJavaNote: /home/jenkins/jenkins-slave/workspace/AuroraBot/src/jmh/java/org/apache/aurora/benchmark/fakes/FakeSchedulerDriver.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

:processJmhResources UP-TO-DATE
:jmhClasses
:checkstyleJmh
:jsHint
:checkstyleMain
:compileTestJava
:processTestResources
:testClasses
:checkstyleTest[ant:checkstyle] /home/jenkins/jenkins-slave/workspace/AuroraBot/src/test/java/org/apache/aurora/auth/UnsecureSessionContextTest.java:23: Wrong order for 'java.util.Optional' import. Order should be: java, javax, scala, com, net, org.         Each group should be separated by a single blank line.
 FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':checkstyleTest'.
> Checkstyle rule violations were found. See the report at: file:///home/jenkins/jenkins-slave/workspace/AuroraBot/dist/reports/checkstyle/test.xml

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 2 mins 7.761 secs


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

- Aurora ReviewBot


On July 15, 2015, 6:21 p.m., Kevin Sweeney wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/36490/
> -----------------------------------------------------------
> 
> (Updated July 15, 2015, 6:21 p.m.)
> 
> 
> Review request for Aurora and Bill Farner.
> 
> 
> Bugs: AURORA-1352
>     https://issues.apache.org/jira/browse/AURORA-1352
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> Use injection of an optional value instead of optional injection.
> 
> 
> Diffs
> -----
> 
>   src/main/java/org/apache/aurora/auth/UnsecureSessionContext.java f547c4485eab97e4fe149eec9fa73af3ce807748 
>   src/main/java/org/apache/aurora/scheduler/http/api/security/HttpSecurityModule.java a3b0a6bd573f04ff275a54b16f0ab5ebf139868e 
>   src/test/java/org/apache/aurora/auth/UnsecureSessionContextTest.java 63917363f392e6d970fb7e0cb91b840ca5db173e 
>   src/test/sh/org/apache/aurora/e2e/test_kerberos_end_to_end.sh 6e4a294d6ca7ffd3a733498211e66ad674ef0b39 
> 
> Diff: https://reviews.apache.org/r/36490/diff/
> 
> 
> Testing
> -------
> 
> ./gradlew build
> 
> 
> Thanks,
> 
> Kevin Sweeney
> 
>


Re: Review Request 36490: Use Provider> instead of optional injection for Shiro audit logging.

Posted by Kevin Sweeney <ke...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/36490/
-----------------------------------------------------------

(Updated July 15, 2015, 11:21 a.m.)


Review request for Aurora and Bill Farner.


Changes
-------

wfarner's feedback


Bugs: AURORA-1352
    https://issues.apache.org/jira/browse/AURORA-1352


Repository: aurora


Description
-------

Use injection of an optional value instead of optional injection.


Diffs (updated)
-----

  src/main/java/org/apache/aurora/auth/UnsecureSessionContext.java f547c4485eab97e4fe149eec9fa73af3ce807748 
  src/main/java/org/apache/aurora/scheduler/http/api/security/HttpSecurityModule.java a3b0a6bd573f04ff275a54b16f0ab5ebf139868e 
  src/test/java/org/apache/aurora/auth/UnsecureSessionContextTest.java 63917363f392e6d970fb7e0cb91b840ca5db173e 
  src/test/sh/org/apache/aurora/e2e/test_kerberos_end_to_end.sh 6e4a294d6ca7ffd3a733498211e66ad674ef0b39 

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


Testing
-------

./gradlew build


Thanks,

Kevin Sweeney


Re: Review Request 36490: Use Provider> instead of optional injection for Shiro audit logging.

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


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

:api:generateThriftResources
:api:processResources UP-TO-DATE
:api:classes
:api:jar
:compileJavaNote: Writing file:/home/jenkins/jenkins-slave/workspace/AuroraBot/dist/classes/main/com/twitter/common/args/apt/cmdline.arg.info.txt.2

:processResources
:classes
:jar
:startScripts
:distTar
:distZip
:assemble
:compileJmhJavaNote: /home/jenkins/jenkins-slave/workspace/AuroraBot/src/jmh/java/org/apache/aurora/benchmark/fakes/FakeSchedulerDriver.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

:processJmhResources UP-TO-DATE
:jmhClasses
:checkstyleJmh
:jsHint
:checkstyleMain[ant:checkstyle] /home/jenkins/jenkins-slave/workspace/AuroraBot/src/main/java/org/apache/aurora/scheduler/http/api/security/HttpSecurityModule.java:20:8: Unused import - javax.inject.Inject.
[ant:checkstyle] /home/jenkins/jenkins-slave/workspace/AuroraBot/src/main/java/org/apache/aurora/scheduler/http/api/security/HttpSecurityModule.java:28:8: Unused import - com.google.inject.Provider.
[ant:checkstyle] /home/jenkins/jenkins-slave/workspace/AuroraBot/src/main/java/org/apache/aurora/scheduler/http/api/security/HttpSecurityModule.java:36:8: Unused import - com.google.inject.spi.Dependency.
[ant:checkstyle] /home/jenkins/jenkins-slave/workspace/AuroraBot/src/main/java/org/apache/aurora/scheduler/http/api/security/HttpSecurityModule.java:37:8: Unused import - com.google.inject.spi.ProviderWithDependencies.
[ant:checkstyle] /home/jenkins/jenkins-slave/workspace/AuroraBot/src/main/java/org/apache/aurora/scheduler/http/api/security/HttpSecurityModule.java:136:50: '{' is not followed by whitespace.
[ant:checkstyle] /home/jenkins/jenkins-slave/workspace/AuroraBot/src/main/java/org/apache/aurora/scheduler/http/api/security/HttpSecurityModule.java:219: File contains a sequence of empty lines.
 FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':checkstyleMain'.
> Checkstyle rule violations were found. See the report at: file:///home/jenkins/jenkins-slave/workspace/AuroraBot/dist/reports/checkstyle/main.xml

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 1 mins 35.603 secs


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

- Aurora ReviewBot


On July 14, 2015, 11:48 p.m., Kevin Sweeney wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/36490/
> -----------------------------------------------------------
> 
> (Updated July 14, 2015, 11:48 p.m.)
> 
> 
> Review request for Aurora and Bill Farner.
> 
> 
> Bugs: AURORA-1352
>     https://issues.apache.org/jira/browse/AURORA-1352
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> Use injection of an optional value instead of optional injection.
> 
> 
> Diffs
> -----
> 
>   src/main/java/org/apache/aurora/auth/UnsecureSessionContext.java f547c4485eab97e4fe149eec9fa73af3ce807748 
>   src/main/java/org/apache/aurora/scheduler/http/api/security/HttpSecurityModule.java a3b0a6bd573f04ff275a54b16f0ab5ebf139868e 
>   src/test/java/org/apache/aurora/auth/UnsecureSessionContextTest.java 63917363f392e6d970fb7e0cb91b840ca5db173e 
>   src/test/sh/org/apache/aurora/e2e/test_kerberos_end_to_end.sh 6e4a294d6ca7ffd3a733498211e66ad674ef0b39 
> 
> Diff: https://reviews.apache.org/r/36490/diff/
> 
> 
> Testing
> -------
> 
> ./gradlew build
> 
> 
> Thanks,
> 
> Kevin Sweeney
> 
>


Re: Review Request 36490: Use Provider> instead of optional injection for Shiro audit logging.

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


@ReviewBot retry

1.8_45 should now be on jenkins slaves, trying again

- Bill Farner


On July 14, 2015, 11:48 p.m., Kevin Sweeney wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/36490/
> -----------------------------------------------------------
> 
> (Updated July 14, 2015, 11:48 p.m.)
> 
> 
> Review request for Aurora and Bill Farner.
> 
> 
> Bugs: AURORA-1352
>     https://issues.apache.org/jira/browse/AURORA-1352
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> Use injection of an optional value instead of optional injection.
> 
> 
> Diffs
> -----
> 
>   src/main/java/org/apache/aurora/auth/UnsecureSessionContext.java f547c4485eab97e4fe149eec9fa73af3ce807748 
>   src/main/java/org/apache/aurora/scheduler/http/api/security/HttpSecurityModule.java a3b0a6bd573f04ff275a54b16f0ab5ebf139868e 
>   src/test/java/org/apache/aurora/auth/UnsecureSessionContextTest.java 63917363f392e6d970fb7e0cb91b840ca5db173e 
>   src/test/sh/org/apache/aurora/e2e/test_kerberos_end_to_end.sh 6e4a294d6ca7ffd3a733498211e66ad674ef0b39 
> 
> Diff: https://reviews.apache.org/r/36490/diff/
> 
> 
> Testing
> -------
> 
> ./gradlew build
> 
> 
> Thanks,
> 
> Kevin Sweeney
> 
>


Re: Review Request 36490: Use Provider> instead of optional injection for Shiro audit logging.

Posted by Kevin Sweeney <ke...@apache.org>.

> On July 15, 2015, 8:27 a.m., Bill Farner wrote:
> > src/main/java/org/apache/aurora/scheduler/http/api/security/HttpSecurityModule.java, lines 143-155
> > <https://reviews.apache.org/r/36490/diff/1/?file=1011891#file1011891line143>
> >
> >     Is the `Subject` -> `Optional<Subject>` layering necessary?  If not, consider simplifying by skipping the `toProvider` binding and call `SecurityUtils.getSubject()` in your provider method:
> >     
> >     ```
> >     @Provides
> >     @RequestScoped
> >     Optional<Subject> provideOptionalSubject() {
> >       return Optional.of(SecurityUtils.getSubject());
> >     }
> >     ```

Classes within the package inject Provider<Subject> directly (and get to skip the null check). Classes outside the package that attempt to do that should (and will) fail. This is the same behavior as Guice 4.0 OptionalBinder.


> On July 15, 2015, 8:27 a.m., Bill Farner wrote:
> > src/main/java/org/apache/aurora/scheduler/http/api/security/HttpSecurityModule.java, line 147
> > <https://reviews.apache.org/r/36490/diff/1/?file=1011891#file1011891line147>
> >
> >     s/Bindings/Provider/

Fixed.


- Kevin


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


On July 14, 2015, 4:48 p.m., Kevin Sweeney wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/36490/
> -----------------------------------------------------------
> 
> (Updated July 14, 2015, 4:48 p.m.)
> 
> 
> Review request for Aurora and Bill Farner.
> 
> 
> Bugs: AURORA-1352
>     https://issues.apache.org/jira/browse/AURORA-1352
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> Use injection of an optional value instead of optional injection.
> 
> 
> Diffs
> -----
> 
>   src/main/java/org/apache/aurora/auth/UnsecureSessionContext.java f547c4485eab97e4fe149eec9fa73af3ce807748 
>   src/main/java/org/apache/aurora/scheduler/http/api/security/HttpSecurityModule.java a3b0a6bd573f04ff275a54b16f0ab5ebf139868e 
>   src/test/java/org/apache/aurora/auth/UnsecureSessionContextTest.java 63917363f392e6d970fb7e0cb91b840ca5db173e 
>   src/test/sh/org/apache/aurora/e2e/test_kerberos_end_to_end.sh 6e4a294d6ca7ffd3a733498211e66ad674ef0b39 
> 
> Diff: https://reviews.apache.org/r/36490/diff/
> 
> 
> Testing
> -------
> 
> ./gradlew build
> 
> 
> Thanks,
> 
> Kevin Sweeney
> 
>


Re: Review Request 36490: Use Provider> instead of optional injection for Shiro audit logging.

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

Ship it!


LGTM once the bot reports a green build.


src/main/java/org/apache/aurora/scheduler/http/api/security/HttpSecurityModule.java (lines 143 - 155)
<https://reviews.apache.org/r/36490/#comment145365>

    Is the `Subject` -> `Optional<Subject>` layering necessary?  If not, consider simplifying by skipping the `toProvider` binding and call `SecurityUtils.getSubject()` in your provider method:
    
    ```
    @Provides
    @RequestScoped
    Optional<Subject> provideOptionalSubject() {
      return Optional.of(SecurityUtils.getSubject());
    }
    ```



src/main/java/org/apache/aurora/scheduler/http/api/security/HttpSecurityModule.java (line 147)
<https://reviews.apache.org/r/36490/#comment145363>

    s/Bindings/Provider/


- Bill Farner


On July 14, 2015, 11:48 p.m., Kevin Sweeney wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/36490/
> -----------------------------------------------------------
> 
> (Updated July 14, 2015, 11:48 p.m.)
> 
> 
> Review request for Aurora and Bill Farner.
> 
> 
> Bugs: AURORA-1352
>     https://issues.apache.org/jira/browse/AURORA-1352
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> Use injection of an optional value instead of optional injection.
> 
> 
> Diffs
> -----
> 
>   src/main/java/org/apache/aurora/auth/UnsecureSessionContext.java f547c4485eab97e4fe149eec9fa73af3ce807748 
>   src/main/java/org/apache/aurora/scheduler/http/api/security/HttpSecurityModule.java a3b0a6bd573f04ff275a54b16f0ab5ebf139868e 
>   src/test/java/org/apache/aurora/auth/UnsecureSessionContextTest.java 63917363f392e6d970fb7e0cb91b840ca5db173e 
>   src/test/sh/org/apache/aurora/e2e/test_kerberos_end_to_end.sh 6e4a294d6ca7ffd3a733498211e66ad674ef0b39 
> 
> Diff: https://reviews.apache.org/r/36490/diff/
> 
> 
> Testing
> -------
> 
> ./gradlew build
> 
> 
> Thanks,
> 
> Kevin Sweeney
> 
>


Re: Review Request 36490: Use Provider> instead of optional injection for Shiro audit logging.

Posted by Kevin Sweeney <ke...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/36490/
-----------------------------------------------------------

(Updated July 14, 2015, 4:48 p.m.)


Review request for Aurora and Bill Farner.


Summary (updated)
-----------------

Use Provider<Optional<Subject>> instead of optional injection for Shiro audit logging.


Bugs: AURORA-1352
    https://issues.apache.org/jira/browse/AURORA-1352


Repository: aurora


Description (updated)
-------

Use injection of an optional value instead of optional injection.


Diffs
-----

  src/main/java/org/apache/aurora/auth/UnsecureSessionContext.java f547c4485eab97e4fe149eec9fa73af3ce807748 
  src/main/java/org/apache/aurora/scheduler/http/api/security/HttpSecurityModule.java a3b0a6bd573f04ff275a54b16f0ab5ebf139868e 
  src/test/java/org/apache/aurora/auth/UnsecureSessionContextTest.java 63917363f392e6d970fb7e0cb91b840ca5db173e 
  src/test/sh/org/apache/aurora/e2e/test_kerberos_end_to_end.sh 6e4a294d6ca7ffd3a733498211e66ad674ef0b39 

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


Testing
-------

./gradlew build


Thanks,

Kevin Sweeney