Functest: Add parallel step execution - #1100
Open
elizashurov wants to merge 6 commits into
Open
Conversation
elizashurov
force-pushed
the
parallel-step-execution
branch
from
August 12, 2026 07:49
986294f to
dcb790d
Compare
elizashurov
force-pushed
the
parallel-step-execution
branch
2 times, most recently
from
August 12, 2026 09:33
5f46dbb to
cd6414d
Compare
There was a problem hiding this comment.
Pull request overview
Adds parallel branch execution to Functest with isolated variable contexts, validation, result reporting, documentation, and CI coverage.
Changes:
- Introduces the
parallelstep model and concurrent branch runner. - Adds validation, capture merging, and per-branch results.
- Documents and exercises host/guest parallel execution.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
lib/models/command_info.rb |
Adds parallel models and deep-copy helpers. |
lib/auxiliary/command_execution_manager.rb |
Registers the parallel step type. |
lib/engines/functest/branch_context.rb |
Isolates branch variables. |
lib/engines/functest/parallel_branch_runner.rb |
Runs and reports concurrent branches. |
lib/engines/functest/step_handler.rb |
Dispatches parallel steps. |
lib/engines/functest/test_executor.rb |
Validates and reports parallel blocks. |
lib/engines/functest/test_case.rb |
Labels and duplicates branch steps. |
lib/engines/functest/functest.rb |
Loads parallel execution components. |
lib/engines/functest/tests/cases/dummy_ci/parallel_host_guest.json |
Adds a parallel CI scenario. |
lib/engines/functest/tests/suites/dummy.json |
Includes the new scenario. |
docs/Functest-Engine.md |
Documents schema, constraints, and results. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Signed-off-by: Elizabeth Ashurov <eashurov@redhat.com>
Adds the ParallelBlock struct for a parallel step's named branches and fail-fast behavior, and registers `parallel` as a new CommandInfo step type. Signed-off-by: Elizabeth Ashurov <eashurov@redhat.com>
elizashurov
force-pushed
the
parallel-step-execution
branch
from
August 12, 2026 13:01
cd6414d to
93778fd
Compare
Adds a `parallel` step type that runs two or more named branches concurrently, each in its own thread, for tests that need several things happening at once. `BranchContext` gives each branch its own isolated `TestContext`, so variables captured mid-branch aren't visible to the others until the branch finishes. `ParallelBranchRunner` runs one thread per branch and waits for all of them to finish before returning. By default (`fail_fast: true`), one branch's failure cancels every other branch still running. Docs updated with the new step type's schema, constraints, and result format. Signed-off-by: Elizabeth Ashurov <eashurov@redhat.com>
Signed-off-by: Elizabeth Ashurov <eashurov@redhat.com>
Signed-off-by: Elizabeth Ashurov <eashurov@redhat.com>
Tools#act_with_tools held one global mutex for the whole call, so actions on different clients (e.g. two `parallel` branches) were serialized even though RToolsHCK opens an independent connection per machine call and shares no state between them. MachineLocks now hands out one mutex per machine name, and act_with_tools_on_machine uses it instead of the global lock, so different machines run concurrently while same-machine calls still serialize. Studio/pool-level actions still share one connection and keep the global lock via act_with_tools. Signed-off-by: Elizabeth Ashurov <eashurov@redhat.com>
elizashurov
force-pushed
the
parallel-step-execution
branch
from
August 16, 2026 08:37
93778fd to
818d95e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a
parallelstep type that runs two or more named branchesconcurrently, for tests that need several things happening at once instead of forcing everything
to run one step at a time.
ParallelBlockmodel andCommandInfo#step_type_active?/#deep_dup, centralizing step-type detection inCommandInfo.BranchContext+ParallelBranchRunnerexecute each branch in itsown thread and isolated context; captured variables are only shared
with the rest of the test once every branch finishes.
disallowed step types inside a branch, duplicate
capture_outputnames, etc.) fails fast with a clear error before the test runs.
fail_fast(defaulttrue) controls whether one branch's failurecancels the others;
functest_results.jsonreports each branch'sstatus and steps individually.
result format.
dummy_citest case exercising a host+guest parallel block in CI.