Skip to content

Commit b4e7924

Browse files
committed
Merge 'upstream/master' into 8.3.x-sync
2 parents dc962a1 + 01bbca5 commit b4e7924

File tree

152 files changed

+2965
-1323
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

152 files changed

+2965
-1323
lines changed

.github/workflows/2_auto_publish_release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
uses: cylc/release-actions/build-python-package@v1
3939

4040
- name: Publish distribution to PyPI
41-
uses: pypa/gh-action-pypi-publish@v1.10.1
41+
uses: pypa/gh-action-pypi-publish@v1.12.2
4242
with:
4343
user: __token__ # uses the API token feature of PyPI - least permissions possible
4444
password: ${{ secrets.PYPI_TOKEN }}

.github/workflows/test_fast.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ jobs:
150150
uses: actions/download-artifact@v4
151151

152152
- name: Codecov upload
153-
uses: codecov/codecov-action@v4
153+
uses: codecov/codecov-action@v5
154154
with:
155155
name: ${{ github.workflow }}
156156
flags: fast-tests

.github/workflows/test_functional.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ jobs:
335335
uses: actions/download-artifact@v4
336336

337337
- name: Codecov upload
338-
uses: codecov/codecov-action@v4
338+
uses: codecov/codecov-action@v5
339339
with:
340340
name: ${{ github.workflow }}
341341
flags: functional-tests

CHANGES.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,6 @@ $ towncrier create <PR-number>.<break|feat|fix>.md --content "Short description"
101101

102102
### 🔧 Fixes
103103

