-
Notifications
You must be signed in to change notification settings - Fork 41
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
feat: Add maximum jobs per template configuration #196
base: master
Are you sure you want to change the base?
Conversation
nice feature, thanks. I hope it will be merged soon. |
Thanks for the PR @arsiesys ! I won't have time to look in details before end of June though.
Not sure how to do that to be honest, but that would be an issue yes (especially if the default value prevents from creating new jobs). There's a migration helper in |
Thanks for the suggestion ! |
Hi, please change the default of maximum jobs to some value, like Hmmm, I see |
@arsiesys I'm not working on the plugin anymore :( As a last suggestion for your question, I'd suggest to contact the developers mailing list on https://groups.google.com/g/jenkinsci-dev, maybe you will get some help. Thanks again for the change, and good luck! |
Hi, can you please merge this change? It is very useful and would solve various resource exhaustion issues! |
I removed myself several months, please check with @j3t. Also, feel free to contact the Jenkins project itself via the developers mailing list if you want to participate and move this project forward! |
Description:
This pull request adds the feature to configure the maximum number of concurrent jobs per template in the Nomad plugin. It allows users to set a limit on the number of jobs that can be provisioned using a specific template.
This can be usefull in case of you nomad pool is shared across differents jenkins AND you do not have the chance to be able to use the premium quota feature.. :)
Changes:
maxConcurrentJobs
, to theNomadWorkerTemplate
class.NomadCloud
class to include a check for the maximum number of jobs when provisioning new Jenkins workers.checkExcessJobs()
, in theNomadCloud
class to determine if the maximum configured jobs for a template have been reached during provisioning.config.jelly
) for theNomadWorkerTemplate
to include the newmaxConcurrentJobs
field.NomadCloudTest
to do not breakI consider that the parameter with the value -1 is unlimited.
In my test, upgrade to the plugin have one issue. Each existing template will the value "0" until the user change it. Is there a way that I could set it to -1 so the default value would be unlimited so it doesn't break existing users configurations ? Thanks for your recommandations and reviews !