Add per-component build_timeout for system test Docker builds#848
Add per-component build_timeout for system test Docker builds#848PranjalManhgaye wants to merge 2 commits into
Conversation
Fixes precice#840. Components can set build_timeout in components.yaml; each test uses the max across its participants. DuMuX builds get 1800s by default.
MakisH
left a comment
There was a problem hiding this comment.
Thanks for implementing! Here are some comments before testing on GHA.
| @@ -0,0 +1 @@ | |||
| - Add optional per-component `build_timeout` in `components.yaml` for the system test Docker build step ([#848](https://github.com/precice/tutorials/pull/848)). | |||
There was a problem hiding this comment.
Remember, changelogs are written in past tense:
| - Add optional per-component `build_timeout` in `components.yaml` for the system test Docker build step ([#848](https://github.com/precice/tutorials/pull/848)). | |
| - Added optional per-component `build_timeout` in `components.yaml` for the system test Docker build step ([#848](https://github.com/precice/tutorials/pull/848)). |
| name: str | ||
| template: str | ||
| parameters: BuildArguments | ||
| build_timeout: Optional[int] = None |
There was a problem hiding this comment.
I think that Optional is not the current way of implementing optional arguments in Python. One reference: https://stackoverflow.com/a/63442322/2254346
|
|
||
|
|
||
| GLOBAL_TIMEOUT = int(os.environ.get("PRECICE_SYSTEMTESTS_TIMEOUT", 600)) | ||
| DEFAULT_BUILD_TIMEOUT = int( |
There was a problem hiding this comment.
Similar comment as in #847: I get the impression we need a dictionary of defaults here. But maybe in a separate PR.
|
|
||
| dumux-adapter: | ||
| template: component-templates/dumux-adapter.yaml | ||
| build_timeout: 1800 |
There was a problem hiding this comment.
DuMux already builds with 600s. Let's set this to 600s, and reduce the GLOBAL_TIMEOUT to 300s. The SU2 adapter probably also needs the 600s.
There will be more cases with longer timeouts later.
| ### Timeouts | ||
|
|
||
| A `GLOBAL_TIMEOUT` is used for all operations. Its default value is 600s (5min), it is set in the beginning of [`Systemtests.py`](https://github.com/precice/tutorials/blob/develop/tools/tests/systemtests/Systemtest.py), and it can be overridden via the `PRECICE_SYSTEMTESTS_TIMEOUT` environment variable. | ||
| Build and run/compare use separate timeouts. |
There was a problem hiding this comment.
| Build and run/compare use separate timeouts. | |
| The build and and the run/compare steps use separate timeouts. |
| Build and run/compare use separate timeouts. | ||
|
|
||
| Tests can define a different `timeout` in their `tests.yaml` entry, which applies to the running and results comparison steps. | ||
| **Build:** Each component in `components.yaml` may define `build_timeout` (seconds). For a test, the build step uses the maximum `build_timeout` among its components; components without `build_timeout` use `DEFAULT_BUILD_TIMEOUT` (600s by default, same as `GLOBAL_TIMEOUT`). Override the default via `PRECICE_SYSTEMTESTS_BUILD_TIMEOUT`. |
There was a problem hiding this comment.
Does that mean that if I have a test that uses OpenFOAM and DuMux, building the OpenFOAM Docker image will timeout at the DuMux build timeout? Why is that?
Summary
build_timeoutto components incomponents.yaml(build step only)dumux-adapter : build_timeout: 1800for long Dumux Docker buildsfixes Timeout for building system tests containers #840