File tree Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -320,11 +320,12 @@ def put_broadcast(
320
320
self .broadcasts .get (point_string , {})
321
321
.get (namespace , {})
322
322
)
323
- self .check_for_old_and_new_platform_settings (
323
+ if self .bc_mixes_old_and_new_platform_settings (
324
324
newconfig ,
325
325
namespace ,
326
326
coerced_setting ,
327
- )
327
+ ):
328
+ continue
328
329
329
330
if namespace not in self .broadcasts [point_string ]:
330
331
self .broadcasts [point_string ][namespace ] = {}
@@ -355,7 +356,7 @@ def put_broadcast(
355
356
return modified_settings , bad_options
356
357
357
358
@staticmethod
358
- def check_for_old_and_new_platform_settings (
359
+ def bc_mixes_old_and_new_platform_settings (
359
360
task_config , namespace , coerced_setting
360
361
):
361
362
"""Check for combination of old ([remote]host) and new (platform)
@@ -366,8 +367,10 @@ def check_for_old_and_new_platform_settings(
366
367
fail_if_platform_and_host_conflict (
367
368
task_config , namespace
368
369
)
370
+ return False
369
371
except PlatformLookupError as exc :
370
372
LOG .error ('Cannot apply broadcast:\n ' + '\n ' .join (exc .args ))
373
+ return True
371
374
372
375
@staticmethod
373
376
def _cancel_keys_in_prunes (prunes , cancel_keys ):
Original file line number Diff line number Diff line change @@ -27,9 +27,8 @@ async def test_reject_valid_broadcast_is_remote_clash_with_config(
27
27
28
28
https://github.com/cylc/cylc-flow/issues/6693
29
29
"""
30
- conf = one_conf .copy ()
31
- conf .update ({'runtime' : {'root' : {'platform' : 'foo' }}})
32
- wid = flow (conf )
30
+ one_conf .update ({'runtime' : {'root' : {'platform' : 'foo' }}})
31
+ wid = flow (one_conf )
33
32
schd = scheduler (wid )
34
33
async with start (schd ):
35
34
bc_mgr = schd .broadcast_mgr
@@ -39,6 +38,7 @@ async def test_reject_valid_broadcast_is_remote_clash_with_config(
39
38
settings = [{'remote' : {'host' : 'bar' }}]
40
39
)
41
40
assert log_filter (contains = 'Cannot apply broadcast' )
41
+ assert bc_mgr .broadcasts == {'1' : {}}
42
42
43
43
44
44
async def test_reject_valid_broadcast_is_remote_clash_with_broadcast (
@@ -67,3 +67,4 @@ async def test_reject_valid_broadcast_is_remote_clash_with_broadcast(
67
67
settings = [{'platform' : 'foo' }]
68
68
)
69
69
assert log_filter (contains = 'Cannot apply broadcast' )
70
+ assert bc_mgr .broadcasts == {'1' : {'one' : {'remote' : {'host' : 'bar' }}}}
You can’t perform that action at this time.
0 commit comments