Skip to content
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-18380: [Dev] Update dev_pr GitHub workflows to accept both GitHub issues and JIRA #14731

Merged
merged 7 commits into from
Nov 29, 2022

Conversation

raulcd
Copy link
Member

@raulcd raulcd commented Nov 24, 2022

This might require to be done once the merge_arrow_pr.sh script is also updated. Updating the merge PR script is tracked on GitHub for the migration here: #14720

I have tested this new workflow on my fork with the following PRs and issues on my fork.
Example of valid issue: raulcd#41
Example of issues without labels or assignees: raulcd#42 or raulcd#43
Example of issue with non existent GH issue: raulcd#45

@github-actions
Copy link

@raulcd
Copy link
Member Author

raulcd commented Nov 24, 2022

The PR expects the title to be either as it was before or:
GH-XXXX: [Component] Description where XXXX is the GitHub issue id. It also checks that the GitHub issue is assigned and that it has any label on it. We can improve it in the future to validate it has specific labels for components.

@raulcd raulcd marked this pull request as ready for review November 24, 2022 21:17
Copy link
Member

@assignUser assignUser left a comment

Choose a reason for hiding this comment

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

We could add a Closes #123 to the PR body if an existing gh issue was detected from the title (and no keyword is in the body) to make sure they are linked. That way the issue is closed automatically and we don't have to add that to the merge script.

.github/workflows/dev_pr/issue_check.js Outdated Show resolved Hide resolved
.github/workflows/dev_pr/issue_check.js Outdated Show resolved Hide resolved
@raulcd
Copy link
Member Author

raulcd commented Nov 25, 2022

We could add a Closes #123 to the PR body if an existing gh issue was detected from the title (and no keyword is in the body) to make sure they are linked. That way the issue is closed automatically and we don't have to add that to the merge script.

At the moment we can do this on the merge script as we do with JIRA. I don't want to automatically edit the PR body at the moment. We can tackle this later on.

@raulcd
Copy link
Member Author

raulcd commented Nov 25, 2022

Apart from some refactoring based on the review comments, the main change from the examples on the description is that the issue will be automatically assigned to the PR creator if there are no assignees. See this comment on my fork as an example: raulcd#50 (comment)

@jorisvandenbossche
Copy link
Member

Looks good to me!

I wanted to give the same comment as @assignUser that we could also update the top comment to include a link to the issue instead of adding it as a new comment (this could also be done for JIRAs, except that here it doesn't matter for auto-closing). But also agree this is fine to consider later, as that is a bigger change.
The cpython bot also seems to do that, see for example python/cpython#99825, where the top-post was edited by the bot to include the issue from the title (and in addition, the issue top post was also updated by the bot to explicitly link to the linked PR: python/cpython#99824)

@raulcd raulcd requested a review from amol- November 28, 2022 12:02
Copy link
Member

@amol- amol- left a comment

Choose a reason for hiding this comment

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

minor changes requested, mostly the one about labels.

.github/workflows/dev_pr/helpers.js Outdated Show resolved Hide resolved
if (!issueInfo.assignees.length) {
await assignGitHubIssue(github, context, pullRequestNumber, issueInfo);
}
if(!issueInfo.labels.length) {
Copy link
Member

Choose a reason for hiding this comment

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

This should probably check if there is a label["name"] that starts with Component:, I don't think that we want to accept any label.

Copy link
Member Author

Choose a reason for hiding this comment

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

At the moment several component labels are not prefixed with Component:, i.e. all the language related ones. @jorisvandenbossche I think you added some of the missing labels, are we planning to change the language ones? I was planning to add more validation around Components labels in the future but I am happy to improve it now if we are planning to update those.

Copy link
Member

Choose a reason for hiding this comment

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

I would maybe handle this later / separately? I didn't yet rename existing labels in the assumption that those are used by existing workflows as well that would have to be updated (i.e. labeler.yml). Although that would probably an easy PR to make to rename the labels in labeler.yml

Copy link
Member

Choose a reason for hiding this comment

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

FYI in #14750 I have been taking for granted that component labels are those prefixed with "Component: " to identify the component of an issue, so would be helpful to be consistent

Copy link
Contributor

Choose a reason for hiding this comment

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

Can we implement duplicate labels now for those component that already have non-prefixed labels, and we can fix any scripts and update existing issue labels as needed later? It should be very easy to update any issues with label "java" to have a label "Component: Java", for example.

Copy link
Member Author

Choose a reason for hiding this comment

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

I have implemented the suggestion. The workflow will check that the issue contains at least a label prefixed Component:. If someone with permissions can add the labels for the languages I am happy to update the labeler.yml workflow.

Copy link
Member

Choose a reason for hiding this comment

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

I can certainly do that. Maybe prepare the PR first, so that can be merged directly after renaming the labels?

Copy link
Member Author

Choose a reason for hiding this comment

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

Done: #14762
I've created everything in github (issue, and new title format) but I am not sure if we can merge yet :)

Copy link
Member

Choose a reason for hiding this comment

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

but I am not sure if we can merge yet :)

We will need some PRs to test Alessandro's PR updating the merge script anyway ;)

Copy link
Member

Choose a reason for hiding this comment

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

Can we implement duplicate labels now for those component that already have non-prefixed labels, and we can fix any scripts and update existing issue labels as needed later? It should be very easy to update any issues with label "java" to have a label "Component: Java", for example.

@toddfarmer all labels have been renamed to match the "Component: .." for now (we can alter, after the issues migration, consider renaming them again if we want)

.github/workflows/dev_pr/issue_check.js Show resolved Hide resolved
.github/workflows/dev_pr/link.js Show resolved Hide resolved
@amol- amol- merged commit b1bcd6f into apache:master Nov 29, 2022
@ursabot
Copy link

ursabot commented Nov 30, 2022

Benchmark runs are scheduled for baseline = fde7b93 and contender = b1bcd6f. b1bcd6f is a master commit associated with this PR. Results will be available as each benchmark for each run completes.
Conbench compare runs links:
[Finished ⬇️0.0% ⬆️0.0%] ec2-t3-xlarge-us-east-2
[Failed ⬇️0.07% ⬆️0.0%] test-mac-arm
[Finished ⬇️0.0% ⬆️0.0%] ursa-i9-9960x
[Finished ⬇️0.21% ⬆️0.0%] ursa-thinkcentre-m75q
Buildkite builds:
[Finished] b1bcd6f3 ec2-t3-xlarge-us-east-2
[Failed] b1bcd6f3 test-mac-arm
[Finished] b1bcd6f3 ursa-i9-9960x
[Finished] b1bcd6f3 ursa-thinkcentre-m75q
[Finished] fde7b937 ec2-t3-xlarge-us-east-2
[Failed] fde7b937 test-mac-arm
[Finished] fde7b937 ursa-i9-9960x
[Finished] fde7b937 ursa-thinkcentre-m75q
Supported benchmarks:
ec2-t3-xlarge-us-east-2: Supported benchmark langs: Python, R. Runs only benchmarks with cloud = True
test-mac-arm: Supported benchmark langs: C++, Python, R
ursa-i9-9960x: Supported benchmark langs: Python, R, JavaScript
ursa-thinkcentre-m75q: Supported benchmark langs: C++, Java

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