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

Cancel a currently running workflow from the same PR when a new workflow is triggered #4200

Merged
merged 2 commits into from
Oct 19, 2023

Conversation

pingsutw
Copy link
Member

@pingsutw pingsutw commented Oct 10, 2023

TL;DR

as title, always run the latest workflow in the PR.
https://stackoverflow.com/a/72408109/9574775
https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#concurrency

Type

  • Bug Fix
  • Feature
  • Plugin

Are all requirements met?

  • Code completed
  • Smoke tested
  • Unit tests added
  • Code documentation added
  • Any pending items have an associated Issue

Complete description

How did you fix the bug, make the feature etc. Link to any design docs etc

Tracking Issue

https://github.com/flyteorg/flyte/issues/

Follow-up issue

NA

@codecov
Copy link

codecov bot commented Oct 11, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (a18da03) 59.00% compared to head (82b6285) 60.18%.
Report is 33 commits behind head on master.

❗ Current head 82b6285 differs from pull request most recent head 41ba8f3. Consider uploading reports for the commit 41ba8f3 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4200      +/-   ##
==========================================
+ Coverage   59.00%   60.18%   +1.17%     
==========================================
  Files         619      570      -49     
  Lines       52827    41216   -11611     
==========================================
- Hits        31170    24804    -6366     
+ Misses      19173    14006    -5167     
+ Partials     2484     2406      -78     
Flag Coverage Δ
unittests ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
...atacatalog/pkg/manager/impl/artifact_data_store.go 68.00% <ø> (+8.00%) ⬆️
datacatalog/pkg/manager/impl/artifact_manager.go 70.23% <ø> (+1.13%) ⬆️
datacatalog/pkg/manager/impl/dataset_manager.go 68.69% <ø> (+2.02%) ⬆️
...atacatalog/pkg/manager/impl/reservation_manager.go 81.30% <ø> (+2.84%) ⬆️
datacatalog/pkg/manager/impl/tag_manager.go 70.21% <ø> (+0.56%) ⬆️
datacatalog/pkg/repositories/config/postgres.go 64.51% <ø> (-0.35%) ⬇️
datacatalog/pkg/repositories/factory.go 0.00% <ø> (ø)
datacatalog/pkg/repositories/gormimpl/artifact.go 84.37% <ø> (+1.44%) ⬆️
datacatalog/pkg/repositories/gormimpl/dataset.go 83.72% <ø> (+0.70%) ⬆️
datacatalog/pkg/repositories/gormimpl/list.go 68.42% <ø> (+3.03%) ⬆️
... and 110 more

... and 473 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@pingsutw pingsutw requested review from eapolinario, jeevb and EngHabu and removed request for eapolinario and jeevb October 19, 2023 01:00
@eapolinario
Copy link
Contributor

This is a great feature!

Copy link
Contributor

@eapolinario eapolinario left a comment

Choose a reason for hiding this comment

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

That's a great find.

@@ -1,5 +1,9 @@
name: Components Checks

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
Copy link
Contributor

Choose a reason for hiding this comment

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

We need the || github.ref to handle the non-PR case.

Copy link
Member Author

Choose a reason for hiding this comment

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

updated it

Signed-off-by: Kevin Su <[email protected]>
Copy link
Contributor

@eapolinario eapolinario left a comment

Choose a reason for hiding this comment

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

Amazing!

@eapolinario eapolinario merged commit a8d9efe into master Oct 19, 2023
46 checks passed
@eapolinario eapolinario deleted the cancel-wf branch October 19, 2023 03:52
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.

2 participants