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

workflow optimization #844

Merged
merged 1 commit into from
Jan 28, 2022
Merged

workflow optimization #844

merged 1 commit into from
Jan 28, 2022

Conversation

kuritka
Copy link
Collaborator

@kuritka kuritka commented Jan 26, 2022

related to #840

skipping already finished workflows, NOT concurrent (different PR). See skip detail.

I've been doing investigations about canceling workflows (https://github.com/fkirc/skip-duplicate-actions). The action works by checking in pre_job whether the pipe has already been run. Then in the main job there is a condition that either continues processing or skips the job.

This results in ALWAYS running all workflows, even duplicate ones. The difference is that the duplicates will terminate at a different point. We will still see a lot of green runs.

It's a bit different than I imagined (not starting or CANCEL the duplicate at all).
I found out that I can cancel the workflow programmatically via HTTP POST.
So if we create custom action, we can cancel on top of workflow and probably delete
cancelled job from workflows page. Such behaviour would be more expected.

Signed-off-by: kuritka [email protected]

related to #840

skipping already finished workflows, NOT concurrent (different PR)

I've been doing investigations about canceling workflows (https://github.com/fkirc/skip-duplicate-actions).
The action works by checking in pre_job whether the pipe has already been run. Then in the main job there is a condition
that either continues processing or skips the job.

This results in ALWAYS running all workflows, even duplicate ones. The difference is that the duplicates will
terminate at a different point. We will still see a lot of green runs.

It's a bit different than I imagined (not starting or CANCEL the duplicate at all).
I found out that I can cancel the workflow programmatically via HTTP POST. So if we
create different custom ction, we can cancel on top and probably delete cancelled job.

Signed-off-by: kuritka <[email protected]>
Copy link
Collaborator

@k0da k0da left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@ytsarev ytsarev 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 pretty cool, thanks!

@kuritka kuritka merged commit 8937f86 into master Jan 28, 2022
@kuritka kuritka deleted the skip-duplicit-runs branch January 28, 2022 08:00
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.

4 participants