cat-log: infer --force-remote for --mode=list-dir if job.out not present#6933
cat-log: infer --force-remote for --mode=list-dir if job.out not present#6933oliver-sanders merged 14 commits intocylc:masterfrom
Conversation
FYI, if you change this message to |
Fix small logical flaw Co-authored-by: Oliver Sanders <oliver.sanders@metoffice.gov.uk>
|
Unless I've missed something, this code also closes #6597. Double check this though please. |
|
FYI: The two issues are similar, but subtly different:
|
|
I'm not sure this is actually going to the remote platform? E.g, if I apply this diff: diff --git a/cylc/flow/scripts/cat_log.py b/cylc/flow/scripts/cat_log.py
index e2ca4ad32..4af5e8536 100755
--- a/cylc/flow/scripts/cat_log.py
+++ b/cylc/flow/scripts/cat_log.py
@@ -611,6 +611,7 @@ def _main(
# (Ctrl-C while tailing)
# NOTE: This will raise NoHostsError if the platform is not
# contactable
+ LOG.critical("Goin' remote")
proc = remote_cylc_cmd(
cmd,
platform,It says it is going to the remote platform, but it doesn't log the newly added message, suggesting that it doesn't actually go remote? $ cylc cat remote//1/remote -f e --debug
DEBUG - Loading site/user config files
DEBUG - Reading file /home/users/metomi/apps/metomi-site/etc/cylc/flow/8/global.cylc
DEBUG - Processing with Jinja2
DEBUG - Setting Jinja2 template variables:
+ CYLC_TEMPLATE_VARS={'CYLC_VERSION': '8.6.0.dev', 'CYLC_TEMPLATE_VARS': {...}}
+ CYLC_VERSION=8.6.0.dev
DEBUG - Reading file /home/users/oliver.sanders/.cylc/flow/global.cylc
DEBUG - Processing with Jinja2
DEBUG - Setting Jinja2 template variables:
+ CYLC_TEMPLATE_VARS={'CYLC_VERSION': '8.6.0.dev', 'CYLC_TEMPLATE_VARS': {...}}
+ CYLC_VERSION=8.6.0.dev
DEBUG - Reading file /home/users/oliver.sanders/.cylc/flow/8/global.cylc
DEBUG - job.out not present, getting job log remotely
File not found: /home/users/oliver.sanders/cylc-run/remote/run1/log/job/1/remote/NN/job.err |
This is caused by this commit
|
There's a logical flaw? I think the remote functionality is still working on master right? |
tests/functional/cylc-cat-log/15-remote_when_no_local_log/flow.cylc
Outdated
Show resolved
Hide resolved
tests/functional/cylc-cat-log/15-remote_when_no_local_log/flow.cylc
Outdated
Show resolved
Hide resolved
|
Have converted to "draft" to assist with review prioritisation whilst Tim's comment above is addressed. |
Co-authored-by: Tim Pillinger <26465611+wxtim@users.noreply.github.com>
Co-authored-by: Ronnie Dutta <61982285+MetRonnie@users.noreply.github.com> Co-authored-by: Tim Pillinger <26465611+wxtim@users.noreply.github.com>
Co-authored-by: Tim Pillinger <26465611+wxtim@users.noreply.github.com>
This PR closes #6596.
There was an issue where if cat-log is ran in a small window of time between when a task finishes, but before the logs are copied locally, cat-log could display logs incorrectly. This change looks to see if the job.out log is present locally and if not, it defaults to remote retrieval.
Check List
CONTRIBUTING.mdand added my name as a Code Contributor.setup.cfg(andconda-environment.ymlif present).?.?.xbranch.