-
Notifications
You must be signed in to change notification settings - Fork 350
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
Refactor script processors, include brief detail on generic errors #1485
Refactor script processors, include brief detail on generic errors #1485
Conversation
Thanks for making a pull request to Elyra! To try out this branch on binder, follow this link: |
Should we really truncate messages? I would say that the current issues we see on the dialog box limitation might not be present on different UIs? and if we truncate the message it would not be available for UIs that have the proper way to display them? Also, if it's only in the logs, what happens with managed environments such as Hub/Binder that does not expose the logs to the user? |
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.
Changing to requested changes to discuss the direction of truncating error messages on the server-side versus on the UI.
We can open up the message, it wasn't there prior to this, so I thought I'd add a length to it. My concern is that we can easily get back to situations described here where some exception decides to be more verbose about things.
The details twisty thing essentially contains the portion of the "logs" for a user to send to an admin. |
Drilling down in this comment:
I'm curious what you're getting at here? In my opinion, exposing access to a server's log - whether that be directly or via some propagation mechanism using third-party software like Grafana - is the responsibility of the administrator/installation. We don't even instruct users to redirect the server's console output to a file where the "logs" can be persisted and "exposed". Even if the logs were exposed to the users, are we expecting users to decipher what's going on - especially in error situations? Are you proposing we capture things like status information during a given request so that that information can be returned to the user, or that we expose logs via some kind of service to work around the scenario where logs are intentionally not made available to the end-user? I'm just trying to understand the end-goal here because we'll need to design/conform our logging differently (and perhaps add state management altogether). One thought would be to assign every request a, well, request ID, that is randomly generated at the start of each request. The request ID would be logged on entry and exit from the handlers and potentially at interesting data points and certainly be included in |
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.
Looks great!
Although this change was instigated by #1337, it primarily focuses on the aftermath of the merges for #1411 and #1418 - which essentially crossed paths, leaving the R script processor behind the Python script processor in terms of its error handling.
While looking into #1337, it was found that Papermill release 2.3.3 handles the missing kernelspec much more gracefully than raising a
KeyError
. Instead, it raises aValueError
indicating the kernel could not be determined nor was one provided. However, the general error processing for notebook and both forms of script operations drop any level of details due to the unknown nature of error messages.This PR does the following:
ScriptOperationProcessor
from which the existingPythonScriptOperationProcessor
andRScriptOperationProcessor
classes now derive. This base class contains 90% of the applicable code with the subclasses providing their name and argument vectors.log_and_raise()
method on the baseFIleOperationProcessor
class that is available to all file-based operations. Building on the work done in Expose error due to failure of local python pipeline node execution #1411, this method checks the length of the error message and truncates it to around the max (80), replacing overflow with an ellipses (...).When the kernelspec information is missing, the following message will be produced:

Resolves #1337
Developer's Certificate of Origin 1.1