Skip to content

Conversation

Yiyiyimu
Copy link
Member

@Yiyiyimu Yiyiyimu commented Apr 14, 2021

Signed-off-by: yiyiyimu wosoyoung@gmail.com

What this PR does / why we need it:

We always wait for CI queue time, and we always trying to reduce waiting time. Here is another method to achieve it.

The method is that whenever a new commit added to PR, the previous running CI could be canceled since it is of no use. This could be achieved by using Github API, find the workflow on the same branch but with different SHA. And we could achieve this with potiuk/cancel-workflow-runs which is also used in Apache Airflow.

To bypass the limit of third party Actions, the recommendation provided by Apache Infra is to use submodules.

Since the "cancel" workflow could only be triggered after merged, so I could not test it in this PR. Thus I duplicate the same situation in my own repo, and it works as expect. See Yiyiyimu/GithubActionsTest#5 you could find previous running workflow got cancelled when a new one coming in. Also see https://github.com/Yiyiyimu/GithubActionsTest/runs/2344066993?check_suite_focus=true for cancellation detail.

Pre-submission checklist:

  • Did you explain what problem does this PR solve? Or what new features have been added?
  • Have you added corresponding test cases?
  • Have you modified the corresponding document?
  • Is this PR backward compatible? If it is not backward compatible, please discuss on the mailing list first

Signed-off-by: yiyiyimu <wosoyoung@gmail.com>
Signed-off-by: yiyiyimu <wosoyoung@gmail.com>
Signed-off-by: yiyiyimu <wosoyoung@gmail.com>
Signed-off-by: yiyiyimu <wosoyoung@gmail.com>
Signed-off-by: yiyiyimu <wosoyoung@gmail.com>
Signed-off-by: yiyiyimu <wosoyoung@gmail.com>
Signed-off-by: yiyiyimu <wosoyoung@gmail.com>
@Yiyiyimu Yiyiyimu marked this pull request as ready for review April 14, 2021 15:15
@spacewander spacewander merged commit 0a86700 into apache:master Apr 15, 2021
@Yiyiyimu
Copy link
Member Author

Work as expect:
https://github.com/apache/apisix/actions/runs/754861826
image

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.

3 participants