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

40% failure rate #30

Closed
ReenigneArcher opened this issue Feb 27, 2023 · 7 comments
Closed

40% failure rate #30

ReenigneArcher opened this issue Feb 27, 2023 · 7 comments

Comments

@ReenigneArcher
Copy link

ReenigneArcher commented Feb 27, 2023

I'm trying to use this action to prevent merge conflicts. Unfortunately I'm not having a very good success rate.

This is my workflow file: https://github.com/LizardByte/PluggerDB/blob/master/.github/workflows/auto-update-db.yml

Queue step: https://github.com/LizardByte/PluggerDB/blob/284794ba8b8490e3eb4e10a29fde8c4a0bb56619/.github/workflows/auto-update-db.yml#L32-L35

Commit step that fails (sometimes): https://github.com/LizardByte/PluggerDB/blob/284794ba8b8490e3eb4e10a29fde8c4a0bb56619/.github/workflows/auto-update-db.yml#L178-L189

Any ideas how to improve this?

@Danni739496
Copy link

🐀

@Danni739496
Copy link

Explain better for people that are not good with technology. You have to find a way to video something.

@ReenigneArcher
Copy link
Author

Explain better for people that are not good with technology. You have to find a way to video something.

No offense, but if you aren't good with technology, GitHub actions and workflows are probably not for you.

Anyway, now that GitHub has introduces the merge queue feature, this action is probably obsolete... just need to find the time to setup merge queue instead.

@Danni739496
Copy link

Danni739496 commented Aug 14, 2023 via email

@alexjyong
Copy link
Contributor

@ReenigneArcher I think the failure rate you might be seeing is that it doesn't check for certain statuses that a workflow may have, like 'waiting', which is the problem i was seeing on a private repo.

I've made a PR to fix this. #38

Unfortunately even with concurrency and merge queue, there are some limitations. for example, with concurrency you have this issue:

https://github.com/orgs/community/discussions/12835

Basically: What I want:

Dev A starts up a job with concurrency rules. No one is running it, so it starts.
Dev B also starts up the job while Job A is running. They get in line and are queued until it is finished, fails, or cancelled.
Dev C-Z also want to run the job, and are queued up in order of when they requested the job to run.

What happens:
Dev A starts up a job with concurrency rules. No one is running it, so it starts.
Dev B also starts up the job while Job A is running. They get in line and are queued until Job A is finished, fails, or cancelled.
Dev C-Z also want to run the job, and when they start up the job, they kick out B, or C, or whoever is queued at the time (Job A is fine though.)

@ReenigneArcher
Copy link
Author

Thanks. I'm not sure of the cause but I suspected it very likely that multiple workflows could check if any are running at the exact same time... And none might be running in that instance so a few start up.

It's been a while since I opened this issue but if I remember correctly most of the workflows were already running.

I actually have a workaround for this.

Since I am triggering my workflows with labels, I decided to use a second label.

One label "queue", and another "run". So instead of adding run label to all of them, we add queue. And the workflow will add the run label to the next queued one it finds when it's ready.

This works for me as my workflow is using the concept of codeless contributions based on structured content in a GitHub issue, therefore it might not be possible for others to use similar logic.

@ahmadnassri
Copy link
Owner

thanks for the PR @alexjyong it's now released in v1.2.0

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

No branches or pull requests

4 participants