You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2022/07/13 14:02:50 UTC

[GitHub] [beam] damccorm opened a new pull request, #22257: Turn pr bot on for remaining common labels

damccorm opened a new pull request, #22257:
URL: https://github.com/apache/beam/pull/22257

   This turns on the PR bot for the remaining few labels (Java/Io/Build) that get a lot of PR traffic. I did my best to come up with an initial set of reviewers to be round robined to, but it was mostly based on manual inspection. The bot should eventually update that list anyways.
   
   Closes #21421
   
   ------------------------
   
   Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
   
    - [ ] [**Choose reviewer(s)**](https://beam.apache.org/contribute/#make-your-change) and mention them in a comment (`R: @username`).
    - [ ] Mention the appropriate issue in your description (for example: `addresses #123`), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, comment `fixes #<ISSUE NUMBER>` instead.
    - [ ] Update `CHANGES.md` with noteworthy changes.
    - [ ] If this contribution is large, please file an Apache [Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).
   
   See the [Contributor Guide](https://beam.apache.org/contribute) for more tips on [how to make review process smoother](https://beam.apache.org/contribute/#make-reviewers-job-easier).
   
   To check the build health, please visit [https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md](https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md)
   
   GitHub Actions Tests Status (on master branch)
   ------------------------------------------------------------------------------------------------
   [![Build python source distribution and wheels](https://github.com/apache/beam/workflows/Build%20python%20source%20distribution%20and%20wheels/badge.svg?branch=master&event=schedule)](https://github.com/apache/beam/actions?query=workflow%3A%22Build+python+source+distribution+and+wheels%22+branch%3Amaster+event%3Aschedule)
   [![Python tests](https://github.com/apache/beam/workflows/Python%20tests/badge.svg?branch=master&event=schedule)](https://github.com/apache/beam/actions?query=workflow%3A%22Python+Tests%22+branch%3Amaster+event%3Aschedule)
   [![Java tests](https://github.com/apache/beam/workflows/Java%20Tests/badge.svg?branch=master&event=schedule)](https://github.com/apache/beam/actions?query=workflow%3A%22Java+Tests%22+branch%3Amaster+event%3Aschedule)
   
   See [CI.md](https://github.com/apache/beam/blob/master/CI.md) for more information about GitHub Actions CI.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] Abacn commented on a diff in pull request #22257: Turn pr bot on for remaining common labels

Posted by GitBox <gi...@apache.org>.
Abacn commented on code in PR #22257:
URL: https://github.com/apache/beam/pull/22257#discussion_r922250830


##########
scripts/ci/pr-bot/processNewPrs.ts:
##########
@@ -39,34 +39,27 @@ import { CheckStatus } from "./shared/checks";
  * 4) Are closed
  * 5) Have already been processed
  * 6) Have notifications stopped
- * 7) The pr doesn't contain the go or python labels (temporary). TODO(damccorm) - remove this when we're ready to roll this out to everyone.
  * 8) The pr happens after the date we turn on the automation. TODO(damccorm) - remove this once this has been rolled out for a while.
  * unless we're supposed to remind the user after tests pass
  * (in which case that's all we need to do).
  */
 function needsProcessed(pull: any, prState: typeof Pr): boolean {
-  if (
-    !pull.labels.find(
-      (label) =>
-        label.name.toLowerCase() === "go" ||
-        label.name.toLowerCase() === "python"
-    )
-  ) {
-    console.log(
-      `Skipping PR ${pull.number} because it doesn't contain the go or python labels`
-    );
-    return false;
-  }
-  const firstPrToProcess = new Date(2022, 5, 16, 14); // June 16 2022, 14:00 UTC (note that Java months are 0 indexed)
+  const firstPythonPrToProcess = new Date(2022, 5, 16, 14); // June 16 2022, 14:00 UTC (note that JavaScript months are 0 indexed)

Review Comment:
   Do we still need these date filters (see below)
   The Get request in processNewPrs will get at most 30 latest created open prs (according to https://docs.github.com/en/rest/pulls/pulls#list-pull-requests)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] damccorm merged pull request #22257: Turn pr bot on for remaining common labels

Posted by GitBox <gi...@apache.org>.
damccorm merged PR #22257:
URL: https://github.com/apache/beam/pull/22257


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] damccorm commented on a diff in pull request #22257: Turn pr bot on for remaining common labels

Posted by GitBox <gi...@apache.org>.
damccorm commented on code in PR #22257:
URL: https://github.com/apache/beam/pull/22257#discussion_r922278726


##########
scripts/ci/pr-bot/processNewPrs.ts:
##########
@@ -39,34 +39,27 @@ import { CheckStatus } from "./shared/checks";
  * 4) Are closed
  * 5) Have already been processed
  * 6) Have notifications stopped
- * 7) The pr doesn't contain the go or python labels (temporary). TODO(damccorm) - remove this when we're ready to roll this out to everyone.
  * 8) The pr happens after the date we turn on the automation. TODO(damccorm) - remove this once this has been rolled out for a while.
  * unless we're supposed to remind the user after tests pass
  * (in which case that's all we need to do).
  */
 function needsProcessed(pull: any, prState: typeof Pr): boolean {
-  if (
-    !pull.labels.find(
-      (label) =>
-        label.name.toLowerCase() === "go" ||
-        label.name.toLowerCase() === "python"
-    )
-  ) {
-    console.log(
-      `Skipping PR ${pull.number} because it doesn't contain the go or python labels`
-    );
-    return false;
-  }
-  const firstPrToProcess = new Date(2022, 5, 16, 14); // June 16 2022, 14:00 UTC (note that Java months are 0 indexed)
+  const firstPythonPrToProcess = new Date(2022, 5, 16, 14); // June 16 2022, 14:00 UTC (note that JavaScript months are 0 indexed)

Review Comment:
   Good question! We do need it though - if you look at https://github.com/apache/beam/blob/53c3ffb9d004030b772ef31d851e95757711ca5b/scripts/ci/pr-bot/processNewPrs.ts#L307-L313 its called with [paginate](https://octokit.github.io/rest.js/v18#pagination) which automatically pulls _all_ the pages of results (using continuation tokens). So it does get all open pulls. Otherwise I would've just called the [octokit method for listing pulls directly](https://octokit.github.io/rest.js/v18#pulls-list) instead of using the rest API.
   
   Also, for posterity, this filter is so that the bot doesn't activate on pulls where reviews are already in progress



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] damccorm commented on pull request #22257: Turn pr bot on for remaining common labels

Posted by GitBox <gi...@apache.org>.
damccorm commented on PR #22257:
URL: https://github.com/apache/beam/pull/22257#issuecomment-1185566164

   R: @Abacn 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] damccorm commented on a diff in pull request #22257: Turn pr bot on for remaining common labels

Posted by GitBox <gi...@apache.org>.
damccorm commented on code in PR #22257:
URL: https://github.com/apache/beam/pull/22257#discussion_r922278726


##########
scripts/ci/pr-bot/processNewPrs.ts:
##########
@@ -39,34 +39,27 @@ import { CheckStatus } from "./shared/checks";
  * 4) Are closed
  * 5) Have already been processed
  * 6) Have notifications stopped
