[jira] [Commented] (BEAM-1205) Auto set "enableAbandonedNodeEnforcement" in TestPipeline

2017-02-16 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/BEAM-1205?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15869603#comment-15869603
 ] 

ASF GitHub Bot commented on BEAM-1205:
--

Github user asfgit closed the pull request at:

https://github.com/apache/beam/pull/1706


> Auto set "enableAbandonedNodeEnforcement" in TestPipeline
> -
>
> Key: BEAM-1205
> URL: https://issues.apache.org/jira/browse/BEAM-1205
> Project: Beam
>  Issue Type: Improvement
>  Components: sdk-java-core
>Reporter: Stas Levin
>Assignee: Stas Levin
>
> At the moment one has to manually set 
> {{enableAbandonedNodeEnforcement(false)}} in tests that do not run the 
> TestPipeline, otherwise one gets an {{AbandonedNodeException}} on account of 
> having nodes that were not run.
> This could probably be auto detected using the {{RunnableOnService}} and 
> {{NeedsRunner}} annotations, the presence of which indicates a given test 
> does indeed use a runner. 
> Essentially we need to check if {{RunnableOnService}} / {{NeedsRunner}} are 
> present on a given test and if so set 
> {{enableAbandonedNodeEnforcement(true)}}, otherwise set 
> {{enableAbandonedNodeEnforcement(false)}}.
> [~tgroh], [~kenn]



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (BEAM-1205) Auto set "enableAbandonedNodeEnforcement" in TestPipeline

2016-12-28 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/BEAM-1205?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15782905#comment-15782905
 ] 

ASF GitHub Bot commented on BEAM-1205:
--

GitHub user staslev opened a pull request:

https://github.com/apache/beam/pull/1706

[BEAM-1205] Auto set "enableAbandonedNodeEnforcement" in TestPipeline

