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 2022/06/14 15:18:17 UTC
[GitHub] [pulsar] maxsxu opened a new pull request, #16060: [fix][workflow] Support concurrency group in docbot
maxsxu opened a new pull request, #16060:
URL: https://github.com/apache/pulsar/pull/16060
Fixes #16046
### Motivation
Multiple workflows can be running concurrently while `labeled` event triggered instantly after `opened` event before the docbot workflow is running.
This scenario will cause an inconsistent state of action and confused results.
### Modifications
Added [`concurrency`](https://docs.github.com/en/actions/using-jobs/using-concurrency)
- `concurrency.group` means workflow using the same concurrency group will be pending
- `concurrency.cancel-in-progress` will cancel any currently running job or workflow in the same concurrency group. This option can resolve the inconsistent state issue.
### Tests
The demo can be found at https://github.com/open-github/pulsar/pull/12
![docbot-concurrency](https://user-images.githubusercontent.com/15963141/173613129-984b2d07-ddc6-4f65-a787-228880704919.gif)
And the workflow status
<img width="935" alt="image" src="https://user-images.githubusercontent.com/15963141/173613609-643b9163-eb16-4125-8cfa-1f58aecd499d.png">
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] maxsxu commented on a diff in pull request #16060: [fix][workflow] Support concurrency group and reusable workflow files in docbot
Posted by GitBox <gi...@apache.org>.
maxsxu commented on code in PR #16060:
URL: https://github.com/apache/pulsar/pull/16060#discussion_r897022716
##########
.github/workflows/ci-documentbot.yml:
##########
@@ -27,6 +27,10 @@ on:
- labeled
- unlabeled
+concurrency:
+ group: ${{ github.workflow }}-${{ github.ref }}
+ cancel-in-progress: true
Review Comment:
Yes, my previous test (without `cancel-in-progress`) at https://github.com/open-github/pulsar/pull/6 shows we have to cancel it, or an inconsistent state will occur.
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] tisonkun commented on a diff in pull request #16060: [fix][workflow] Support concurrency group and reusable workflow files in docbot
Posted by GitBox <gi...@apache.org>.
tisonkun commented on code in PR #16060:
URL: https://github.com/apache/pulsar/pull/16060#discussion_r945091947
##########
.github/workflows/ci-documentbot.yml:
##########
@@ -46,7 +50,7 @@ jobs:
go-version: 1.18
- name: Labeling
- uses: apache/pulsar-test-infra/docbot@master
+ uses: ./docbot
Review Comment:
Why we cannot use `apache/pulsar-test-infra/docbot@master` in this case like pulsarbot?
cc @maxsxu
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] maxsxu commented on pull request #16060: [fix][workflow] Support concurrency group in docbot
Posted by GitBox <gi...@apache.org>.
maxsxu commented on PR #16060:
URL: https://github.com/apache/pulsar/pull/16060#issuecomment-1155383609
> btw. please also change `uses: apache/pulsar-test-infra/docbot@master` to `uses: ./docbot` . That should be done since the `apache/pulsar-test-infra` is already checked out.
>
> [Syntax for `uses`](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_iduses)
Thanks for this great suggestion! Totally agree with this method.
Just a detail: If we address it in the same PR, should we change the PR title? @lhotari
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] lhotari commented on pull request #16060: [fix][workflow] Support concurrency group in docbot
Posted by GitBox <gi...@apache.org>.
lhotari commented on PR #16060:
URL: https://github.com/apache/pulsar/pull/16060#issuecomment-1155386922
> Just a detail: If we address it in the same PR, should we change the PR title?
yes that makes sense.
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] Anonymitaet merged pull request #16060: [fix][workflow] Support concurrency group and reusable workflow files in docbot
Posted by GitBox <gi...@apache.org>.
Anonymitaet merged PR #16060:
URL: https://github.com/apache/pulsar/pull/16060
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] tisonkun commented on a diff in pull request #16060: [fix][workflow] Support concurrency group and reusable workflow files in docbot
Posted by GitBox <gi...@apache.org>.
tisonkun commented on code in PR #16060:
URL: https://github.com/apache/pulsar/pull/16060#discussion_r945119195
##########
.github/workflows/ci-documentbot.yml:
##########
@@ -46,7 +50,7 @@ jobs:
go-version: 1.18
- name: Labeling
- uses: apache/pulsar-test-infra/docbot@master
+ uses: ./docbot
Review Comment:
If we adopt docker container action as described in https://github.com/apache/pulsar-test-infra/issues/58, we may need not to checkout the code as well as setup-go, just use the action itself ><
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] lhotari commented on pull request #16060: [fix][workflow] Support concurrency group in docbot
Posted by GitBox <gi...@apache.org>.
lhotari commented on PR #16060:
URL: https://github.com/apache/pulsar/pull/16060#issuecomment-1155359543
btw. please also change `uses: apache/pulsar-test-infra/docbot@master` to `uses: ./docbot` . That should be done since the `apache/pulsar-test-infra` is already checked out
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] lhotari commented on a diff in pull request #16060: [fix][workflow] Support concurrency group and reusable workflow files in docbot
Posted by GitBox <gi...@apache.org>.
lhotari commented on code in PR #16060:
URL: https://github.com/apache/pulsar/pull/16060#discussion_r897017544
##########
.github/workflows/ci-documentbot.yml:
##########
@@ -27,6 +27,10 @@ on:
- labeled
- unlabeled
+concurrency:
+ group: ${{ github.workflow }}-${{ github.ref }}
+ cancel-in-progress: true
Review Comment:
are you sure that in progress builds should be cancelled? That could lead to some events being skipped. it that fine?
##########
.github/workflows/ci-documentbot.yml:
##########
@@ -27,6 +27,10 @@ on:
- labeled
- unlabeled
+concurrency:
+ group: ${{ github.workflow }}-${{ github.ref }}
+ cancel-in-progress: true
Review Comment:
are you sure that in progress builds should be cancelled? That could lead to some events being skipped. is that fine?
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] lhotari commented on a diff in pull request #16060: [fix][workflow] Support concurrency group and reusable workflow files in docbot
Posted by GitBox <gi...@apache.org>.
lhotari commented on code in PR #16060:
URL: https://github.com/apache/pulsar/pull/16060#discussion_r897036383
##########
.github/workflows/ci-documentbot.yml:
##########
@@ -27,6 +27,10 @@ on:
- labeled
- unlabeled
+concurrency:
+ group: ${{ github.workflow }}-${{ github.ref }}
+ cancel-in-progress: true
Review Comment:
ok
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] lhotari commented on a diff in pull request #16060: [fix][workflow] Support concurrency group and reusable workflow files in docbot
Posted by GitBox <gi...@apache.org>.
lhotari commented on code in PR #16060:
URL: https://github.com/apache/pulsar/pull/16060#discussion_r945108009
##########
.github/workflows/ci-documentbot.yml:
##########
@@ -46,7 +50,7 @@ jobs:
go-version: 1.18
- name: Labeling
- uses: apache/pulsar-test-infra/docbot@master
+ uses: ./docbot
Review Comment:
@tisonkun I've explained that in this comment: https://github.com/apache/pulsar/pull/16060#issuecomment-1155359543
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org