cylc-flow
cylc-flow copied to clipboard
Fix bug when broadcasting deprecated config
Repro
Any simple workflow
$ cylc broadcast wflow -p 1 -n foo -s '[job]execution time limit'
Traceback (most recent call last):
File ".../bin/cylc", line 9, in <module>
sys.exit(main())
^^^^^^
File ".../lib/python3.12/site-packages/cylc/flow/scripts/cylc.py", line 646, in main
ret = _main(opts, cmd_args)
^^^^^^^^^^^^^^^^^^^^^
File ".../lib/python3.12/site-packages/cylc/flow/scripts/cylc.py", line 706, in _main
return execute_cmd(command, *cmd_args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File ".../lib/python3.12/site-packages/cylc/flow/scripts/cylc.py", line 329, in execute_cmd
entry_point.load()(*args)
File ".../lib/python3.12/site-packages/cylc/flow/terminal.py", line 298, in wrapper
wrapped_function(*wrapped_args, **wrapped_kwargs)
File ".../lib/python3.12/site-packages/cylc/flow/scripts/broadcast.py", line 506, in main
rets = asyncio.run(_main(options, *ids))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File ".../lib/python3.12/asyncio/runners.py", line 195, in run
return runner.run(main)
^^^^^^^^^^^^^^^^
File ".../lib/python3.12/asyncio/runners.py", line 118, in run
return self._loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File ".../lib/python3.12/asyncio/base_events.py", line 691, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File ".../lib/python3.12/site-packages/cylc/flow/scripts/broadcast.py", line 511, in _main
return await call_multi_async(
^^^^^^^^^^^^^^^^^^^^^^^
File ".../lib/python3.12/site-packages/cylc/flow/network/multi.py", line 139, in call_multi_async
out, err, outcome = _process_response(
^^^^^^^^^^^^^^^^^^
File ".../lib/python3.12/site-packages/cylc/flow/network/multi.py", line 227, in _process_response
raise response
File ".../lib/python3.12/site-packages/cylc/flow/async_util.py", line 436, in _inner
return await coroutine(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File ".../lib/python3.12/site-packages/cylc/flow/scripts/broadcast.py", line 476, in run
modified_settings = result['response'][0]
~~~~~~~~~~~~~~~~~~^^^
KeyError: 0
Check List
- [x] I have read
CONTRIBUTING.mdand added my name as a Code Contributor. - [x] Contains logically grouped changes (else tidy your branch by rebase).
- [x] Does not contain off-topic changes (use other PRs for other changes).
- [x] No dependency changes
- [x] Tests are included
- [ ] Changelog entry included if this is a change that can affect users
- [x] Docs not needed
- [x] If this is a bug fix, PR should be raised against the relevant
?.?.xbranch.