Repository navigation
Make OpenHTF TestState, PhaseExecutor, and KillableThread thread-safe for concurrent phases. - #1281
Merged
Merged
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
copybara-service
Bot
force-pushed
the
test_904170357
branch
5 times, most recently
from
April 27, 2026 23:34
8aa2632 to
00e07b8
Compare
copybara-service
Bot
force-pushed
the
test_904170357
branch
from
May 3, 2026 07:51
00e07b8 to
eb9fb02
Compare
copybara-service
Bot
force-pushed
the
test_904170357
branch
8 times, most recently
from
May 3, 2026 13:12
0a2e11a to
626763b
Compare
copybara-service
Bot
force-pushed
the
test_904170357
branch
from
August 11, 2026 07:51
626763b to
01c4129
Compare
copybara-service
Bot
force-pushed
the
test_904170357
branch
from
October 7, 2026 15:51
01c4129 to
e4e39c3
Compare
copybara-service
Bot
force-pushed
the
test_904170357
branch
3 times, most recently
from
October 13, 2026 23:29
3558936 to
0206c70
Compare
copybara-service
Bot
force-pushed
the
test_904170357
branch
from
October 15, 2026 23:31
0206c70 to
81183e6
Compare
… for concurrent phases. - Use thread-local storage for running_phase_state, test_api, and last_phase_record in TestState. - Track multiple active phases via TestState.active_phases and guard shared state access with state_lock. - Bind the monitor thread in core/monitors.py to the monitored phase's PhaseState so monitors keep sampling while other phases run concurrently. - Make TestApi.get_measurement/get_attachment (and the _strict variants) check the bound phase before consulting TestState, so lookups stay correct from threads started by a phase. - Raise a clearer error from TestState.test_api when called from a thread not bound to a phase while multiple phases are running. - Finalize test outcome as ERROR when any phase has PhaseOutcome.ERROR in finalize_normally(). - Guard cProfile.Profile.enable() with a module lock in KillableThread so concurrent phase threads do not conflict when profiling is enabled. PiperOrigin-RevId: 1000478038
copybara-service
Bot
force-pushed
the
test_904170357
branch
from
October 15, 2026 23:46
81183e6 to
3bf3b5b
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.
Make OpenHTF TestState, PhaseExecutor, and KillableThread thread-safe for concurrent phases.