Sagark/validate render tags on load#856
Open
sagarswamirao wants to merge 3 commits into
Open
Conversation
Renderer tags (for example `# big_value`, `# line_chart`) are validated by the
renderer at render time, but a misconfigured tag was previously invisible until
a view was queried -- and could render as "[object Object]". One case: a
child-only big_value config such as `# big_value { sparkline=... }` placed on a
view with no activating big_value. The renderer declines to match it, and the
result falls through to a String() coercion.
Validate renderer tags during the package-load compile pass instead, alongside
the existing #(authorize) check. For each top-level query and each source view,
prepare the query (compile only, no execution), take its stable result schema,
and run the renderer's headless `validateRenderTags`. Any error-severity finding
throws a ModelCompilationError, which the worker reports as the model's
compilationError (HTTP 424) -- so a bad tag fails the load with a clear message
rather than producing garbage at render time.
Only error-severity findings are fatal; warnings remain on the query-time
`renderLogs` surface so a benign render lint never blocks a package load.
Signed-off-by: Sagar Swami Rao Kulkarni <[email protected]>
…d pool issues Updated the test suite to replace the singleton PackageLoadPool with a fresh instance at the end of each test. This change prevents potential failures in subsequent tests due to the singleton pool being shut down, ensuring that tests run in isolation without interference from previous executions. Signed-off-by: [Your Name] <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.