You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@aurora.apache.org by John Sirois <jo...@gmail.com> on 2015/11/29 20:41:21 UTC
Review Request 40786: Replace manual Forwarding* with `@Forward`.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/40786/
-----------------------------------------------------------
Review request for Aurora, Bill Farner and Zameer Manji.
Repository: aurora
Description
-------
This is a bit of a straw man. While working on
https://issues.apache.org/jira/browse/AURORA-987 I found the need for
`javapoet` and this project spun off the side.
See the `@Forward` README here for more info: https://github.com/perkuno/forward
Although I think the end result is desirable, this change does add a
dependency on a personal project. I fancied up the presentation with a
custom org, but its still a personal project. I'd be happy enough to
move the `@Forward` code over to aurora, but it would require a seperate
gradle module to ensure the annotation processor is compiled ahead of
the main module that would use it.
So kick the tires and let me know what you think. The artifact will be
official on maven central within a few hours of this ticket being
resolved: https://issues.sonatype.org/browse/OSSRH-19139, at which point
the custom maven repo in `build.gradle` could go and the rev could be
bumped to `1.0.0`
build.gradle | 6 +-
src/main/java/org/apache/aurora/scheduler/storage/ForwardingStore.java | 185 ------------------------------
src/main/java/org/apache/aurora/scheduler/storage/log/WriteAheadStorage.java | 13 ++-
src/test/java/org/apache/aurora/scheduler/thrift/aop/ForwardingThrift.java | 309 --------------------------------------------------
src/test/java/org/apache/aurora/scheduler/thrift/aop/MockDecoratedThrift.java | 5 +-
5 files changed, 20 insertions(+), 498 deletions(-)
Diffs
-----
build.gradle a3ff2b747566a38e5ae07db204d0e75da5d3bfb6
src/main/java/org/apache/aurora/scheduler/storage/ForwardingStore.java b8bd9185cacc6b113b64a13a1b670fac202c795e
src/main/java/org/apache/aurora/scheduler/storage/log/WriteAheadStorage.java 89dd8aacafaa3a68afb8d4a0f4a7cba14cfef503
src/test/java/org/apache/aurora/scheduler/thrift/aop/ForwardingThrift.java a6769e62d61b2851db055e98ee254f707a91d208
src/test/java/org/apache/aurora/scheduler/thrift/aop/MockDecoratedThrift.java 1415f0cacc694aa7cf0d25e836e764a96fbb8ae2
Diff: https://reviews.apache.org/r/40786/diff/
Testing
-------
Green locally `./build-support/jenkins/build.sh`.
An example of the generated code:
```java
@Generated("uno.perk.forward.apt.Processor")
class MockDecoratedThriftForwarder implements AnnotatedAuroraAdmin {
protected final AnnotatedAuroraAdmin annotatedAuroraAdmin;
MockDecoratedThriftForwarder(AnnotatedAuroraAdmin annotatedAuroraAdmin) {
this.annotatedAuroraAdmin = Objects.requireNonNull(annotatedAuroraAdmin);
}
@Override
public Response getRoleSummary() throws TException {
return this.annotatedAuroraAdmin.getRoleSummary();
}
...
```
Thanks,
John Sirois
Re: Review Request 40786: Replace manual Forwarding* with `@Forward`.
Posted by Aurora ReviewBot <wf...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/40786/#review108317
-----------------------------------------------------------
Ship it!
Master (8524dbf) 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 Nov. 30, 2015, 3:05 p.m., John Sirois wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/40786/
> -----------------------------------------------------------
>
> (Updated Nov. 30, 2015, 3:05 p.m.)
>
>
> Review request for Aurora, Bill Farner and Zameer Manji.
>
>
> Repository: aurora
>
>
> Description
> -------
>
> This is a bit of a straw man. While working on
> https://issues.apache.org/jira/browse/AURORA-987 I found the need for
> `javapoet` and this project spun off the side.
>
> See the `@Forward` README here for more info: https://github.com/perkuno/forward
>
> Although I think the end result is desirable, this change does add a
> dependency on a personal project. I fancied up the presentation with a
> custom org, but its still a personal project. I'd be happy enough to
> move the `@Forward` code over to aurora, but it would require a seperate
> gradle module to ensure the annotation processor is compiled ahead of
> the main module that would use it.
>
> So kick the tires and let me know what you think.
>
> build.gradle | 6 +-
> src/main/java/org/apache/aurora/scheduler/storage/ForwardingStore.java | 185 ------------------------------
> src/main/java/org/apache/aurora/scheduler/storage/log/WriteAheadStorage.java | 13 ++-
> src/test/java/org/apache/aurora/scheduler/thrift/aop/ForwardingThrift.java | 309 --------------------------------------------------
> src/test/java/org/apache/aurora/scheduler/thrift/aop/MockDecoratedThrift.java | 5 +-
> 5 files changed, 20 insertions(+), 498 deletions(-)
>
>
> Diffs
> -----
>
> build.gradle a3ff2b747566a38e5ae07db204d0e75da5d3bfb6
> src/main/java/org/apache/aurora/scheduler/storage/ForwardingStore.java b8bd9185cacc6b113b64a13a1b670fac202c795e
> src/main/java/org/apache/aurora/scheduler/storage/log/WriteAheadStorage.java 89dd8aacafaa3a68afb8d4a0f4a7cba14cfef503
> src/test/java/org/apache/aurora/scheduler/thrift/aop/ForwardingThrift.java a6769e62d61b2851db055e98ee254f707a91d208
> src/test/java/org/apache/aurora/scheduler/thrift/aop/MockDecoratedThrift.java 1415f0cacc694aa7cf0d25e836e764a96fbb8ae2
>
> Diff: https://reviews.apache.org/r/40786/diff/
>
>
> Testing
> -------
>
> Green locally `./build-support/jenkins/build.sh`.
>
> An example of the generated code:
> ```java
> @Generated("uno.perk.forward.apt.Processor")
> class MockDecoratedThriftForwarder implements AnnotatedAuroraAdmin {
> protected final AnnotatedAuroraAdmin annotatedAuroraAdmin;
>
> MockDecoratedThriftForwarder(AnnotatedAuroraAdmin annotatedAuroraAdmin) {
> this.annotatedAuroraAdmin = Objects.requireNonNull(annotatedAuroraAdmin);
> }
>
> @Override
> public Response getRoleSummary() throws TException {
> return this.annotatedAuroraAdmin.getRoleSummary();
> }
> ...
> ```
>
>
> Thanks,
>
> John Sirois
>
>
Re: Review Request 40786: Replace manual Forwarding* with `@Forward`.
Posted by John Sirois <jo...@gmail.com>.
> On Dec. 7, 2015, 12:29 p.m., Zameer Manji wrote:
> > I tried to commit this on master and applying the patch failed. John, can you please rebase this?
Should be all good now.
- John
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/40786/#review109183
-----------------------------------------------------------
On Dec. 7, 2015, 2:55 p.m., John Sirois wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/40786/
> -----------------------------------------------------------
>
> (Updated Dec. 7, 2015, 2:55 p.m.)
>
>
> Review request for Aurora, Bill Farner and Zameer Manji.
>
>
> Repository: aurora
>
>
> Description
> -------
>
> This is a bit of a straw man. While working on
> https://issues.apache.org/jira/browse/AURORA-987 I found the need for
> `javapoet` and this project spun off the side.
>
> See the `@Forward` README here for more info: https://github.com/perkuno/forward
>
> Although I think the end result is desirable, this change does add a
> dependency on a personal project. I fancied up the presentation with a
> custom org, but its still a personal project. I'd be happy enough to
> move the `@Forward` code over to aurora, but it would require a seperate
> gradle module to ensure the annotation processor is compiled ahead of
> the main module that would use it.
>
> So kick the tires and let me know what you think.
>
> build.gradle | 6 +-
> src/main/java/org/apache/aurora/scheduler/storage/ForwardingStore.java | 185 ------------------------------
> src/main/java/org/apache/aurora/scheduler/storage/log/WriteAheadStorage.java | 13 ++-
> src/test/java/org/apache/aurora/scheduler/thrift/aop/ForwardingThrift.java | 309 --------------------------------------------------
> src/test/java/org/apache/aurora/scheduler/thrift/aop/MockDecoratedThrift.java | 5 +-
> 5 files changed, 20 insertions(+), 498 deletions(-)
>
>
> Diffs
> -----
>
> build.gradle a3ff2b747566a38e5ae07db204d0e75da5d3bfb6
> src/main/java/org/apache/aurora/scheduler/storage/ForwardingStore.java b8bd9185cacc6b113b64a13a1b670fac202c795e
> src/main/java/org/apache/aurora/scheduler/storage/log/WriteAheadStorage.java 89dd8aacafaa3a68afb8d4a0f4a7cba14cfef503
> src/test/java/org/apache/aurora/scheduler/thrift/aop/ForwardingThrift.java 2de178302d3c9aa9a7b23a9eb7ecb6e2f3b40819
> src/test/java/org/apache/aurora/scheduler/thrift/aop/MockDecoratedThrift.java 1415f0cacc694aa7cf0d25e836e764a96fbb8ae2
>
> Diff: https://reviews.apache.org/r/40786/diff/
>
>
> Testing
> -------
>
> Green locally `./build-support/jenkins/build.sh`.
>
> An example of the generated code:
> ```java
> @Generated("uno.perk.forward.apt.Processor")
> class MockDecoratedThriftForwarder implements AnnotatedAuroraAdmin {
> protected final AnnotatedAuroraAdmin annotatedAuroraAdmin;
>
> MockDecoratedThriftForwarder(AnnotatedAuroraAdmin annotatedAuroraAdmin) {
> this.annotatedAuroraAdmin = Objects.requireNonNull(annotatedAuroraAdmin);
> }
>
> @Override
> public Response getRoleSummary() throws TException {
> return this.annotatedAuroraAdmin.getRoleSummary();
> }
> ...
> ```
>
>
> Thanks,
>
> John Sirois
>
>
Re: Review Request 40786: Replace manual Forwarding* with `@Forward`.
Posted by Zameer Manji <zm...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/40786/#review109183
-----------------------------------------------------------
I tried to commit this on master and applying the patch failed. John, can you please rebase this?
- Zameer Manji
On Nov. 30, 2015, 7:05 a.m., John Sirois wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/40786/
> -----------------------------------------------------------
>
> (Updated Nov. 30, 2015, 7:05 a.m.)
>
>
> Review request for Aurora, Bill Farner and Zameer Manji.
>
>
> Repository: aurora
>
>
> Description
> -------
>
> This is a bit of a straw man. While working on
> https://issues.apache.org/jira/browse/AURORA-987 I found the need for
> `javapoet` and this project spun off the side.
>
> See the `@Forward` README here for more info: https://github.com/perkuno/forward
>
> Although I think the end result is desirable, this change does add a
> dependency on a personal project. I fancied up the presentation with a
> custom org, but its still a personal project. I'd be happy enough to
> move the `@Forward` code over to aurora, but it would require a seperate
> gradle module to ensure the annotation processor is compiled ahead of
> the main module that would use it.
>
> So kick the tires and let me know what you think.
>
> build.gradle | 6 +-
> src/main/java/org/apache/aurora/scheduler/storage/ForwardingStore.java | 185 ------------------------------
> src/main/java/org/apache/aurora/scheduler/storage/log/WriteAheadStorage.java | 13 ++-
> src/test/java/org/apache/aurora/scheduler/thrift/aop/ForwardingThrift.java | 309 --------------------------------------------------
> src/test/java/org/apache/aurora/scheduler/thrift/aop/MockDecoratedThrift.java | 5 +-
> 5 files changed, 20 insertions(+), 498 deletions(-)
>
>
> Diffs
> -----
>
> build.gradle a3ff2b747566a38e5ae07db204d0e75da5d3bfb6
> src/main/java/org/apache/aurora/scheduler/storage/ForwardingStore.java b8bd9185cacc6b113b64a13a1b670fac202c795e
> src/main/java/org/apache/aurora/scheduler/storage/log/WriteAheadStorage.java 89dd8aacafaa3a68afb8d4a0f4a7cba14cfef503
> src/test/java/org/apache/aurora/scheduler/thrift/aop/ForwardingThrift.java a6769e62d61b2851db055e98ee254f707a91d208
> src/test/java/org/apache/aurora/scheduler/thrift/aop/MockDecoratedThrift.java 1415f0cacc694aa7cf0d25e836e764a96fbb8ae2
>
> Diff: https://reviews.apache.org/r/40786/diff/
>
>
> Testing
> -------
>
> Green locally `./build-support/jenkins/build.sh`.
>
> An example of the generated code:
> ```java
> @Generated("uno.perk.forward.apt.Processor")
> class MockDecoratedThriftForwarder implements AnnotatedAuroraAdmin {
> protected final AnnotatedAuroraAdmin annotatedAuroraAdmin;
>
> MockDecoratedThriftForwarder(AnnotatedAuroraAdmin annotatedAuroraAdmin) {
> this.annotatedAuroraAdmin = Objects.requireNonNull(annotatedAuroraAdmin);
> }
>
> @Override
> public Response getRoleSummary() throws TException {
> return this.annotatedAuroraAdmin.getRoleSummary();
> }
> ...
> ```
>
>
> Thanks,
>
> John Sirois
>
>
Re: Review Request 40786: Replace manual Forwarding* with `@Forward`.
Posted by Aurora ReviewBot <wf...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/40786/#review109200
-----------------------------------------------------------
Ship it!
Master (676ee5b) 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 Dec. 7, 2015, 9:55 p.m., John Sirois wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/40786/
> -----------------------------------------------------------
>
> (Updated Dec. 7, 2015, 9:55 p.m.)
>
>
> Review request for Aurora, Bill Farner and Zameer Manji.
>
>
> Repository: aurora
>
>
> Description
> -------
>
> This is a bit of a straw man. While working on
> https://issues.apache.org/jira/browse/AURORA-987 I found the need for
> `javapoet` and this project spun off the side.
>
> See the `@Forward` README here for more info: https://github.com/perkuno/forward
>
> Although I think the end result is desirable, this change does add a
> dependency on a personal project. I fancied up the presentation with a
> custom org, but its still a personal project. I'd be happy enough to
> move the `@Forward` code over to aurora, but it would require a seperate
> gradle module to ensure the annotation processor is compiled ahead of
> the main module that would use it.
>
> So kick the tires and let me know what you think.
>
> build.gradle | 6 +-
> src/main/java/org/apache/aurora/scheduler/storage/ForwardingStore.java | 185 ------------------------------
> src/main/java/org/apache/aurora/scheduler/storage/log/WriteAheadStorage.java | 13 ++-
> src/test/java/org/apache/aurora/scheduler/thrift/aop/ForwardingThrift.java | 309 --------------------------------------------------
> src/test/java/org/apache/aurora/scheduler/thrift/aop/MockDecoratedThrift.java | 5 +-
> 5 files changed, 20 insertions(+), 498 deletions(-)
>
>
> Diffs
> -----
>
> build.gradle a3ff2b747566a38e5ae07db204d0e75da5d3bfb6
> src/main/java/org/apache/aurora/scheduler/storage/ForwardingStore.java b8bd9185cacc6b113b64a13a1b670fac202c795e
> src/main/java/org/apache/aurora/scheduler/storage/log/WriteAheadStorage.java 89dd8aacafaa3a68afb8d4a0f4a7cba14cfef503
> src/test/java/org/apache/aurora/scheduler/thrift/aop/ForwardingThrift.java 2de178302d3c9aa9a7b23a9eb7ecb6e2f3b40819
> src/test/java/org/apache/aurora/scheduler/thrift/aop/MockDecoratedThrift.java 1415f0cacc694aa7cf0d25e836e764a96fbb8ae2
>
> Diff: https://reviews.apache.org/r/40786/diff/
>
>
> Testing
> -------
>
> Green locally `./build-support/jenkins/build.sh`.
>
> An example of the generated code:
> ```java
> @Generated("uno.perk.forward.apt.Processor")
> class MockDecoratedThriftForwarder implements AnnotatedAuroraAdmin {
> protected final AnnotatedAuroraAdmin annotatedAuroraAdmin;
>
> MockDecoratedThriftForwarder(AnnotatedAuroraAdmin annotatedAuroraAdmin) {
> this.annotatedAuroraAdmin = Objects.requireNonNull(annotatedAuroraAdmin);
> }
>
> @Override
> public Response getRoleSummary() throws TException {
> return this.annotatedAuroraAdmin.getRoleSummary();
> }
> ...
> ```
>
>
> Thanks,
>
> John Sirois
>
>
Re: Review Request 40786: Replace manual Forwarding* with `@Forward`.
Posted by John Sirois <jo...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/40786/
-----------------------------------------------------------
(Updated Dec. 7, 2015, 2:55 p.m.)
Review request for Aurora, Bill Farner and Zameer Manji.
Changes
-------
Update to forward-1.0.0 on maven central.
build.gradle | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
Repository: aurora
Description
-------
This is a bit of a straw man. While working on
https://issues.apache.org/jira/browse/AURORA-987 I found the need for
`javapoet` and this project spun off the side.
See the `@Forward` README here for more info: https://github.com/perkuno/forward
Although I think the end result is desirable, this change does add a
dependency on a personal project. I fancied up the presentation with a
custom org, but its still a personal project. I'd be happy enough to
move the `@Forward` code over to aurora, but it would require a seperate
gradle module to ensure the annotation processor is compiled ahead of
the main module that would use it.
So kick the tires and let me know what you think.
build.gradle | 6 +-
src/main/java/org/apache/aurora/scheduler/storage/ForwardingStore.java | 185 ------------------------------
src/main/java/org/apache/aurora/scheduler/storage/log/WriteAheadStorage.java | 13 ++-
src/test/java/org/apache/aurora/scheduler/thrift/aop/ForwardingThrift.java | 309 --------------------------------------------------
src/test/java/org/apache/aurora/scheduler/thrift/aop/MockDecoratedThrift.java | 5 +-
5 files changed, 20 insertions(+), 498 deletions(-)
Diffs (updated)
-----
build.gradle a3ff2b747566a38e5ae07db204d0e75da5d3bfb6
src/main/java/org/apache/aurora/scheduler/storage/ForwardingStore.java b8bd9185cacc6b113b64a13a1b670fac202c795e
src/main/java/org/apache/aurora/scheduler/storage/log/WriteAheadStorage.java 89dd8aacafaa3a68afb8d4a0f4a7cba14cfef503
src/test/java/org/apache/aurora/scheduler/thrift/aop/ForwardingThrift.java 2de178302d3c9aa9a7b23a9eb7ecb6e2f3b40819
src/test/java/org/apache/aurora/scheduler/thrift/aop/MockDecoratedThrift.java 1415f0cacc694aa7cf0d25e836e764a96fbb8ae2
Diff: https://reviews.apache.org/r/40786/diff/
Testing
-------
Green locally `./build-support/jenkins/build.sh`.
An example of the generated code:
```java
@Generated("uno.perk.forward.apt.Processor")
class MockDecoratedThriftForwarder implements AnnotatedAuroraAdmin {
protected final AnnotatedAuroraAdmin annotatedAuroraAdmin;
MockDecoratedThriftForwarder(AnnotatedAuroraAdmin annotatedAuroraAdmin) {
this.annotatedAuroraAdmin = Objects.requireNonNull(annotatedAuroraAdmin);
}
@Override
public Response getRoleSummary() throws TException {
return this.annotatedAuroraAdmin.getRoleSummary();
}
...
```
Thanks,
John Sirois
Re: Review Request 40786: Replace manual Forwarding* with `@Forward`.
Posted by Bill Farner <wf...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/40786/#review108322
-----------------------------------------------------------
Ship it!
I have to admit i have a bit of a visceral negative reaction to what appears as additional build complexity. However, this type of annotation processing is well-charted territory. I'm happy to try this out, since we're not coupling ourselves and backing out is easy.
- Bill Farner
On Nov. 30, 2015, 7:05 a.m., John Sirois wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/40786/
> -----------------------------------------------------------
>
> (Updated Nov. 30, 2015, 7:05 a.m.)
>
>
> Review request for Aurora, Bill Farner and Zameer Manji.
>
>
> Repository: aurora
>
>
> Description
> -------
>
> This is a bit of a straw man. While working on
> https://issues.apache.org/jira/browse/AURORA-987 I found the need for
> `javapoet` and this project spun off the side.
>
> See the `@Forward` README here for more info: https://github.com/perkuno/forward
>
> Although I think the end result is desirable, this change does add a
> dependency on a personal project. I fancied up the presentation with a
> custom org, but its still a personal project. I'd be happy enough to
> move the `@Forward` code over to aurora, but it would require a seperate
> gradle module to ensure the annotation processor is compiled ahead of
> the main module that would use it.
>
> So kick the tires and let me know what you think.
>
> build.gradle | 6 +-
> src/main/java/org/apache/aurora/scheduler/storage/ForwardingStore.java | 185 ------------------------------
> src/main/java/org/apache/aurora/scheduler/storage/log/WriteAheadStorage.java | 13 ++-
> src/test/java/org/apache/aurora/scheduler/thrift/aop/ForwardingThrift.java | 309 --------------------------------------------------
> src/test/java/org/apache/aurora/scheduler/thrift/aop/MockDecoratedThrift.java | 5 +-
> 5 files changed, 20 insertions(+), 498 deletions(-)
>
>
> Diffs
> -----
>
> build.gradle a3ff2b747566a38e5ae07db204d0e75da5d3bfb6
> src/main/java/org/apache/aurora/scheduler/storage/ForwardingStore.java b8bd9185cacc6b113b64a13a1b670fac202c795e
> src/main/java/org/apache/aurora/scheduler/storage/log/WriteAheadStorage.java 89dd8aacafaa3a68afb8d4a0f4a7cba14cfef503
> src/test/java/org/apache/aurora/scheduler/thrift/aop/ForwardingThrift.java a6769e62d61b2851db055e98ee254f707a91d208
> src/test/java/org/apache/aurora/scheduler/thrift/aop/MockDecoratedThrift.java 1415f0cacc694aa7cf0d25e836e764a96fbb8ae2
>
> Diff: https://reviews.apache.org/r/40786/diff/
>
>
> Testing
> -------
>
> Green locally `./build-support/jenkins/build.sh`.
>
> An example of the generated code:
> ```java
> @Generated("uno.perk.forward.apt.Processor")
> class MockDecoratedThriftForwarder implements AnnotatedAuroraAdmin {
> protected final AnnotatedAuroraAdmin annotatedAuroraAdmin;
>
> MockDecoratedThriftForwarder(AnnotatedAuroraAdmin annotatedAuroraAdmin) {
> this.annotatedAuroraAdmin = Objects.requireNonNull(annotatedAuroraAdmin);
> }
>
> @Override
> public Response getRoleSummary() throws TException {
> return this.annotatedAuroraAdmin.getRoleSummary();
> }
> ...
> ```
>
>
> Thanks,
>
> John Sirois
>
>
Re: Review Request 40786: Replace manual Forwarding* with `@Forward`.
Posted by Zameer Manji <zm...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/40786/#review109182
-----------------------------------------------------------
Ship it!
This seems to be a minor change that we can reverse and it does remove boilerplate code.
- Zameer Manji
On Nov. 30, 2015, 7:05 a.m., John Sirois wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/40786/
> -----------------------------------------------------------
>
> (Updated Nov. 30, 2015, 7:05 a.m.)
>
>
> Review request for Aurora, Bill Farner and Zameer Manji.
>
>
> Repository: aurora
>
>
> Description
> -------
>
> This is a bit of a straw man. While working on
> https://issues.apache.org/jira/browse/AURORA-987 I found the need for
> `javapoet` and this project spun off the side.
>
> See the `@Forward` README here for more info: https://github.com/perkuno/forward
>
> Although I think the end result is desirable, this change does add a
> dependency on a personal project. I fancied up the presentation with a
> custom org, but its still a personal project. I'd be happy enough to
> move the `@Forward` code over to aurora, but it would require a seperate
> gradle module to ensure the annotation processor is compiled ahead of
> the main module that would use it.
>
> So kick the tires and let me know what you think.
>
> build.gradle | 6 +-
> src/main/java/org/apache/aurora/scheduler/storage/ForwardingStore.java | 185 ------------------------------
> src/main/java/org/apache/aurora/scheduler/storage/log/WriteAheadStorage.java | 13 ++-
> src/test/java/org/apache/aurora/scheduler/thrift/aop/ForwardingThrift.java | 309 --------------------------------------------------
> src/test/java/org/apache/aurora/scheduler/thrift/aop/MockDecoratedThrift.java | 5 +-
> 5 files changed, 20 insertions(+), 498 deletions(-)
>
>
> Diffs
> -----
>
> build.gradle a3ff2b747566a38e5ae07db204d0e75da5d3bfb6
> src/main/java/org/apache/aurora/scheduler/storage/ForwardingStore.java b8bd9185cacc6b113b64a13a1b670fac202c795e
> src/main/java/org/apache/aurora/scheduler/storage/log/WriteAheadStorage.java 89dd8aacafaa3a68afb8d4a0f4a7cba14cfef503
> src/test/java/org/apache/aurora/scheduler/thrift/aop/ForwardingThrift.java a6769e62d61b2851db055e98ee254f707a91d208
> src/test/java/org/apache/aurora/scheduler/thrift/aop/MockDecoratedThrift.java 1415f0cacc694aa7cf0d25e836e764a96fbb8ae2
>
> Diff: https://reviews.apache.org/r/40786/diff/
>
>
> Testing
> -------
>
> Green locally `./build-support/jenkins/build.sh`.
>
> An example of the generated code:
> ```java
> @Generated("uno.perk.forward.apt.Processor")
> class MockDecoratedThriftForwarder implements AnnotatedAuroraAdmin {
> protected final AnnotatedAuroraAdmin annotatedAuroraAdmin;
>
> MockDecoratedThriftForwarder(AnnotatedAuroraAdmin annotatedAuroraAdmin) {
> this.annotatedAuroraAdmin = Objects.requireNonNull(annotatedAuroraAdmin);
> }
>
> @Override
> public Response getRoleSummary() throws TException {
> return this.annotatedAuroraAdmin.getRoleSummary();
> }
> ...
> ```
>
>
> Thanks,
>
> John Sirois
>
>
Re: Review Request 40786: Replace manual Forwarding* with `@Forward`.
Posted by John Sirois <jo...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/40786/
-----------------------------------------------------------
(Updated Nov. 30, 2015, 8:05 a.m.)
Review request for Aurora, Bill Farner and Zameer Manji.
Changes
-------
Update to forward-1.0.0 on maven central.
build.gradle | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
Repository: aurora
Description (updated)
-------
This is a bit of a straw man. While working on
https://issues.apache.org/jira/browse/AURORA-987 I found the need for
`javapoet` and this project spun off the side.
See the `@Forward` README here for more info: https://github.com/perkuno/forward
Although I think the end result is desirable, this change does add a
dependency on a personal project. I fancied up the presentation with a
custom org, but its still a personal project. I'd be happy enough to
move the `@Forward` code over to aurora, but it would require a seperate
gradle module to ensure the annotation processor is compiled ahead of
the main module that would use it.
So kick the tires and let me know what you think.
build.gradle | 6 +-
src/main/java/org/apache/aurora/scheduler/storage/ForwardingStore.java | 185 ------------------------------
src/main/java/org/apache/aurora/scheduler/storage/log/WriteAheadStorage.java | 13 ++-
src/test/java/org/apache/aurora/scheduler/thrift/aop/ForwardingThrift.java | 309 --------------------------------------------------
src/test/java/org/apache/aurora/scheduler/thrift/aop/MockDecoratedThrift.java | 5 +-
5 files changed, 20 insertions(+), 498 deletions(-)
Diffs (updated)
-----
build.gradle a3ff2b747566a38e5ae07db204d0e75da5d3bfb6
src/main/java/org/apache/aurora/scheduler/storage/ForwardingStore.java b8bd9185cacc6b113b64a13a1b670fac202c795e
src/main/java/org/apache/aurora/scheduler/storage/log/WriteAheadStorage.java 89dd8aacafaa3a68afb8d4a0f4a7cba14cfef503
src/test/java/org/apache/aurora/scheduler/thrift/aop/ForwardingThrift.java a6769e62d61b2851db055e98ee254f707a91d208
src/test/java/org/apache/aurora/scheduler/thrift/aop/MockDecoratedThrift.java 1415f0cacc694aa7cf0d25e836e764a96fbb8ae2
Diff: https://reviews.apache.org/r/40786/diff/
Testing
-------
Green locally `./build-support/jenkins/build.sh`.
An example of the generated code:
```java
@Generated("uno.perk.forward.apt.Processor")
class MockDecoratedThriftForwarder implements AnnotatedAuroraAdmin {
protected final AnnotatedAuroraAdmin annotatedAuroraAdmin;
MockDecoratedThriftForwarder(AnnotatedAuroraAdmin annotatedAuroraAdmin) {
this.annotatedAuroraAdmin = Objects.requireNonNull(annotatedAuroraAdmin);
}
@Override
public Response getRoleSummary() throws TException {
return this.annotatedAuroraAdmin.getRoleSummary();
}
...
```
Thanks,
John Sirois
Re: Review Request 40786: Replace manual Forwarding* with `@Forward`.
Posted by Aurora ReviewBot <wf...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/40786/#review108274
-----------------------------------------------------------
Ship it!
Master (8524dbf) 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 Nov. 29, 2015, 7:41 p.m., John Sirois wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/40786/
> -----------------------------------------------------------
>
> (Updated Nov. 29, 2015, 7:41 p.m.)
>
>
> Review request for Aurora, Bill Farner and Zameer Manji.
>
>
> Repository: aurora
>
>
> Description
> -------
>
> This is a bit of a straw man. While working on
> https://issues.apache.org/jira/browse/AURORA-987 I found the need for
> `javapoet` and this project spun off the side.
>
> See the `@Forward` README here for more info: https://github.com/perkuno/forward
>
> Although I think the end result is desirable, this change does add a
> dependency on a personal project. I fancied up the presentation with a
> custom org, but its still a personal project. I'd be happy enough to
> move the `@Forward` code over to aurora, but it would require a seperate
> gradle module to ensure the annotation processor is compiled ahead of
> the main module that would use it.
>
> So kick the tires and let me know what you think. The artifact will be
> official on maven central within a few hours of this ticket being
> resolved: https://issues.sonatype.org/browse/OSSRH-19139, at which point
> the custom maven repo in `build.gradle` could go and the rev could be
> bumped to `1.0.0`
>
> build.gradle | 6 +-
> src/main/java/org/apache/aurora/scheduler/storage/ForwardingStore.java | 185 ------------------------------
> src/main/java/org/apache/aurora/scheduler/storage/log/WriteAheadStorage.java | 13 ++-
> src/test/java/org/apache/aurora/scheduler/thrift/aop/ForwardingThrift.java | 309 --------------------------------------------------
> src/test/java/org/apache/aurora/scheduler/thrift/aop/MockDecoratedThrift.java | 5 +-
> 5 files changed, 20 insertions(+), 498 deletions(-)
>
>
> Diffs
> -----
>
> build.gradle a3ff2b747566a38e5ae07db204d0e75da5d3bfb6
> src/main/java/org/apache/aurora/scheduler/storage/ForwardingStore.java b8bd9185cacc6b113b64a13a1b670fac202c795e
> src/main/java/org/apache/aurora/scheduler/storage/log/WriteAheadStorage.java 89dd8aacafaa3a68afb8d4a0f4a7cba14cfef503
> src/test/java/org/apache/aurora/scheduler/thrift/aop/ForwardingThrift.java a6769e62d61b2851db055e98ee254f707a91d208
> src/test/java/org/apache/aurora/scheduler/thrift/aop/MockDecoratedThrift.java 1415f0cacc694aa7cf0d25e836e764a96fbb8ae2
>
> Diff: https://reviews.apache.org/r/40786/diff/
>
>
> Testing
> -------
>
> Green locally `./build-support/jenkins/build.sh`.
>
> An example of the generated code:
> ```java
> @Generated("uno.perk.forward.apt.Processor")
> class MockDecoratedThriftForwarder implements AnnotatedAuroraAdmin {
> protected final AnnotatedAuroraAdmin annotatedAuroraAdmin;
>
> MockDecoratedThriftForwarder(AnnotatedAuroraAdmin annotatedAuroraAdmin) {
> this.annotatedAuroraAdmin = Objects.requireNonNull(annotatedAuroraAdmin);
> }
>
> @Override
> public Response getRoleSummary() throws TException {
> return this.annotatedAuroraAdmin.getRoleSummary();
> }
> ...
> ```
>
>
> Thanks,
>
> John Sirois
>
>