-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Add configurable MAX_FORKS for jobs #5604
Add configurable MAX_FORKS for jobs #5604
Conversation
Build succeeded.
|
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.
Should we add something that enforces this after-the-fact (maybe in the tasks.py
code that looks up the actual forks value)? i.e.,
- User makes a JT w/ 5000 forks
- Admin notices and sets the max to 20
- User runs the JT
In this scenario, I think the job should still probably run, but maybe we enforce 20, and print a loud warning in the logs.
Sounds good to me. We can log a warning instead of completely preventing the launch. By enforce, do you mean just log the warning or log the warning and stop the job before the playbook gets executed? |
I'm of the opinion that we shouldn't stop the job from running - just cap the forks with |
0c2b110
to
2e450b4
Compare
args.append('--forks=%d' % job.forks) | ||
if job.forks: | ||
if settings.MAX_FORKS > 0 and job.forks > settings.MAX_FORKS: | ||
logger.warning(f'Maximum number of forks ({settings.MAX_FORKS}) exceeded.') |
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.
👍
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.
Looks good to me - thanks!
args.append('--forks=%d' % job.forks) | ||
if job.forks: | ||
if settings.MAX_FORKS > 0 and job.forks > settings.MAX_FORKS: | ||
logger.warning(f'Maximum number of forks ({settings.MAX_FORKS}) exceeded.') |
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.
Build succeeded.
|
made one small test comment otherwise no objections from me |
2e450b4
to
0d98a19
Compare
Build succeeded.
|
Build succeeded (gate pipeline).
|
Add configurable MAX_FORKS for jobs
SUMMARY
Add a configurable limit for job forks
see #5142
ISSUE TYPE
COMPONENT NAME
ADDITIONAL INFORMATION
settings
save
launch