-
Notifications
You must be signed in to change notification settings - Fork 6
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
Possibly malformed YAML in script dialog causes crash loop on subsequent use #536
Conversation
479e635
to
2042c98
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.
ok I left a few comment on the review, but here the major one:
I think you are not taking advantage of React state handling. So I understand you created postValidate
and failValidate
functions to execute first the validation and then an action, but I think you should rather handle the validation separately and check the state of that validation on the action to execute (saveNewScriptSchema
or updateScriptSchema
). You are already calling this.validateConfig
on the componentDidUpdate
method after retrieving saved script configurations, you should only have to alter saveNewScriptSchema
and updateScriptSchema
to check the validationStatus
state variable instead of embedding those in callbacks to be called inside the validateConfig
function.
Please take a look to this 🙏.
80b2e98
to
6e8f40c
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, but please take a look first to the CHANGELOG git conflict.
…Configuration. Add call validateConfig, before to the save Configure, for the garanty of check the configure with the schema.
…ion is failed SERVER_ERROR
…idate unnecessary
…e and update configure of ConfigPanel
bed8326
to
aebd1cf
Compare
Prevent the call function yaml.load() with parameter not defined and when the output is null.
Call method validateConfig, when receive the getScriptConfiguration.