104-
[#6178](https://github.com/cylc/cylc-flow/pull/6178) - Fix an issue where Tui could hang when closing.
105-
106104
[#6186](https://github.com/cylc/cylc-flow/pull/6186) - Fixed bug where using flow numbers with `cylc set` would not work correctly.
107105

108106
[#6200](https://github.com/cylc/cylc-flow/pull/6200) - Fixed bug where a stalled paused workflow would be incorrectly reported as running, not paused
@@ -119,6 +117,8 @@ $ towncrier create <PR-number>.<break|feat|fix>.md --content "Short description"
119117

120118
[#6176](https://github.com/cylc/cylc-flow/pull/6176) - Fix bug where jobs which fail to submit are not shown in GUI/TUI if submission retries are set.
121119

120+
[#6178](https://github.com/cylc/cylc-flow/pull/6178) - Fix an issue where Tui could hang when closing.
121+
122122
## __cylc-8.3.0 (Released 2024-06-18)__
123123

124124
### ⚠ Breaking Changes

CONTRIBUTING.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ We use [semver](https://semver.org/) to separate riskier changes (e.g. new featu
2929
(e.g. 8.1, 8.2, 8.3)
3030

3131
**Bugfixes** and minor usability enhancements are made on bugfix branches and
32-
released as the next maintainance version (e.g. 8.0.1, 8.0.2, 8.0.3). E.G. if the issue is on the `8.0.x` milestone, branch off of `8.0.x` to
32+
released as the next maintenance version (e.g. 8.0.1, 8.0.2, 8.0.3). E.G. if the issue is on the `8.0.x` milestone, branch off of `8.0.x` to
3333
develop your bugfix, then raise the pull request against the `8.0.x` branch. We will later merge the `8.0.x` branch into `master`.
3434

3535
Feel free to ask questions on the issue or
@@ -97,6 +97,8 @@ requests_).
9797
- Shixian Sheng
9898
- Utheri Wagura
9999
- Maxime Rio
100+
- Paul Armstrong
101+
- Paul Earnshaw
100102
<!-- end-shortlog -->
101103

102104
(All contributors are identifiable with email addresses in the git version

changes.d/6137.feat.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
New Cylc lint rule: S014: Don't use job runner specific execution time limit directives, use execution time limit.

changes.d/6168.feat.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Allow symlinking log/job separately from log

changes.d/6289.feat.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Made the errors resulting from Jinja2 `raise` and `assert` statements more straight forward.

changes.d/6440.feat.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
The "cylc dump" command now prints task IDs. Use "--legacy" if you need the old format.

changes.d/6444.feat.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
The scheduler now traps the SIGINT, SIGTERM and SIGHUP signals and will respond by shutting down in --now mode. If the workflow is already shutting down in --now mode, it will escalate the shutdown to --now --now mode.

changes.d/6476.break.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Remove support for the EmPy template engine.

conda-environment.yml

-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ dependencies:
2121
- tomli >=2 # [py<3.11]
2222

2323
# optional dependencies
24-
#- empy >=3.3,<3.4
2524
#- pandas >=1.0,<2
2625
#- pympler
2726
#- matplotlib-base

cylc/flow/__init__.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,8 @@
1515
# along with this program. If not, see <http://www.gnu.org/licenses/>.
1616
"""Set up the cylc environment."""
1717

18-
import os
1918
import logging
20-
19+
import os
2120

2221
CYLC_LOG = 'cylc'
2322

@@ -53,7 +52,7 @@ def environ_init():
5352

5453
environ_init()
5554

56-
__version__ = '8.3.7.dev'
55+
__version__ = '8.4.0.dev'
5756

5857

5958
def iter_entry_points(entry_point_name):

cylc/flow/broadcast_report.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def get_broadcast_change_iter(modified_settings, is_cancel=False):
7272
value = setting
7373
keys_str = ""
7474
while isinstance(value, dict):
75-
key, value = list(value.items())[0]
75+
key, value = next(iter(value.items()))
7676
if isinstance(value, dict):
7777
keys_str += "[" + key + "]"
7878
else:

cylc/flow/cfgspec/globalcfg.py

+19-50
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
from cylc.flow.exceptions import GlobalConfigError
3131
from cylc.flow.hostuserutil import get_user_home
3232
from cylc.flow.network.client_factory import CommsMeth
33+
from cylc.flow.pathutil import SYMLINKABLE_LOCATIONS
3334
from cylc.flow.parsec.config import (
3435
ConfigNode as Conf,
3536
ParsecConfig,
@@ -1148,55 +1149,21 @@ def default_for(
11481149
11491150
.. versionadded:: 8.0.0
11501151
""")
1151-
Conf('log', VDR.V_STRING, None, desc="""
1152-
Alternative location for the log dir.
1153-
1154-
If specified the workflow log directory will be created in
1155-
``<this-path>/cylc-run/<workflow-id>/log`` and a
1156-
symbolic link will be created from
1157-
``$HOME/cylc-run/<workflow-id>/log``. If not specified
1158-
the workflow log directory will be created in
1159-
``$HOME/cylc-run/<workflow-id>/log``.
1160-
1161-
.. versionadded:: 8.0.0
1162-
""")
1163-
Conf('share', VDR.V_STRING, None, desc="""
1164-
Alternative location for the share dir.
1165-
1166-
If specified the workflow share directory will be
1167-
created in ``<this-path>/cylc-run/<workflow-id>/share``
1168-
and a symbolic link will be created from
1169-
``<$HOME/cylc-run/<workflow-id>/share``. If not specified
1170-
the workflow share directory will be created in
1171-
``$HOME/cylc-run/<workflow-id>/share``.
1172-
1173-
.. versionadded:: 8.0.0
1174-
""")
1175-
Conf('share/cycle', VDR.V_STRING, None, desc="""
1176-
Alternative directory for the share/cycle dir.
1177-
1178-
If specified the workflow share/cycle directory
1179-
will be created in
1180-
``<this-path>/cylc-run/<workflow-id>/share/cycle``
1181-
and a symbolic link will be created from
1182-
``$HOME/cylc-run/<workflow-id>/share/cycle``. If not
1183-
specified the workflow share/cycle directory will be
1184-
created in ``$HOME/cylc-run/<workflow-id>/share/cycle``.
1185-
1186-
.. versionadded:: 8.0.0
1187-
""")
1188-
Conf('work', VDR.V_STRING, None, desc="""
1189-
Alternative directory for the work dir.
1190-
1191-
If specified the workflow work directory will be created in
1192-
``<this-path>/cylc-run/<workflow-id>/work`` and a
1193-
symbolic link will be created from
1194-
``$HOME/cylc-run/<workflow-id>/work``. If not specified
1195-
the workflow work directory will be created in
1196-
``$HOME/cylc-run/<workflow-id>/work``.
1197-
1198-
.. versionadded:: 8.0.0
1199-
""")
1152+
for folder, versionadded in SYMLINKABLE_LOCATIONS.items():
1153+
Conf(folder, VDR.V_STRING, None, desc=f"""
1154+
Alternative location for the {folder} dir.
1155+
1156+
If specified the workflow {folder} directory will
1157+
be created in
1158+
``<this-path>/cylc-run/<workflow-id>/{folder}``
1159+
and a symbolic link will be created from
1160+
``$HOME/cylc-run/<workflow-id>/{folder}``.
1161+
If not specified the workflow log directory will
1162+
be created in
1163+
``$HOME/cylc-run/<workflow-id>/{folder}``.
1164+
1165+
.. versionadded:: {versionadded}
1166+
""")
12001167
with Conf('platforms', desc='''
12011168
Platforms allow you to define compute resources available at your
12021169
site.
@@ -1311,7 +1278,7 @@ def default_for(
13111278
The means by which task progress messages are reported back to
13121279
the running workflow.
13131280
1314-
Options:
1281+
..rubric:: Options:
13151282
13161283
zmq
13171284
Direct client-server TCP communication via network ports
@@ -1320,6 +1287,8 @@ def default_for(
13201287
ssh
13211288
Use non-interactive ssh for task communications
13221289
1290+
For more information, see :ref:`TaskComms`.
1291+
13231292
.. versionchanged:: 8.0.0
13241293
13251294
{REPLACES}``global.rc[hosts][<host>]task communication

cylc/flow/clean.py

+5-4
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ def _clean_check(opts: 'Values', id_: str, run_dir: Path) -> None:
126126
except ContactFileExists as exc:
127127
raise ServiceFileError(
128128
f"Cannot clean running workflow {id_}.\n\n{exc}"
129-
)
129+
) from None
130130

131131

132132
def init_clean(id_: str, opts: 'Values') -> None:
@@ -170,7 +170,7 @@ def init_clean(id_: str, opts: 'Values') -> None:
170170
try:
171171
platform_names = get_platforms_from_db(local_run_dir)
172172
except ServiceFileError as exc:
173-
raise ServiceFileError(f"Cannot clean {id_} - {exc}")
173+
raise ServiceFileError(f"Cannot clean {id_} - {exc}") from None
174174
except sqlite3.OperationalError as exc:
175175
# something went wrong with the query
176176
# e.g. the table/field we need isn't there
@@ -183,7 +183,7 @@ def init_clean(id_: str, opts: 'Values') -> None:
183183
' local files (you may need to remove files on other'
184184
' platforms manually).'
185185
)
186-
raise ServiceFileError(f"Cannot clean {id_} - {exc}")
186+
raise ServiceFileError(f"Cannot clean {id_} - {exc}") from exc
187187

188188
if platform_names and platform_names != {'localhost'}:
189189
remote_clean(
@@ -367,7 +367,8 @@ def remote_clean(
367367
except PlatformLookupError as exc:
368368
raise PlatformLookupError(
369369
f"Cannot clean {id_} on remote platforms as the workflow database "
370-
f"is out of date/inconsistent with the global config - {exc}")
370+
f"is out of date/inconsistent with the global config - {exc}"
371+
) from None
371372

372373
queue: Deque[RemoteCleanQueueTuple] = deque()
373374
remote_clean_cmd = partial(

cylc/flow/command_validation.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def flow_opts(flows: List[str], flow_wait: bool) -> None:
7777
try:
7878
int(val)
7979
except ValueError:
80-
raise InputError(ERR_OPT_FLOW_VAL)
80+
raise InputError(ERR_OPT_FLOW_VAL) from None
8181

8282
if flow_wait and flows[0] in {FLOW_NEW, FLOW_NONE}:
8383
raise InputError(ERR_OPT_FLOW_WAIT)

cylc/flow/commands.py

+10-14
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@
7777
from cylc.flow.network.schema import WorkflowStopMode
7878
from cylc.flow.parsec.exceptions import ParsecError
7979
from cylc.flow.task_id import TaskID
80-
from cylc.flow.task_state import TASK_STATUSES_ACTIVE, TASK_STATUS_FAILED
8180
from cylc.flow.workflow_status import RunMode, StopMode
8281

8382
from metomi.isodatetime.parsers import TimePointParser
@@ -211,7 +210,7 @@ async def stop(
211210
try:
212211
mode = StopMode(mode)
213212
except ValueError:
214-
raise CommandFailedError(f"Invalid stop mode: '{mode}'")
213+
raise CommandFailedError(f"Invalid stop mode: '{mode}'") from None
215214
schd._set_stop(mode)
216215
if mode is StopMode.REQUEST_KILL:
217216
schd.time_next_kill = time()
@@ -256,19 +255,16 @@ async def poll_tasks(schd: 'Scheduler', tasks: Iterable[str]):
256255

257256
@_command('kill_tasks')
258257
async def kill_tasks(schd: 'Scheduler', tasks: Iterable[str]):
259-
"""Kill all tasks or a task/family if options are provided."""
258+
"""Kill tasks.
259+
260+
Args:
261+
tasks: Tasks/families/globs to kill.
262+
"""
260263
validate.is_tasks(tasks)
261264
yield
262-
itasks, _, bad_items = schd.pool.filter_task_proxies(tasks)
263-
if schd.get_run_mode() == RunMode.SIMULATION:
264-
for itask in itasks:
265-
if itask.state(*TASK_STATUSES_ACTIVE):
266-
itask.state_reset(TASK_STATUS_FAILED)
267-
schd.data_store_mgr.delta_task_state(itask)
268-
yield len(bad_items)
269-
else:
270-
schd.task_job_mgr.kill_task_jobs(schd.workflow, itasks)
271-
yield len(bad_items)
265+
active, _, unmatched = schd.pool.filter_task_proxies(tasks)
266+
num_unkillable = schd.kill_tasks(active)
267+
yield len(unmatched) + num_unkillable
272268

273269

274270
@_command('hold')
@@ -308,7 +304,7 @@ async def set_verbosity(schd: 'Scheduler', level: Union[int, str]):
308304
lvl = int(level)
309305
LOG.setLevel(lvl)
310306
except (TypeError, ValueError) as exc:
311-
raise CommandFailedError(exc)
307+
raise CommandFailedError(exc) from None
312308
cylc.flow.flags.verbosity = log_level_to_verbosity(lvl)
313309
yield
314310

0 commit comments

Comments
 (0)