You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Buildkite annotations, which this plugin creates, are limited to 100KB, and this plugin has a
sophisticated algorithm for truncating the annotation to only the number of failures that would generate a
Markdown-formatted annotation of less than that size. With stacktraces, that number can be as low
as 15 failures: a small fraction of what a change to a large monorepo can cause.
This change causes the plugin to also upload an artifact containing the HTML-ified non-truncated Markdown
output, and link to that artifact from the annotation if the annotation has been truncated.
This requires a refactor: Truncater now knows nothing about Formatter or Markdown; it only handles
the truncation algorithm on the strings returned by a block. Much of the logic to wire Truncater and
Formatters together has been moved to a new Processor class (this name was too similar to "Runner", so I
renamed that to "Main"). This makes each class a bit more cohesive: Truncater only handles string truncation,
Processor hands off the result of Formatter to Truncater, and Main writes the result of Processor to
annotations and artifacts.
Also:
- I repurposed the `test_layout` template to also wrap the artifact, making the appearance similar to the
annotation within Buildkite's UI.
- There's now a mixin for classes that want to reraise-or-log, depending on the result of a `fail_on_error`
method, and any error can now be accompanied by a "diagnostics" JSON object.
- We now have a runtime dependency on a Markdown-to-HTML converter, so I switched to Kramdown, which
is pure Ruby. The current minimal Dockerfile doesn't have the tools to compile C extensions.
0 commit comments