- * 7) The pr doesn't contain the go or python labels (temporary). TODO(damccorm) - remove this when we're ready to roll this out to everyone.
  * 8) The pr happens after the date we turn on the automation. TODO(damccorm) - remove this once this has been rolled out for a while.
  * unless we're supposed to remind the user after tests pass
  * (in which case that's all we need to do).
  */
 function needsProcessed(pull: any, prState: typeof Pr): boolean {
-  if (
-    !pull.labels.find(
-      (label) =>
-        label.name.toLowerCase() === "go" ||
-        label.name.toLowerCase() === "python"
-    )
-  ) {
-    console.log(
-      `Skipping PR ${pull.number} because it doesn't contain the go or python labels`
-    );
-    return false;
-  }
-  const firstPrToProcess = new Date(2022, 5, 16, 14); // June 16 2022, 14:00 UTC (note that Java months are 0 indexed)
+  const firstPythonPrToProcess = new Date(2022, 5, 16, 14); // June 16 2022, 14:00 UTC (note that JavaScript months are 0 indexed)

Review Comment:
   Good question! We do need it though - if you look at https://github.com/apache/beam/blob/53c3ffb9d004030b772ef31d851e95757711ca5b/scripts/ci/pr-bot/processNewPrs.ts#L307, its called with [paginate](https://octokit.github.io/rest.js/v18#pagination) which automatically pulls _all_ the pages of results (using continuation tokens). So it does get all open pulls. Otherwise I would've just called the [octokit method for listing pulls directly](https://octokit.github.io/rest.js/v18#pulls-list) instead of using the rest API.
   
   Also, for posterity, this filter is so that the bot doesn't activate on pulls where reviews are already in progress



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org