Skip to content

[SPARK-23044] Error handling for jira assignment #20236

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 6 commits into from

Conversation

squito
Copy link
Contributor

@squito squito commented Jan 11, 2018

What changes were proposed in this pull request?

  • If there is any error while trying to assign the jira, prompt again
  • Filter out the "Apache Spark" choice
  • allow arbitrary user ids to be entered

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.

@squito
Copy link
Contributor Author

squito commented Jan 11, 2018

@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.

Copy link
Member

@srowen srowen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that's about all we can do here. I'm not sure if there's an API for the /roles screen, and adding the user as a contributor, but it's rare enough that it's OK to handle manually.

@vanzin
Copy link
Contributor

vanzin commented Jan 11, 2018

Since you're here, would you like to try at add SPARK-23031 to this change?

@SparkQA
Copy link

SparkQA commented Jan 11, 2018

Test build #85973 has finished for PR 20236 at commit 8c4cc61.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@squito
Copy link
Contributor Author

squito commented Jan 11, 2018

@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

@vanzin
Copy link
Contributor

vanzin commented Jan 11, 2018

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.)

@jerryshao
Copy link
Contributor

@squito thanks for the fix. I also don't have PRs to verify the changes, but I think catching exception should be enough.

@SparkQA
Copy link

SparkQA commented Jan 16, 2018

Test build #86185 has finished for PR 20236 at commit 4d40b97.

  • This patch fails Python style tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Jan 16, 2018

Test build #86186 has finished for PR 20236 at commit 7151cf0.

  • This patch fails Python style tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@squito
Copy link
Contributor Author

squito commented Jan 16, 2018

@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

Copy link
Contributor

@vanzin vanzin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good but you have some style check failures.

id = int(raw_assignee)
assignee = candidates[id]
except:
# assume its a user id, and try to assign (might fail, then we just prompt again)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's

@SparkQA
Copy link

SparkQA commented Jan 16, 2018

Test build #86194 has finished for PR 20236 at commit 4ab1202.

  • This patch fails Python style tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Jan 17, 2018

Test build #86197 has finished for PR 20236 at commit 626dd47.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@vanzin
Copy link
Contributor

vanzin commented Jan 17, 2018

Merging to master.

@asfgit asfgit closed this in 5ae3333 Jan 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants