feat(ci): add e2e duration charts#2361
Draft
universal-itengineer wants to merge 5 commits into
Draft
Conversation
4576709 to
7f07b36
Compare
Add per-spec timing propagation, Chart.js report rendering, Loop file uploads, and local report artifacts so E2E failures can include duration context. Signed-off-by: Nikita Korolev <[email protected]>
- Propagate core.warning from messenger-report.js into buildThreadMessages so duration-chart rendering failures are visible in CI logs instead of being silently masked by the "Charts unavailable." placeholder. - Cache ChartJSNodeCanvas as a module-level singleton; chart rendering is reused across clusters instead of allocating a fresh canvas each time. - Sanitize cluster name when composing chart file names so unexpected characters cannot leak into uploaded Loop attachment names. - Switch e2e-matrix workflow to npm ci with cache and document why node-version stays pinned to 20 (actions/github-script@v7 ABI). - Add jest case asserting core.warning is emitted when chart rendering rejects. Signed-off-by: Nikita Korolev <[email protected]>
If the Loop bot token lacks the upload_file permission, /api/v4/files returns HTTP 403 and the per-file uploadFileToLoop call throws. The exception used to propagate out of makeThreadedReportInLoop, aborting the whole thread and dropping the failed-tests reply that we delivered before charts were introduced. Wrap the per-reply upload in try/catch, log a warning explaining that attachments are skipped, and still post the reply text. The behaviour is now strictly additive to the pre-charts implementation: chart attachments are best-effort, the failed-tests table is guaranteed. Add a jest case that mocks /api/v4/files with a 403 and asserts the thread reply is posted without file_ids. Signed-off-by: Nikita Korolev <[email protected]>
…s only Per user feedback after a local run review: the main message has to match the pre-charts main-branch layout, and the per-cluster thread reply should attach only the chart PNGs without the extra "### Test durations / Attached charts: ..." caption block. - markdown.js: drop renderTopSlowestSection (and the formatDuration/renderDurationBar helpers it owned) and the call from buildMainMessage so "Top slowest tests" no longer appears in the main message. - markdown.js: shrink renderChartCaption to "Charts unavailable." only on chart-render error and an empty string otherwise, so a cluster with successful charts gets a clean **[cluster](url)** header plus file attachments. - messenger-report.test.js: refresh the chart and Loop scenarios to assert the new minimal thread layout and the absence of the Top-3 section in the main message. Failed-tests thread reply behavior is preserved: clusters with failures still get the "### Failed tests" table, just without the chart caption block underneath it. Signed-off-by: Nikita Korolev <[email protected]>
Signed-off-by: Nikita Korolev <[email protected]>
6aac4a5 to
63d3cc7
Compare
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.
Description
Why do we need it, and what problem does it solve?
What is the expected result?
Checklist
Changelog entries