fix: Make render_services exit non-zero on materialization failures#232
Merged
mwarkentin merged 2 commits intoMay 25, 2026
Merged
Conversation
Previously, when using --multithreaded, the first future.result() that raised (e.g. jinja2 UndefinedError) would crash the process immediately, hiding any subsequent failures. The non-multithreaded path had no error handling at all. Now both paths collect all errors, continue processing remaining services, print a clear summary of failures, and exit with code 1. Full tracebacks are available via --debug. Co-authored-by: Cursor <cursoragent@cursor.com>
Cover both _render_multithreaded and the CLI entry point: - All services succeed (exit 0) - All services fail (exit 1, errors collected) - Partial failure processes all services and reports summary - Error summary output format - Multithreaded vs single-threaded paths ProcessPoolExecutor is swapped for ThreadPoolExecutor in unit tests to avoid pickling issues with mocked callables. Co-authored-by: Cursor <cursoragent@cursor.com>
rgibert
approved these changes
May 25, 2026
3 tasks
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.
Summary
jinja2.exceptions.UndefinedError), the process now collects all errors, continues processing remaining services, prints a clear summary, and exits with code 1--multithreadedpath would crash on the first failing future (hiding subsequent failures), and the non-multithreaded path had no error handling at all--debugand include customer/cluster/service contextExample output
Test plan
make materialize-k8s— 4 failing services now show clear error lines and the process exits non-zeroMade with Cursor