-
-
Notifications
You must be signed in to change notification settings - Fork 43
Only cancel new same_content run #112
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
Conversation
Thanks for submitting the PR. |
Hmmm, maybe I'm not fully understanding those issues, but:
Would this basically mean that, for
You obviously have a better understanding of this whole ecosystem of options here, @fkirc. |
Yes, #69 isn't only about same-content-runs. But there might be cases where the ordering matters.
Perhaps it should, but right now, people are using #34 with a combination of
There are many different ways to go forward, but I would propose the following solution:
|
I pushed another round of changes to implement the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well done, thanks for updating the docs as well 👍
core.info(`Skip execution because the exact same files are concurrently checked in ${concurrentDuplicate.html_url}`); | ||
exitSuccess({ shouldSkip: true }); | ||
} else if (context.concurrentSkipping === "same_content_newer") { | ||
const concurrentIsOlder = concurrentRuns.find((run) => new Date(run.createdAt).getTime() < new Date(context.currentRun.createdAt).getTime()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not so sure about this concurrentIsOlder
. You are checking whether there exists an older run, but you are not checking whether this older run has the same content (the same treeHash)?
This not-yet-released feature for fkirc/skip-duplicate-actions (see fkirc/skip-duplicate-actions#112) avoids a failure mode in which each concurrent duplicate job cancels itself in favor of the other one, and thus no builds are run at all. In order to use the feature, we must pin the action to 98d1dc89f43a47f8e4fba8e1c1fb8d6c5fc515ee for now.
Don't cancel all same_content runs.
Fix to issue #90 (untested, sorry).