Skip to content

Commit cbf5210

Browse files
fix for profiles
1 parent 8a733a6 commit cbf5210

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
- Fix for bug when clicking a legend element it not hiding
1010
- `led_intensity` (i.e. changes to LEDs) now respect whether a worker is active or not.
1111
- Fix bug for UI crashing with "colors" error.
12+
- If a worker is referenced in a profile, but is not part of the current experiment, the actions will not be schedualed for it.
1213

1314

1415

pioreactor/actions/leader/experiment_profile.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
from pioreactor.cluster_management import get_active_workers_in_experiment
1717
from pioreactor.exc import MQTTValueError
18+
from pioreactor.exc import NotAssignedAnExperimentError
1819
from pioreactor.experiment_profiles import profile_struct as struct
1920
from pioreactor.logging import create_logger
2021
from pioreactor.logging import CustomLogger
@@ -873,7 +874,12 @@ def execute_experiment_profile(profile_filename: str, experiment: str, dry_run:
873874

874875
# process specific pioreactors
875876
for unit_ in profile.pioreactors:
876-
if (get_assigned_experiment_name(unit_) != experiment) and not is_testing_env():
877+
try:
878+
assigned_experiment = get_assigned_experiment_name(unit_)
879+
except NotAssignedAnExperimentError:
880+
assigned_experiment = None
881+
882+
if (assigned_experiment != experiment) and not is_testing_env():
877883
logger.warning(
878884
f"There exists profile actions for {unit}, but it's not assigned to experiment {experiment}. Skipping scheduling actions."
879885
)

0 commit comments

Comments
 (0)