Skip to content

Commit

Permalink
Merge branch 'master' into fix.6262
Browse files Browse the repository at this point in the history
  • Loading branch information
wxtim authored Aug 22, 2024
2 parents 1fcacc5 + e93458a commit 0b927a6
Show file tree
Hide file tree
Showing 88 changed files with 1,082 additions and 596 deletions.
4 changes: 2 additions & 2 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ $ towncrier create <PR-number>.<break|feat|fix>.md --content "Short description"

### 🔧 Fixes

[#6178](https://github.com/cylc/cylc-flow/pull/6178) - Fix an issue where Tui could hang when closing.

[#6186](https://github.com/cylc/cylc-flow/pull/6186) - Fixed bug where using flow numbers with `cylc set` would not work correctly.

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

[#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.

[#6178](https://github.com/cylc/cylc-flow/pull/6178) - Fix an issue where Tui could hang when closing.

## __cylc-8.3.0 (Released 2024-06-18)__

### ⚠ Breaking Changes
Expand Down
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ requests_).
- Mark Dawson
- Diquan Jabbour
- Shixian Sheng
- Paul Earnshaw
<!-- end-shortlog -->

(All contributors are identifiable with email addresses in the git version
Expand Down
1 change: 1 addition & 0 deletions changes.d/6137.feat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
New Cylc lint rule: S014: Don't use job runner specific execution time limit directives, use execution time limit.
1 change: 1 addition & 0 deletions changes.d/6168.feat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Allow symlinking log/job separately from log
5 changes: 2 additions & 3 deletions cylc/flow/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
"""Set up the cylc environment."""

import os
import logging

import os

CYLC_LOG = 'cylc'

Expand Down Expand Up @@ -53,7 +52,7 @@ def environ_init():

environ_init()

__version__ = '8.3.4.dev'
__version__ = '8.4.0.dev'


def iter_entry_points(entry_point_name):
Expand Down
2 changes: 1 addition & 1 deletion cylc/flow/broadcast_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def get_broadcast_change_iter(modified_settings, is_cancel=False):
value = setting
keys_str = ""
while isinstance(value, dict):
key, value = list(value.items())[0]
key, value = next(iter(value.items()))
if isinstance(value, dict):
keys_str += "[" + key + "]"
else:
Expand Down
69 changes: 19 additions & 50 deletions cylc/flow/cfgspec/globalcfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
from cylc.flow.exceptions import GlobalConfigError
from cylc.flow.hostuserutil import get_user_home
from cylc.flow.network.client_factory import CommsMeth
from cylc.flow.pathutil import SYMLINKABLE_LOCATIONS
from cylc.flow.parsec.config import (
ConfigNode as Conf,
ParsecConfig,
Expand Down Expand Up @@ -1148,55 +1149,21 @@ def default_for(
.. versionadded:: 8.0.0
""")
Conf('log', VDR.V_STRING, None, desc="""
Alternative location for the log dir.
If specified the workflow log directory will be created in
``<this-path>/cylc-run/<workflow-id>/log`` and a
symbolic link will be created from
``$HOME/cylc-run/<workflow-id>/log``. If not specified
the workflow log directory will be created in
``$HOME/cylc-run/<workflow-id>/log``.
.. versionadded:: 8.0.0
""")
Conf('share', VDR.V_STRING, None, desc="""
Alternative location for the share dir.
If specified the workflow share directory will be
created in ``<this-path>/cylc-run/<workflow-id>/share``
and a symbolic link will be created from
``<$HOME/cylc-run/<workflow-id>/share``. If not specified
the workflow share directory will be created in
``$HOME/cylc-run/<workflow-id>/share``.
.. versionadded:: 8.0.0
""")
Conf('share/cycle', VDR.V_STRING, None, desc="""
Alternative directory for the share/cycle dir.
If specified the workflow share/cycle directory
will be created in
``<this-path>/cylc-run/<workflow-id>/share/cycle``
and a symbolic link will be created from
``$HOME/cylc-run/<workflow-id>/share/cycle``. If not
specified the workflow share/cycle directory will be
created in ``$HOME/cylc-run/<workflow-id>/share/cycle``.
.. versionadded:: 8.0.0
""")
Conf('work', VDR.V_STRING, None, desc="""
Alternative directory for the work dir.
If specified the workflow work directory will be created in
``<this-path>/cylc-run/<workflow-id>/work`` and a
symbolic link will be created from
``$HOME/cylc-run/<workflow-id>/work``. If not specified
the workflow work directory will be created in
``$HOME/cylc-run/<workflow-id>/work``.
.. versionadded:: 8.0.0
""")
for folder, versionadded in SYMLINKABLE_LOCATIONS.items():
Conf(folder, VDR.V_STRING, None, desc=f"""
Alternative location for the log dir.
If specified the workflow {folder} directory will
be created in
``<this-path>/cylc-run/<workflow-id>/{folder}``
and a symbolic link will be created from
``$HOME/cylc-run/<workflow-id>/{folder}``.
If not specified the workflow log directory will
be created in
``$HOME/cylc-run/<workflow-id>/{folder}``.
.. versionadded:: {versionadded}
""")
with Conf('platforms', desc='''
Platforms allow you to define compute resources available at your
site.
Expand Down Expand Up @@ -1311,7 +1278,7 @@ def default_for(
The means by which task progress messages are reported back to
the running workflow.
Options:
..rubric:: Options:
zmq
Direct client-server TCP communication via network ports
Expand All @@ -1320,6 +1287,8 @@ def default_for(
ssh
Use non-interactive ssh for task communications
For more information, see :ref:`TaskComms`.
.. versionchanged:: 8.0.0
{REPLACES}``global.rc[hosts][<host>]task communication
Expand Down
9 changes: 5 additions & 4 deletions cylc/flow/clean.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def _clean_check(opts: 'Values', id_: str, run_dir: Path) -> None:
except ContactFileExists as exc:
raise ServiceFileError(
f"Cannot clean running workflow {id_}.\n\n{exc}"
)
) from None


def init_clean(id_: str, opts: 'Values') -> None:
Expand Down Expand Up @@ -173,7 +173,7 @@ def init_clean(id_: str, opts: 'Values') -> None:
try:
platform_names = get_platforms_from_db(local_run_dir)
except ServiceFileError as exc:
raise ServiceFileError(f"Cannot clean {id_} - {exc}")
raise ServiceFileError(f"Cannot clean {id_} - {exc}") from None
except sqlite3.OperationalError as exc:
# something went wrong with the query
# e.g. the table/field we need isn't there
Expand All @@ -186,7 +186,7 @@ def init_clean(id_: str, opts: 'Values') -> None:
' local files (you may need to remove files on other'
' platforms manually).'
)
raise ServiceFileError(f"Cannot clean {id_} - {exc}")
raise ServiceFileError(f"Cannot clean {id_} - {exc}") from exc

if platform_names and platform_names != {'localhost'}:
remote_clean(
Expand Down Expand Up @@ -361,7 +361,8 @@ def remote_clean(
except PlatformLookupError as exc:
raise PlatformLookupError(
f"Cannot clean {id_} on remote platforms as the workflow database "
f"is out of date/inconsistent with the global config - {exc}")
f"is out of date/inconsistent with the global config - {exc}"
) from None

queue: Deque[RemoteCleanQueueTuple] = deque()
remote_clean_cmd = partial(
Expand Down
2 changes: 1 addition & 1 deletion cylc/flow/command_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def flow_opts(flows: List[str], flow_wait: bool) -> None:
try:
int(val)
except ValueError:
raise InputError(ERR_OPT_FLOW_VAL.format(val))
raise InputError(ERR_OPT_FLOW_VAL.format(val)) from None

if flow_wait and flows[0] in [FLOW_NEW, FLOW_NONE]:
raise InputError(ERR_OPT_FLOW_WAIT)
Expand Down
4 changes: 2 additions & 2 deletions cylc/flow/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ async def stop(
try:
mode = StopMode(mode)
except ValueError:
raise CommandFailedError(f"Invalid stop mode: '{mode}'")
raise CommandFailedError(f"Invalid stop mode: '{mode}'") from None
schd._set_stop(mode)
if mode is StopMode.REQUEST_KILL:
schd.time_next_kill = time()
Expand Down Expand Up @@ -309,7 +309,7 @@ async def set_verbosity(schd: 'Scheduler', level: Union[int, str]):
lvl = int(level)
LOG.setLevel(lvl)
except (TypeError, ValueError) as exc:
raise CommandFailedError(exc)
raise CommandFailedError(exc) from None
cylc.flow.flags.verbosity = log_level_to_verbosity(lvl)


Expand Down
Loading

0 comments on commit 0b927a6

Please sign in to comment.