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
ARROW-11804: [Developer] Offer to create JIRA issue #9598
Conversation
I think this is a good idea, if feels mechanical :). Piggybacking a bit on this on communications in general. I find the level of entry (asides from PRs quite high). In the past I've asked something on the mailing list and on a JIRA issue and did not get any response. Is there at any time something considered as a chat/ discussions forum like gitter or github discussions? |
@jorgecarleitao has mentioned something about that as well. I personally find it hard to keep up with the firehose of updates across the various channels of (PR, JIRA, mailing list) and so I spend most of my efforts / time in github as that is where the code lives. |
I would agree that a discord channel would be easier to follow than the mailing list. It would also help new contributors to get familiar and ask questions that may take a lot of time to answer in the mailing list |
@ritchie46 and @elferherrera , I agree with you. Arrow did have a slack channel, but that was closed. See rational here: https://mail-archives.apache.org/mod_mbox/arrow-dev/201806.mbox/%3cCAJPUwMDyiZfXUWdW1Mk7UwKbbvd--Dws6oOVqjBF3ZadTmXTGg@mail.gmail.com%3e . I suggest that you raise that in the mailing list so that we keep this discussion focused on JIRA's burden. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- When should we set assignee?
- It may be useful that we have a mode or separated tool just doing this. If we can do this before merge stage, we can sync all discussions after running this feature into the associated JIRA issue.
# Return the best matching JIRA component from a PR title, if any | ||
# "[Rust] Fix something" --> Rust | ||
# "[Rust][DataFusion] Fix" --> Rust - DataFusion | ||
# "[CPP] Fix " --> "C++" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# "[CPP] Fix " --> "C++" | |
# "[C++] Fix " --> "C++" |
print("Assignee\tNONE") | ||
print("Components\t{}".format(component)) | ||
print("Status\t\tNew") | ||
description = ("Issue automatically created " + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about using the pull request description as is?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My rationale to add a note on provenance was:
- I felt for auto generated tickets it was unlikely the author would keep JIRA and the Pull Request synced, and the PR was likely to be the source of truth
- Hint to anyone reading the JIRA issue they should look at the PR if they wanted to know the current status of the change.
I am happy to remove the auto-link if that is the consensus
@kou in order to set the JIRA assignee I think the code would need a mapping from github username to JIRA username. I could not find any such mapping. Since the original provenance of the code is tracked in Github (as github usernames), if someone feels the JIRA assignee field set is important, they can always post process tickets without the assignee set, find the github author, and update the JRIA accordingly.
I think we could invoke this function as a standalone tool pretty easily. That might be a good follow on PR for anyone who would use it. However, I think getting contributors to switch to JIRA for discussion rather than Github pull request comments will be harder (as it requires changing people's behavior :) ) |
This is a test PR with a minor fix, that has no JIRA issue, that I am using to validate my new fancy script (#9598). However, I think it is a reasonable change on its own Closes #9594 from alamb/alamb/test_change Authored-by: Andrew Lamb <andrew@nerdnetworks.org> Signed-off-by: Andrew Lamb <andrew@nerdnetworks.org>
@jorgecarleitao after reading the discussion about slack channel I understand why they closed it. It makes sense since they want to keep all conversations stored and they also want traceability. However, we should specify that these real time chats should be used only for quick questions and ad hoc conversations. If someone wants to get consensus on a topic then it would be directed to the mailing list. That should be one of the many rules people using the chat must follow. Also, there should be individual channels for each language. The small mini cells that are being created for each language should be able to talk to each other in a rather simple and quick way. Don't you think so? |
As an alternative approach, what if we had a GitHub Actions comment bot that would create a JIRA issue from your issue or PR? That would solve @kou's concern on the mailing list about only adding the JIRA at the end. Apache Way questions aside, a practical consideration for wanting the JIRA sooner is that we use JIRA actively to prepare a release, and it would be difficult to see how many open issues are left to merge for the current release if the issues haven't been made. |
(I meant to start that with: thanks for taking the initiative to make our processes better! ❤️) |
Thank you!
I think having the actions bot offer to create a JIRA issue for you would work great for me personally. The reason I didn't start from there was
In general, I felt the approach to adding an optional, manually acknowledged step, to Clearly my attempt to dodge the "should we still be using JIRA" conversation failed miserably - LOL. I know of few other topics that incite such passion than engineering process and workflow tools! |
I agree. What I'm envisioning is that the existing bot that says "Thanks for opening a pull request! Please name your PR with ARROW-XXXX: Issue Title, or go to JIRA and make an issue" would instead say "Thanks for opening a pull request! Please name your PR with ARROW-XXXX: Issue Title, or comment |
@@ -259,6 +268,21 @@ def get_pr_data(self, number): | |||
return get_json("%s/pulls/%s" % (self.github_api, number), | |||
headers=self.headers) | |||
|
|||
def update_pr_title(self, number, title): | |||
if not self.headers: | |||
msg = ("Can not update PR {} title to '{}'. " + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/Can not/Cannot/
|
||
|
||
# If no jira ID can be found for the PR, offer to create one | ||
# returns returns the github pr_data |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Duplicate word: returns returns
return pr_data | ||
|
||
components = [{"name": component}] | ||
summary = "{}".format(title) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alternatively, f-strings could be used in most of the places where format
is currently being used.
Before:
>>> title = "Hello"
>>> summary = "{}".format(title)
>>> summary
'Hello'
After:
>>> title = "Hello"
>>> summary = f"{title}"
>>> summary
'Hello'
@@ -547,6 +566,86 @@ def get_pr_num(): | |||
return input("Which pull request would you like to merge? (e.g. 34): ") | |||
|
|||
|
|||
_JIRA_COMPONENT_REGEX = re.compile(r'(\[[^\]]*\])+') | |||
|
|||
# Maps PR title prefixes to JIRA components |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should Python
be in this mapping?
) | ||
|
||
cmd.continue_maybe("Create JIRA and link to PR?") | ||
issue = jira_con.create_issue(project='ARROW', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit:
The bracketing style isn't totally consistent in this file, but it appears to be either:
issue = jira_con.create_issue(project='ARROW',
summary=summary,
description=description,
issuetype={'name': 'Bug'},
components=components)
or:
issue = jira_con.create_issue(
project='ARROW',
summary=summary,
description=description,
issuetype={'name': 'Bug'},
components=components,
)
But not:
issue = jira_con.create_issue(project='ARROW',
summary=summary,
description=description,
issuetype={'name': 'Bug'},
components=components,
)
Thanks @dianaclarke -- I am not sure what the fate of this PR will become. I thought it improved the workflow but the discussion on the mailing list left me a bit confused. My confusion largely stems from the various different topics that came up but I never did get an answer to this particular PR's code (nor do I really want to spend time starting another lengthy discussion about the pros and cons of JIRA :) ) |
I'm also not entirely sure where the conversations left off. Mostly, I was just reading this code as a learning exercise, so don't mind me ;) |
I think we failed to reach consensus that this PR did more good than harm, so closing it |
This is a test PR with a minor fix, that has no JIRA issue, that I am using to validate my new fancy script (apache/arrow#9598). However, I think it is a reasonable change on its own Closes #9594 from alamb/alamb/test_change Authored-by: Andrew Lamb <andrew@nerdnetworks.org> Signed-off-by: Andrew Lamb <andrew@nerdnetworks.org>
This is a test PR with a minor fix, that has no JIRA issue, that I am using to validate my new fancy script (apache#9598). However, I think it is a reasonable change on its own Closes apache#9594 from alamb/alamb/test_change Authored-by: Andrew Lamb <andrew@nerdnetworks.org> Signed-off-by: Andrew Lamb <andrew@nerdnetworks.org>
This is a test PR with a minor fix, that has no JIRA issue, that I am using to validate my new fancy script (apache#9598). However, I think it is a reasonable change on its own Closes apache#9594 from alamb/alamb/test_change Authored-by: Andrew Lamb <andrew@nerdnetworks.org> Signed-off-by: Andrew Lamb <andrew@nerdnetworks.org>
Rationale
Currently all contributors are required to make a JIRA account and do some mechanical JIRA creation to create well formed Arrow PRs. This is mindless work and people who are used to it may forget the barrier it imposes on casual contributions and burden on maintainers to keep JIRA synced.
Here is a good example of such a PR where we almost lost a potential contributor: #9576 (comment) (and despite @pierwill and I both working for InfluxData I swear I didn't put him up to this :) )
More discussion can be found on this mailing list thread
Changes
This PR modifies the
merge_pr.py
to offer to create a JIRA and link it back to github if a pre-existing JIRA can not be found. For the existing workflow where the PR title contains the appropriate JIRA reference, there is no change. With this change, devs / maintainers would only have to ensure the title of PRs started with the correct components, and JIRAs could be automatically created, if they so desireThe script requires
ARROW_GITHUB_API_TOKEN
to have been set to some token that has the ability to update PR descriptions.Current behavior
If
merge_pr.py
is invoked on a PR without a JIRA ticket reference the following error occursNew Behavior
With the changes in this PR, the maintainer is prompted to optionally create the JIRA ticket:
Follow on Work
If this script is accepted, I would like to file a ticket to improve the wording of the message left by the JIRA bot example to make it clear that the creation of a JIRA account + ticket is not required (though perhaps still encouraged for large changes)
Add additional mappings from PR description to components (I only added the ones I use and a few others to prove out the idea)