You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by squito <gi...@git.apache.org> on 2018/01/11 15:46:59 UTC

[GitHub] spark pull request #20236: [SPARK-23044] Error handling for jira assignment

GitHub user squito opened a pull request:

    https://github.com/apache/spark/pull/20236

    [SPARK-23044] Error handling for jira assignment

    ## What changes were proposed in this pull request?
    
    In case the selected user isn't a contributor yet, or any other unexpected error, just don't assign the jira.
    
    ## How was this patch tested?
    
    Couldn't really test the error case, just some testing of similar-ish code in python shell.  Haven't run a merge yet.

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

    $ git pull https://github.com/squito/spark SPARK-23044

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

    https://github.com/apache/spark/pull/20236.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 #20236
    
----
commit 8c4cc61c2a06b310480fafb3b28067a6f961816a
Author: Imran Rashid <ir...@...>
Date:   2018-01-11T15:42:16Z

    [SPARK-23044] Error handling for jira assignment

----


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #20236: [SPARK-23044] Error handling for jira assignment

Posted by squito <gi...@git.apache.org>.
Github user squito commented on the issue:

    https://github.com/apache/spark/pull/20236
  
    @vanzin what exactly are you looking for?  The one thing which would be easy is letting you write in an arbitrary jira id (no name searching or anything), that sound OK?
    
    I guess this bug isn't really a major issue so no urgency in getting this in, so I can add to this


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #20236: [SPARK-23044] Error handling for jira assignment

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/20236
  
    **[Test build #86185 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/86185/testReport)** for PR 20236 at commit [`4d40b97`](https://github.com/apache/spark/commit/4d40b973003703da10565b228b98607ca2959352).


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #20236: [SPARK-23044] Error handling for jira assignment

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/20236
  
    **[Test build #86185 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/86185/testReport)** for PR 20236 at commit [`4d40b97`](https://github.com/apache/spark/commit/4d40b973003703da10565b228b98607ca2959352).
     * This patch **fails Python style tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #20236: [SPARK-23044] Error handling for jira assignment

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/20236
  
    Merged build finished. Test FAILed.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #20236: [SPARK-23044] Error handling for jira assignment

Posted by jerryshao <gi...@git.apache.org>.
Github user jerryshao commented on the issue:

    https://github.com/apache/spark/pull/20236
  
    @squito thanks for the fix. I also don't have PRs to verify the changes, but I think catching exception should be enough.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #20236: [SPARK-23044] Error handling for jira assignment

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/20236
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/85973/
    Test PASSed.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #20236: [SPARK-23044] Error handling for jira assignment

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/20236
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/86186/
    Test FAILed.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #20236: [SPARK-23044] Error handling for jira assignment

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/20236
  
    Merged build finished. Test FAILed.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #20236: [SPARK-23044] Error handling for jira assignment

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/20236
  
    **[Test build #86197 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/86197/testReport)** for PR 20236 at commit [`626dd47`](https://github.com/apache/spark/commit/626dd47f7d59fca01e9fceb1e6455405ce57a6f5).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #20236: [SPARK-23044] Error handling for jira assignment

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/20236
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/86185/
    Test FAILed.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #20236: [SPARK-23044] Error handling for jira assignment

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/20236
  
    **[Test build #86186 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/86186/testReport)** for PR 20236 at commit [`7151cf0`](https://github.com/apache/spark/commit/7151cf0e6ca47208393c3fbbe279c8c687df90d0).
     * This patch **fails Python style tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #20236: [SPARK-23044] Error handling for jira assignment

Posted by vanzin <gi...@git.apache.org>.
Github user vanzin commented on the issue:

    https://github.com/apache/spark/pull/20236
  
    Yeah, arbitrary name is fine. I tried it yesterday and the script just yelled at me because it was not an integer. (Filtering out "Apache Spark" is bonus.)


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #20236: [SPARK-23044] Error handling for jira assignment

Posted by squito <gi...@git.apache.org>.
Github user squito commented on the issue:

    https://github.com/apache/spark/pull/20236
  
    @vanzin @jerryshao want to take another look?
    
    Now it
    * filters out "apache spark"
    * lets you enter an arbitrary id
    * if there's an error, just prompts again
    
    sample session: https://gist.github.com/squito/de73fbd0b9c00961377068b91283e04c


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #20236: [SPARK-23044] Error handling for jira assignment

Posted by vanzin <gi...@git.apache.org>.
Github user vanzin commented on the issue:

    https://github.com/apache/spark/pull/20236
  
    Merging to master.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #20236: [SPARK-23044] Error handling for jira assignment

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/20236
  
    **[Test build #86197 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/86197/testReport)** for PR 20236 at commit [`626dd47`](https://github.com/apache/spark/commit/626dd47f7d59fca01e9fceb1e6455405ce57a6f5).


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #20236: [SPARK-23044] Error handling for jira assignment

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/20236
  
    **[Test build #86186 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/86186/testReport)** for PR 20236 at commit [`7151cf0`](https://github.com/apache/spark/commit/7151cf0e6ca47208393c3fbbe279c8c687df90d0).


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #20236: [SPARK-23044] Error handling for jira assignment

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/20236
  
    **[Test build #86194 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/86194/testReport)** for PR 20236 at commit [`4ab1202`](https://github.com/apache/spark/commit/4ab1202b5cde156df9746c688f15008309f482f9).
     * This patch **fails Python style tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #20236: [SPARK-23044] Error handling for jira assignment

Posted by squito <gi...@git.apache.org>.
Github user squito commented on the issue:

    https://github.com/apache/spark/pull/20236
  
    @jerryshao this should fix it, but I don't have anything to merge to test this out -- would appreciate if someone could try it before we merge.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #20236: [SPARK-23044] Error handling for jira assignment

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/20236
  
    Merged build finished. Test PASSed.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #20236: [SPARK-23044] Error handling for jira assignment

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/20236
  
    Merged build finished. Test PASSed.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #20236: [SPARK-23044] Error handling for jira assignment

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/20236
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/86197/
    Test PASSed.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #20236: [SPARK-23044] Error handling for jira assignment

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/20236
  
    **[Test build #86194 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/86194/testReport)** for PR 20236 at commit [`4ab1202`](https://github.com/apache/spark/commit/4ab1202b5cde156df9746c688f15008309f482f9).


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request #20236: [SPARK-23044] Error handling for jira assignment

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/spark/pull/20236


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #20236: [SPARK-23044] Error handling for jira assignment

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/20236
  
    **[Test build #85973 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/85973/testReport)** for PR 20236 at commit [`8c4cc61`](https://github.com/apache/spark/commit/8c4cc61c2a06b310480fafb3b28067a6f961816a).


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #20236: [SPARK-23044] Error handling for jira assignment

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/20236
  
    Merged build finished. Test FAILed.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #20236: [SPARK-23044] Error handling for jira assignment

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/20236
  
    **[Test build #85973 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/85973/testReport)** for PR 20236 at commit [`8c4cc61`](https://github.com/apache/spark/commit/8c4cc61c2a06b310480fafb3b28067a6f961816a).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #20236: [SPARK-23044] Error handling for jira assignment

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/20236
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/86194/
    Test FAILed.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #20236: [SPARK-23044] Error handling for jira assignment

Posted by vanzin <gi...@git.apache.org>.
Github user vanzin commented on the issue:

    https://github.com/apache/spark/pull/20236
  
    Since you're here, would you like to try at add SPARK-23031 to this change?


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request #20236: [SPARK-23044] Error handling for jira assignment

Posted by vanzin <gi...@git.apache.org>.
Github user vanzin commented on a diff in the pull request:

    https://github.com/apache/spark/pull/20236#discussion_r161857471
  
    --- Diff: dev/merge_spark_pr.py ---
    @@ -298,24 +299,36 @@ def choose_jira_assignee(issue, asf_jira):
         Prompt the user to choose who to assign the issue to in jira, given a list of candidates,
         including the original reporter and all commentors
         """
    -    reporter = issue.fields.reporter
    -    commentors = map(lambda x: x.author, issue.fields.comment.comments)
    -    candidates = set(commentors)
    -    candidates.add(reporter)
    -    candidates = list(candidates)
    -    print("JIRA is unassigned, choose assignee")
    -    for idx, author in enumerate(candidates):
    -        annotations = ["Reporter"] if author == reporter else []
    -        if author in commentors:
    -            annotations.append("Commentor")
    -        print("[%d] %s (%s)" % (idx, author.displayName, ",".join(annotations)))
    -    assignee = raw_input("Enter number of user to assign to (blank to leave unassigned):")
    -    if assignee == "":
    -        return None
    -    else:
    -        assignee = candidates[int(assignee)]
    -        asf_jira.assign_issue(issue.key, assignee.key)
    -        return assignee
    +    while True:
    +        try:
    +            reporter = issue.fields.reporter
    +            commentors = map(lambda x: x.author, issue.fields.comment.comments)
    +            candidates = set(commentors)
    +            candidates.add(reporter)
    +            candidates = list(candidates)
    +            print("JIRA is unassigned, choose assignee")
    +            for idx, author in enumerate(candidates):
    +                if author.key == "apachespark":
    +                  continue
    +                annotations = ["Reporter"] if author == reporter else []
    +                if author in commentors:
    +                    annotations.append("Commentor")
    +                print("[%d] %s (%s)" % (idx, author.displayName, ",".join(annotations)))
    +            raw_assignee = raw_input("Enter number of user, or userid,  to assign to (blank to leave unassigned):")
    +            if raw_assignee == "":
    +                return None
    +            else:
    +                try:
    +                  id = int(raw_assignee)
    +                  assignee = candidates[id]
    +                except:
    +                  # assume its a user id, and try to assign (might fail, then we just prompt again)
    --- End diff --
    
    it's


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org