-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Log view: display any errors in listing the log files #1842
base: master
Are you sure you want to change the base?
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
Actually this change still makes sense irrespective of cylc/cylc-uiserver#607 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't appear to have made any functional difference in my tests:
test 1:
diff --git a/cylc/flow/scripts/cat_log.py b/cylc/flow/scripts/cat_log.py
index e53524cc6..78d1b3b25 100755
--- a/cylc/flow/scripts/cat_log.py
+++ b/cylc/flow/scripts/cat_log.py
@@ -452,6 +452,9 @@ def _main(
except KeyError:
mode = options.mode
+ # if mode != 'list-dir':
+ sys.exit('foo bar baz')
+
if tokens and tokens.get('cycle') and not tokens.get('task'):
print('Please provide a workflow, task or job ID', file=sys.stderr)
sys.exit(1)
test 2:
diff --git a/cylc/flow/scripts/cat_log.py b/cylc/flow/scripts/cat_log.py
index e53524cc6..17baa6f35 100755
--- a/cylc/flow/scripts/cat_log.py
+++ b/cylc/flow/scripts/cat_log.py
@@ -452,6 +452,9 @@ def _main(
except KeyError:
mode = options.mode
+ if mode != 'list-dir':
+ sys.exit('foo bar baz')
+
if tokens and tokens.get('cycle') and not tokens.get('task'):
print('Please provide a workflow, task or job ID', file=sys.stderr)
sys.exit(1)
Before (test1: test2):
After (test1: test2):
Try if mode == 'list-dir':
sys.exit('foo bar baz') |
I did, see my first diff. I can get the |
Ah sorry, this only applies to network/graphql errors. E.g. try removing the |
Removing the This PR does not appear to assist with diagnosing remote errors, e.g. try creating an SSH error with your config. This diff introduces a common network error (host not found), but no error is reported in the log view: diff --git a/cylc/flow/remote.py b/cylc/flow/remote.py
index e0ab7544a..e99903e0a 100644
--- a/cylc/flow/remote.py
+++ b/cylc/flow/remote.py
@@ -289,7 +289,8 @@ def construct_ssh_cmd(
if stdin is None:
command.append('-n')
- command.append(host)
+ # command.append(host)
+ command.append('elephant')
# Pass CYLC_VERSION and optionally, CYLC_CONF_PATH & CYLC_UTC through.
command += ['env', quote(r'CYLC_VERSION=%s' % CYLC_VERSION)] I think this PR may make sense, but at present I don't think it is helping as we need the UIS to capture and forward these errors which is clearly isn't doing at present. We should get the errors into the schema at the UIS end first, then make sure the log view is displaying them after. |
At the moment this PR guards prevents any bug in the UIS code being silent. We agreed it doesn't make sense to show an error snackbar for non-zero ret code of
Maybe we should ensure ret code 1 means no files found, and show an error snackbar for any ret code > 1? |
If there is a failure to list the log files, the user should be presented with an error message, not left in the dark.
Check List
CONTRIBUTING.md
and added my name as a Code Contributor.