Skip to content
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

Fix/report compiled node on error #1381

Merged
merged 2 commits into from
Apr 2, 2019

Conversation

beckjake
Copy link
Contributor

Fixes #1371

If a RuntimeException has a node attribute attached, extract the injected_sql (if it exists) and the raw_sql from that node and put those values into the error result's data attribute with the names compiled_sql and raw_sql, respectively - this is the same behavior as the current successful result output.

While writing tests for this, I found out that the macro override was broken, and the relevant tests were testing the wrong thing, so I fixed that too.

Jacob Beck added 2 commits March 29, 2019 08:19
fix macro overrides
fix tests that masked the broken macro overrides
Copy link
Member

@cmcarthur cmcarthur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks great. nice catches for those broken tests. approved.

@@ -1,5 +1,5 @@
{% macro override_me() -%}
exceptions.raise_compiler_error('this is a bad macro')
{{ exceptions.raise_compiler_error('this is a bad macro') }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ha

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, not my finest moment 😬

@beckjake beckjake merged commit 122ee5a into dev/wilt-chamberlain Apr 2, 2019
@beckjake beckjake deleted the fix/report-compiled-node-on-error branch April 2, 2019 20:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RPC Server: return compiled SQL in exceptions when tasks fail during execution
2 participants