[RFC] overall build timeout for all the MTA modules
Opened this issue · 0 comments
According to Configuring timeout sessions, currently it's only possible to specify the build timeout on a per-module basis.
However, when the number of module grows, it could be difficult maintain the timeout parameter for all the modules, especially when things work at one place, but not others. For example it might work in the CI/CD pipeline, or for someone with powerful workstations, but not for those using slowish laptops, or even docker containers with limited resources.
Another problem is that the per-module timeout parameter needs to be configured in the mta.yaml, which is typically checked in to source repositories, e.g. GitHub, making it cumbersome to maintain customized timeout values, even more so since the parameter has to be maintain for each sub module in multi-module mtar projects.
After all, while it does make sense to control the build timeout in some contexts, especially in CI pipelines, it should not causing trouble during the development phase.
Proposals
- introduce an overall timeout build-parameter in mta.yaml, which allow to define the build timeout of the whole mtar project, which ideally should override the module specific timeout values as long as the overall build time is not exceeded.
- introduce command line options to specify the overall build timeout
- optionally, make it possible to override module-specific timeout via command line options.
The idea is to make it simple for a user to allow the build to complete, especially for the developers.
For example, mbt build --timeout 20m
should allow the build to complete within 20 minutes, overriding the per-module timeout parameters. Meanwhile another developer can use mbt build --timeout 30m
on a slower system, or with whatever value needed for his/her environment. As a special case, with mbt build --timeout 0
it should not timeout.