You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/01/28 11:58:36 UTC

[GitHub] [pulsar] zymap opened a new pull request #9357: Using the same job to run cancel workflow

zymap opened a new pull request #9357:
URL: https://github.com/apache/pulsar/pull/9357


   ---
   
   **Motivation**
   
   After introducing the new cancel CI workflow, it takes
   a lot of job place which cause we have more and more CI
   in the queue. I saw how the apache/airflow uses, the
   apache/airflow run it as a step, so let's remove it into
   the separate workflows. It will reduce our CI job usage.
   Also, I test it in my own repo, it looks like working well.
   https://github.com/zymap/pulsar/actions?query=branch%3Atest-duplicate-ci'
   
   <!--
   ### Contribution Checklist
     
     - Name the pull request in the form "[Issue XYZ][component] Title of the pull request", where *XYZ* should be replaced by the actual issue number.
       Skip *Issue XYZ* if there is no associated github issue for this pull request.
       Skip *component* if you are unsure about which is the best component. E.g. `[docs] Fix typo in produce method`.
   
     - Fill out the template below to describe the changes contributed by the pull request. That will give reviewers the context they need to do the review.
     
     - Each pull request should address only one issue, not mix up code from multiple issues.
     
     - Each commit in the pull request has a meaningful commit message
   
     - Once all items of the checklist are addressed, remove the above text and this checklist, leaving only the filled out template below.
   
   **(The sections below can be removed for hotfixes of typos)**
   -->
   
   *(If this PR fixes a github issue, please add `Fixes #<xyz>`.)*
   
   Fixes #<xyz>
   
   *(or if this PR is one task of a github issue, please add `Master Issue: #<xyz>` to link to the master issue.)*
   
   Master Issue: #<xyz>
   
   ### Motivation
   
   
   *Explain here the context, and why you're making that change. What is the problem you're trying to solve.*
   
   ### Modifications
   
   *Describe the modifications you've done.*
   
   ### Verifying this change
   
   - [ ] Make sure that the change passes the CI checks.
   
   *(Please pick either of the following options)*
   
   This change is a trivial rework / code cleanup without any test coverage.
   
   *(or)*
   
   This change is already covered by existing tests, such as *(please describe tests)*.
   
   *(or)*
   
   This change added tests and can be verified as follows:
   
   *(example:)*
     - *Added integration tests for end-to-end deployment with large payloads (10MB)*
     - *Extended integration test for recovery after broker failure*
   
   ### Does this pull request potentially affect one of the following parts:
   
   *If `yes` was chosen, please highlight the changes*
   
     - Dependencies (does it add or upgrade a dependency): (yes / no)
     - The public API: (yes / no)
     - The schema: (yes / no / don't know)
     - The default values of configurations: (yes / no)
     - The wire protocol: (yes / no)
     - The rest endpoints: (yes / no)
     - The admin cli options: (yes / no)
     - Anything that affects deployment: (yes / no / don't know)
   
   ### Documentation
   
     - Does this pull request introduce a new feature? (yes / no)
     - If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)
     - If a feature is not applicable for documentation, explain why?
     - If a feature is not documented yet in this PR, please create a followup issue for adding the documentation
   


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

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



[GitHub] [pulsar] lhotari commented on pull request #9357: Using the same job to run cancel workflow

Posted by GitBox <gi...@apache.org>.
lhotari commented on pull request #9357:
URL: https://github.com/apache/pulsar/pull/9357#issuecomment-769059583


   Adding some description about the background:
   The "Cancelling duplicates" workflow jobs are piling up in the Actions runner queue as can be seen in https://github.com/apache/pulsar/actions?query=workflow%3A%22Cancelling+Duplicates%22 . Each PR update will cause 26 of these "Cancelling duplicates" jobs being added to the Actions runner queue.
   
   The workflow that creates these jobs was introduced by PR https://github.com/apache/pulsar/pull/9159 . 
   The reason why it was needed was due to the previous cancellation solution introduced in #8393 getting possibly unintentionally removed by #9069. Since the solution was removed it possibly lead to the issue #9154 .
   
   This PR will bring back a solution which is similar to #8393, however using a more advanced Github Action implementation. 


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

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



[GitHub] [pulsar] eolivelli commented on a change in pull request #9357: Using the same job to run cancel workflow

Posted by GitBox <gi...@apache.org>.
eolivelli commented on a change in pull request #9357:
URL: https://github.com/apache/pulsar/pull/9357#discussion_r566066563



##########
File path: .github/workflows/ci-build-macos.yaml
##########
@@ -39,6 +39,13 @@ jobs:
     timeout-minutes: 120
 
     steps:
+      - name: cancle previours runs

Review comment:
       typo: "cancel previous runs"




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

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



[GitHub] [pulsar] zymap commented on pull request #9357: Using the same job to run cancel workflow

Posted by GitBox <gi...@apache.org>.
zymap commented on pull request #9357:
URL: https://github.com/apache/pulsar/pull/9357#issuecomment-769596943


   /pulsarbot run-failure-checks


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

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



[GitHub] [pulsar] zymap merged pull request #9357: Using the same job to run cancel workflow

Posted by GitBox <gi...@apache.org>.
zymap merged pull request #9357:
URL: https://github.com/apache/pulsar/pull/9357


   


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

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



[GitHub] [pulsar] zymap commented on pull request #9357: Using the same job to run cancel workflow

Posted by GitBox <gi...@apache.org>.
zymap commented on pull request #9357:
URL: https://github.com/apache/pulsar/pull/9357#issuecomment-769473581


   /pulsarbot run-failure-checks


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

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



[GitHub] [pulsar] lhotari commented on a change in pull request #9357: Using the same job to run cancel workflow

Posted by GitBox <gi...@apache.org>.
lhotari commented on a change in pull request #9357:
URL: https://github.com/apache/pulsar/pull/9357#discussion_r566088345



##########
File path: .github/workflows/ci-build-macos.yaml
##########
@@ -39,6 +39,13 @@ jobs:
     timeout-minutes: 120
 
     steps:
+      - name: cancle previours runs
+        uses: apache/airflow-cancel-workflow-runs@953e057dc81d3458935a18d1184c386b0f6b5738
+        with:
+          cancelMode: allDuplicates

Review comment:
       Based on the [documentation of apache/airflow-cancel-workflow-runs](https://github.com/apache/airflow-cancel-workflow-runs#inputs-and-outputs), I'd assume that this should be `duplicates` instead of `allDuplicates`. 
   Since `duplicates` is the default value, the `cancelMode` parameter can be omitted.

##########
File path: .github/workflows/ci-cpp.yaml
##########
@@ -37,6 +37,13 @@ jobs:
     timeout-minutes: 120
 
     steps:
+      - name: cancle previours runs
+        uses: apache/airflow-cancel-workflow-runs@953e057dc81d3458935a18d1184c386b0f6b5738
+        with:
+          cancelMode: allDuplicates
+          token: ${{ secrets.GITHUB_TOKEN }}
+          sourceRunId: ${{ github.event.workflow_run.id }}

Review comment:
       previous comments apply to all cancelMode and sourceRunId parameters

##########
File path: .github/workflows/ci-build-macos.yaml
##########
@@ -39,6 +39,13 @@ jobs:
     timeout-minutes: 120
 
     steps:
+      - name: cancle previours runs
+        uses: apache/airflow-cancel-workflow-runs@953e057dc81d3458935a18d1184c386b0f6b5738
+        with:
+          cancelMode: allDuplicates
+          token: ${{ secrets.GITHUB_TOKEN }}
+          sourceRunId: ${{ github.event.workflow_run.id }}

Review comment:
       `sourceRunId` should be omitted when used in the same workflow which should be cancelled. [Documentation says about sourceRunId](https://github.com/apache/airflow-cancel-workflow-runs#inputs-and-outputs): "Useful only in workflow_run triggered events."




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

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



[GitHub] [pulsar] zymap commented on pull request #9357: Using the same job to run cancel workflow

Posted by GitBox <gi...@apache.org>.
zymap commented on pull request #9357:
URL: https://github.com/apache/pulsar/pull/9357#issuecomment-769061418


   @lhotari Thank you for the more information about this!


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

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



[GitHub] [pulsar] lhotari commented on a change in pull request #9357: Using the same job to run cancel workflow

Posted by GitBox <gi...@apache.org>.
lhotari commented on a change in pull request #9357:
URL: https://github.com/apache/pulsar/pull/9357#discussion_r566096286



##########
File path: .github/workflows/ci-build-macos.yaml
##########
@@ -39,6 +39,13 @@ jobs:
     timeout-minutes: 120
 
     steps:
+      - name: cancle previours runs
+        uses: apache/airflow-cancel-workflow-runs@953e057dc81d3458935a18d1184c386b0f6b5738
+        with:
+          cancelMode: allDuplicates

Review comment:
       some clarification: `allDuplicates` means "Cancels duplicate runs from all running workflows.". I don't think this makes sense for per-workflow cancellation. the default cancelMode `duplicates` means "Cancels duplicate runs from the same repo/branch as current run."




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

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