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(
320320 self .broadcasts .get (point_string , {})
321321 .get (namespace , {})
322322 )
323- self .check_for_old_and_new_platform_settings (
323+ if self .bc_mixes_old_and_new_platform_settings (
324324 newconfig ,
325325 namespace ,
326326 coerced_setting ,
327- )
327+ ):
328+ continue
328329
329330 if namespace not in self .broadcasts [point_string ]:
330331 self .broadcasts [point_string ][namespace ] = {}
@@ -355,7 +356,7 @@ def put_broadcast(
355356 return modified_settings , bad_options
356357
357358 @staticmethod
358- def check_for_old_and_new_platform_settings (
359+ def bc_mixes_old_and_new_platform_settings (
359360 task_config , namespace , coerced_setting
360361 ):
361362 """Check for combination of old ([remote]host) and new (platform)
@@ -366,8 +367,10 @@ def check_for_old_and_new_platform_settings(
366367 fail_if_platform_and_host_conflict (
367368 task_config , namespace
368369 )
370+ return False
369371 except PlatformLookupError as exc :
370372 LOG .error ('Cannot apply broadcast:\n ' + '\n ' .join (exc .args ))
373+ return True
371374
372375 @staticmethod
373376 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(
2727
2828 https://github.com/cylc/cylc-flow/issues/6693
2929 """
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 )
3332 schd = scheduler (wid )
3433 async with start (schd ):
3534 bc_mgr = schd .broadcast_mgr
@@ -39,6 +38,7 @@ async def test_reject_valid_broadcast_is_remote_clash_with_config(
3938 settings = [{'remote' : {'host' : 'bar' }}]
4039 )
4140 assert log_filter (contains = 'Cannot apply broadcast' )
41+ assert bc_mgr .broadcasts == {'1' : {}}
4242
4343
4444async 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(
6767 settings = [{'platform' : 'foo' }]
6868 )
6969 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