-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Remove multiple tasks on same template restriction #1000
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
I would too like to remove this limit. (aka +1)
If I understand code correctly I guess it's because the way repositories are handled. Defined repositories are checked-out on disk to folder like repository_{repoId}_{templateId} and updated before playbook is started. Because task can specify commit to checkout, this could cause collisions when two tasks with the same template but different commit would run at the same time. One solution I can think of is to clone fresh repository for every task to some temp folder and remove at the end. This would of course affect performance with big repositories, but cloning with |
Yes, this is the main use case for me, and had been using it this way for sometime. That said, I can confirm that when changes were pushed to the source repo it did cause collisions within the git clones during simultaneous task runs. To get around this, I thought that defining my ansible playbook as a "file" instead of a "git" source within Semaphore might do the trick, since there would be no more cloning and it would be treated as a static set of files. Is there anything I can do to help? |
As stated previously, I am manually updating my "file" defined repo outside of semaphore, which works fine for me. Some of us run our semaphore tasks in large batches, thus triggering a repo update per task would be sufficient. |
I am using "file" defined repos and just running another Semaphore Task Template against my Semaphore host to pull from git on a schedule/manual depending on need. My hosts "register" with Semaphore via the API and create a unique Task Template referencing the same repository/inventory/environment just limiting the run to the individual host. I still, however, cannot seem to get more than 10 Task Templates to run at the same time. |
Greetings! I too would love to see a 'scheduled-clone' feature in semaphore. Without a fix for the repo-path-collisions I don't see this parallel-execution-limitation going anywhere.. |
To add to this discussion... I have been using this patch in a production environment and it does exactly as stated above: |
Hi @jdhayes thank you. I want to add flag "allow_parallel" for templates before merge your PR. |
I closing this PR. |
Executing the same task template in parallel is very useful in lots of use cases. I don't know why it was restricted?