-
Notifications
You must be signed in to change notification settings - Fork 344
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
Prevent error popups during KFP component parse #2561
Prevent error popups during KFP component parse #2561
Conversation
Thanks for making a pull request to Elyra! To try out this branch on binder, follow this link: |
I believe the proposed fix is too narrow in scope. The parser still terminates abnormally if the input is not valid YAML, like this XML snippet:
From the console:
|
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.
Could you please add one more test for a yaml that is syntactically not correct?
39b4c5b
to
dee8342
Compare
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.
LGTM!
Fixes #2534
What changes were proposed in this pull request?
The palette template is updated here to render component descriptions as json-safe strings. The properties template was updated to cover this scenario in #2467, but this case was missed.
Functionality was also added that checks against a basic 'component schema' for KFP YAML-based components (e.g. ensures component names are strings, etc.). This prevents errors when accessing these variables later during parsing.
Finally, the call to
parse
(for all runtimes) is also now wrapped in atry
/except
block to prevent popups in other parsing error situations that are still unaccounted for.How was this pull request tested?
A relevant existing test was updated to cover this case (which includes an update to the
kfp_test_operator.yaml
resource in/elyra/tests/pipeline/resources/components
). The Airflow parser currently does not support component descriptions so no test was added for Airflow. Also tested manually.A new test has also been added for the new component schema validation functionality.
Developer's Certificate of Origin 1.1