Output HTML artifact containing all failures #67
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.
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:
test_layout
template to also wrap the artifact, making the appearance similar to the annotation within Buildkite's UI.fail_on_error
method, and any error can now be accompanied by a "diagnostics" JSON object.