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

Support cancelling previous ci actions #225

Merged
merged 3 commits into from
Sep 19, 2022
Merged

Support cancelling previous ci actions #225

merged 3 commits into from
Sep 19, 2022

Conversation

zuston
Copy link
Member

@zuston zuston commented Sep 16, 2022

What changes were proposed in this pull request?

Support cancelling previous ci actions when new commits are submitted.

Why are the changes needed?

I hope the CI actions can always test the latest commits code and cancel the previous ci when new commits are submitted.

Refer to: https://stackoverflow.com/questions/66335225/how-to-cancel-previous-runs-in-the-pr-when-you-push-new-commitsupdate-the-curre

Does this PR introduce any user-facing change?

How was this patch tested?

@zuston
Copy link
Member Author

zuston commented Sep 16, 2022

@kaijchen Could u help check this feature? I dont know how to check its effect

@kaijchen
Copy link
Contributor

@kaijchen Could u help check this feature? I dont know how to check its effect

Can you try push new empty commits in this PR?

@kaijchen
Copy link
Contributor

For reference, this works in Apache Ozone

concurrency:
  group: ci-${{ github.event.pull_request.number || github.sha }}
  cancel-in-progress: ${{ github.event_name == 'pull_request' }}

@zuston
Copy link
Member Author

zuston commented Sep 16, 2022

@kaijchen Could u help check this feature? I dont know how to check its effect

Can you try push new empty commits in this PR?

It works.

@kaijchen
Copy link
Contributor

It works.

Great.

I think it's better to wait all CI on master to finish.
So we know where it starts to fail when something goes wrong.

Co-authored-by: Kaijie Chen <ckj@apache.org>
@zuston
Copy link
Member Author

zuston commented Sep 16, 2022

It works.

Great.

I think it's better to wait all CI on master to finish. So we know where it starts to fail when something goes wrong.

Make sense.

Copy link
Contributor

@kaijchen kaijchen left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @zuston.

There is one extra blank line, nevermind.

@codecov-commenter
Copy link

codecov-commenter commented Sep 16, 2022

Codecov Report

Merging #225 (2143f4e) into master (8be68ab) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##             master     #225   +/-   ##
=========================================
  Coverage     59.13%   59.13%           
  Complexity     1327     1327           
=========================================
  Files           160      160           
  Lines          8727     8727           
  Branches        817      817           
=========================================
  Hits           5161     5161           
  Misses         3301     3301           
  Partials        265      265           

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Contributor

@jerqi jerqi left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @zuston @kaijchen

@jerqi jerqi merged commit 9f6b3e5 into apache:master Sep 19, 2022
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.

None yet

4 participants