Be sure to do all of the following to help us incorporate your contribution
quickly and easily:

 - [ ] Make sure the PR title is formatted like:
   `[BEAM-] Description of pull request`
 - [ ] Make sure tests pass via `mvn clean verify`. (Even better, enable
   Travis-CI on your fork and ensure the whole test matrix passes).
 - [ ] Replace `` in the title with the actual Jira issue
   number, if there is one.
 - [ ] If this contribution is large, please file an Apache
   [Individual Contributor License 
Agreement](https://www.apache.org/licenses/icla.txt).

---

R: @tgroh , @kennknowles 

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/staslev/incubator-beam 
BEAM-1205-auto-set-enableAbandonedNodeEnforcement-in-TestPipeline

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/beam/pull/1706.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #1706


commit d3b3a53a7c8e1d9d63488e5b39f19b346ca95808
Author: Stas Levin 
Date:   2016-12-22T17:13:01Z

[BEAM-1205] Auto set "enableAbandonedNodeEnforcement" in TestPipeline




> Auto set "enableAbandonedNodeEnforcement" in TestPipeline
> -
>
> Key: BEAM-1205
> URL: https://issues.apache.org/jira/browse/BEAM-1205
> Project: Beam
>  Issue Type: Improvement
>  Components: sdk-java-core
>Reporter: Stas Levin
>Assignee: Stas Levin
>
> At the moment one has to manually set 
> {{enableAbandonedNodeEnforcement(false)}} in tests that do not run the 
> TestPipeline, otherwise one gets an {{AbandonedNodeException}} on account of 
> having nodes that were not run.
> This could probably be auto detected using the {{RunnableOnService}} and 
> {{NeedsRunner}} annotations, the presence of which indicates a given test 
> does indeed use a runner. 
> Essentially we need to check if {{RunnableOnService}} / {{NeedsRunner}} are 
> present on a given test and if so set 
> {{enableAbandonedNodeEnforcement(true)}}, otherwise set 
> {{enableAbandonedNodeEnforcement(false)}}.
> [~tgroh], [~kenn]



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (BEAM-1205) Auto set "enableAbandonedNodeEnforcement" in TestPipeline

2016-12-22 Thread Stas Levin (JIRA)

[ 
https://issues.apache.org/jira/browse/BEAM-1205?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15770694#comment-15770694
 ] 

Stas Levin commented on BEAM-1205:
--

If we leave the current behavior as is, and only add the bit that does:

{code:java}
if (!sCrashingRunner || needsRunner || runnableOnService) {
  enableAbandonedNodeEnforcement(true);
}
{code}

We'll be at least as safe as before, and sdk tests having {{RunnableOnService}} 
or {{NeedsRunner}} will not have to fiddle with 
{{enableAbandonedNodeEnforcement(false/true)}}.

Am I missing something?

> Auto set "enableAbandonedNodeEnforcement" in TestPipeline
> -
>
> Key: BEAM-1205
> URL: https://issues.apache.org/jira/browse/BEAM-1205
> Project: Beam
>  Issue Type: Improvement
>  Components: sdk-java-core
>Reporter: Stas Levin
>Assignee: Stas Levin
>
> At the moment one has to manually set 
> {{enableAbandonedNodeEnforcement(false)}} in tests that do not run the 
> TestPipeline, otherwise one gets an {{AbandonedNodeException}} on account of 
> having nodes that were not run.
> This could probably be auto detected using the {{RunnableOnService}} 
> annotation, the presence of which indicates a given test does indeed use a 
> runner. 
> Essentially we need to check if {{RunnableOnService}} is present on a given 
> test and if so set {{enableAbandonedNodeEnforcement(true)}}, otherwise set 
> {{enableAbandonedNodeEnforcement(false)}}.
> [~tgroh], [~kenn]



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (BEAM-1205) Auto set "enableAbandonedNodeEnforcement" in TestPipeline

2016-12-22 Thread Thomas Groh (JIRA)

[ 
https://issues.apache.org/jira/browse/BEAM-1205?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15770623#comment-15770623
 ] 

Thomas Groh commented on BEAM-1205:
---

If a user fails to include the {{DirectRunner}} on the classpath, we'll default 
to {{CrashingRunner}} - if they also forget to call {{Pipeline.run()}}, the 
{{TestPipeline}} won't crash, nor will the {{CrashingRunner}} - I'm not sure if 
this is something we want to defend against, as that would have to be the case 
for all of their tests (but if they never added {{Pipeline.run()}}, the tests 
will all pass vacuously - which is dangerous)

> Auto set "enableAbandonedNodeEnforcement" in TestPipeline
> -
>
> Key: BEAM-1205
> URL: https://issues.apache.org/jira/browse/BEAM-1205
> Project: Beam
>  Issue Type: Improvement
>  Components: sdk-java-core
>Reporter: Stas Levin
>Assignee: Stas Levin
>
> At the moment one has to manually set 
> {{enableAbandonedNodeEnforcement(false)}} in tests that do not run the 
> TestPipeline, otherwise one gets an {{AbandonedNodeException}} on account of 
> having nodes that were not run.
> This could probably be auto detected using the {{RunnableOnService}} 
> annotation, the presence of which indicates a given test does indeed use a 
> runner. 
> Essentially we need to check if {{RunnableOnService}} is present on a given 
> test and if so set {{enableAbandonedNodeEnforcement(true)}}, otherwise set 
> {{enableAbandonedNodeEnforcement(false)}}.
> [~tgroh], [~kenn]



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (BEAM-1205) Auto set "enableAbandonedNodeEnforcement" in TestPipeline

2016-12-22 Thread Stas Levin (JIRA)

[ 
https://issues.apache.org/jira/browse/BEAM-1205?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15770602#comment-15770602
 ] 

Stas Levin commented on BEAM-1205:
--

I see, thanks for commenting.

So {{if (!sCrashingRunner || needsRunner || runnableOnService)}} we can 
activate the enforcement by default, right?
What use cases can you think of that are not covered and require checking the 
package prefix?

> Auto set "enableAbandonedNodeEnforcement" in TestPipeline
> -
>
> Key: BEAM-1205
> URL: https://issues.apache.org/jira/browse/BEAM-1205
> Project: Beam
>  Issue Type: Improvement
>  Components: sdk-java-core
>Reporter: Stas Levin
>Assignee: Stas Levin
>
> At the moment one has to manually set 
> {{enableAbandonedNodeEnforcement(false)}} in tests that do not run the 
> TestPipeline, otherwise one gets an {{AbandonedNodeException}} on account of 
> having nodes that were not run.
> This could probably be auto detected using the {{RunnableOnService}} 
> annotation, the presence of which indicates a given test does indeed use a 
> runner. 
> Essentially we need to check if {{RunnableOnService}} is present on a given 
> test and if so set {{enableAbandonedNodeEnforcement(true)}}, otherwise set 
> {{enableAbandonedNodeEnforcement(false)}}.
> [~tgroh], [~kenn]



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (BEAM-1205) Auto set "enableAbandonedNodeEnforcement" in TestPipeline

2016-12-22 Thread Thomas Groh (JIRA)

[ 
https://issues.apache.org/jira/browse/BEAM-1205?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15770573#comment-15770573
 ] 

Thomas Groh commented on BEAM-1205:
---

I really like this idea, but there are a couple of things we should make sure 
we understand before making this change.

Within the core SDK, this will remove some fiddlyness of using {{TestPipeline}} 
for construction-based tests. However, we don't expect users to annotate their 
tests with {{RunnableOnService}}, so setting to false if the annotation is not 
present is not idea. Instead, we can do something with checking to see if the 
current runner is {{CrashingRunner}}, and check that the package prefix is 
{{org.apache.beam}} (which, admittedly, is somewhat fragile; I'd love other 
ideas). This might require a little more investigation.

> Auto set "enableAbandonedNodeEnforcement" in TestPipeline
> -
>
> Key: BEAM-1205
> URL: https://issues.apache.org/jira/browse/BEAM-1205
> Project: Beam
>  Issue Type: Improvement
>  Components: sdk-java-core
>Reporter: Stas Levin
>Assignee: Stas Levin
>
> At the moment one has to manually set 
> {{enableAbandonedNodeEnforcement(false)}} in tests that do not run the 
> TestPipeline, otherwise one gets an {{AbandonedNodeException}} on account of 
> having nodes that were not run.
> This could probably be auto detected using the {{RunnableOnService}} 
> annotation, the presence of which indicates a given test does indeed use a 
> runner. 
> Essentially we need to check if {{RunnableOnService}} is present on a given 
> test and if so set {{enableAbandonedNodeEnforcement(true)}}, otherwise set 
> {{enableAbandonedNodeEnforcement(false)}}.
> [~tgroh], [~kenn]



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)