-
- Downloads
Fix DockerHub build & better Pulse render error logging (#12543)
* Change font registration to run on first Pulse PNG render rather than at launch. * This will improve startup times slightly. * This was causing DockerHub builds for `metabase-head` to fail because the stage 1 "builder" image did not have `ttf-dejavu` and `fontconfig` installed (the builder was running in to #12223). * This will resolve issues discussed in #12223 where Metabase fails to launch when running on a "headless" JVM Docker image (i.e., one without AWT libraries) or when we run into the infamous font issues. We still won't be able to render Pulses, but Metabase without Pulses is slightly preferable to no Metabase at all * Improved error messages & logging when Pulse rendering fails. Unfortunately, if the AWT classes are unavailable/broken in the JVM there is no way we can render Pulses given our current reliance on it. The best we can do is explain the situation and point people in the right direction. The new error message explains the situation and points people to #7986 for more details and workarounds. As such, I am going to close #7986 because we cannot fix the underlying issue itself so the best we do is handle it better. * Refactor tests in `metabase.api.pulse-test` * Add tests for `GET /api/pulse/preview_card/:id` * Include entire Exception chain in 500 responses * Fix font registration logic not cleaning up `InputStream`s when done with them, wasting memory * Minor Dockerfile tweaks
Showing
- Dockerfile 2 additions, 4 deletionsDockerfile
- bin/docker/Dockerfile 1 addition, 1 deletionbin/docker/Dockerfile
- src/metabase/api/pulse.clj 1 addition, 2 deletionssrc/metabase/api/pulse.clj
- src/metabase/middleware/exceptions.clj 6 additions, 7 deletionssrc/metabase/middleware/exceptions.clj
- src/metabase/pulse/render/png.clj 36 additions, 26 deletionssrc/metabase/pulse/render/png.clj
- test/metabase/api/card_test.clj 263 additions, 260 deletionstest/metabase/api/card_test.clj
- test/metabase/api/pulse_test.clj 708 additions, 765 deletionstest/metabase/api/pulse_test.clj
- test/metabase/async/api_response_test.clj 63 additions, 74 deletionstest/metabase/async/api_response_test.clj
- test/metabase/pulse/render/png_test.clj 24 additions, 0 deletionstest/metabase/pulse/render/png_test.clj
- test/metabase/test.clj 14 additions, 1 deletiontest/metabase/test.clj
- test/metabase/test/util.clj 1 addition, 1 deletiontest/metabase/test/util.clj
This diff is collapsed.
This diff is collapsed.
test/metabase/pulse/render/png_test.clj
0 → 100644
Please register or sign in to comment