-
Notifications
You must be signed in to change notification settings - Fork 80
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
Improve Error Handling: Jinja and Workload Template Errors #447
Comments
Error also occurs for create-workload feature when there's an error with workload template. This will need to have additional error handling.
|
Note: These are not the only issues that are encountered, just a few unclear ones. |
Will address this in a separate PR #448 (comment) |
@IanHoang it appears that there has been at least one relevant change merged, but there are still areas where Jinja error messages can be improved. Therefore, leaving this open for now. |
Is your feature request related to a problem? Please describe.
Many OSB users have encountered Jinja and workload errors that are unclear, which lead many to believe that there is a bug in OSB tool itself. This happens in several situations but often happens when users make edits to workload files. Here are a few examples and their associated fixes.
Example 1:
This was because there was a missing comma in the jinja JSON template. It's not as simple to discover this issue through a JSON formatter because there are jinja template inputs and those are labeled as incorrect in a JSON formatter.
Example 2:
This error occurred because the Jinja template inputs were missing some important parameters. However, there's no check for them. For instance, template had
{{search_clients}}
but needed{{search_clients | default(8)}}
. Another common instance is when users have something like{{index_settings | default({})}}
but needed{{index_settings | default({}) | tojson}}
.Example 3:
This error was more helpful than others but still lacked clarity. This eventually led developers to realize that there's something wrong with the jinja formatting rather than the JSON file.
Even errors that include
The complete workload has been written to '/var/folders/yh/89c2pcg10szgzwc6qj2h04gst115h_/T/tmptoxqvjsr.json' for diagnosis
in the error message are not helpful since the file for diagnosis is usually empty or unclear.Describe the solution you'd like
We should include clearer error messages for reading Jinja and workload templates.
Describe alternatives you've considered
We could have another file that checks for specific issues but that might be unwieldy. The simplest solution would be to add better error handling first.
Additional context
The text was updated successfully, but these errors were encountered: