diff --git a/.buildkite/autogenerate_pipeline.py b/.buildkite/autogenerate_pipeline.py index b82f7f9..4a29d7c 100755 --- a/.buildkite/autogenerate_pipeline.py +++ b/.buildkite/autogenerate_pipeline.py @@ -69,6 +69,14 @@ AARCH64_AGENT_TAGS = os.getenv('AARCH64_LINUX_AGENT_TAGS') DOCKER_PLUGIN_CONFIG = os.getenv('DOCKER_PLUGIN_CONFIG') TESTS_TO_SKIP = os.getenv('TESTS_TO_SKIP') TIMEOUTS_MIN = os.getenv('TIMEOUTS_MIN') +# This env allows setting the hypervisor on which the tests are running at the +# pipeline level. This will not override the hypervisor tag in case one is +# already specified in the test definition. +# Most of the repositories don't really need to run on KVM per se, but we are +# experiencing some timeouts mostly with the mshv hosts right now, and we are +# fixing the default to kvm to work around that problem. +# More details here: https://github.com/rust-vmm/community/issues/137 +DEFAULT_AGENT_TAG_HYPERVISOR = os.getenv('DEFAULT_AGENT_TAG_HYPERVISOR', 'kvm') PARENT_DIR = pathlib.Path(__file__).parent.resolve() @@ -298,6 +306,8 @@ class BuildkiteConfig: for platform in platforms: step_input = copy.deepcopy(test) step_input['platform'] = platform + if not step_input.get('hypervisor'): + step_input['hypervisor'] = DEFAULT_AGENT_TAG_HYPERVISOR step = BuildkiteStep() step_output = step.build(step_input) diff --git a/README.md b/README.md index 9086a72..b457525 100644 --- a/README.md +++ b/README.md @@ -74,6 +74,12 @@ variables. https://github.com/buildkite-plugins/docker-buildkite-plugin. - `TESTS_TO_SKIP`: specifies a list of tests to be skipped. - `TIMEOUTS_MIN`: overrides the timeout value for specific tests. +- `DEFAULT_AGENT_TAG_HYPERVISOR`: sets the hypervisor on which all the tests in + the pipeline run. By default, the selected hypervisor is KVM because the + hosts running KVM at the time of this change showed better performance and + experienced timeouts less often. NOTE: This will not override the hypervisor + defined at the test step level. If a test already defines a hypervisor tag + that will remain intact. The variable `TESTS_TO_SKIP` is specified as a JSON list with the names of the tests to be skipped. The variable `TIMEOUTS_MIN` is a dictionary where