Repository navigation
feat(cli): count files with old timestamps in the summary - #1278
Open
Conversation
Trunk drops every report that has old (> 24 hour) timestamps when it ingests an upload. The summary only said so in each file's warnings, which the file limit cuts off, so a run could show passing tests that Trunk then dropped. The upload and validate summaries now say how many files have old timestamps, that Trunk will drop their results, and that the test counts include them. They also suggest --bazel-bep-path, which skips results that Bazel restored from its cache. The line is never truncated and shows with --validation-report none too. The JSON summary gets filesWithOldTimestamps and a per-file oldTimestamps, and github-annotations adds a warning. Exit codes and uploads don't change. Refs TRUNK-23000 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dylan/trunk-22404-print-the-cli-summary-on-stdout-and-remove-endoutput #1278 +/- ##
==========================================================================================================
- Coverage 85.79% 82.75% -3.04%
==========================================================================================================
Files 85 85
Lines 19208 19133 -75
==========================================================================================================
- Hits 16479 15834 -645
- Misses 2729 3299 +570 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This branch has not been deployed
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.
Fixes TRUNK-23000. Stacked on #1273.
Why
Trunk's ingestion drops every report that has old (> 24 hour) timestamps (
flatten_reports_and_errorsin trunk2'sbundle-ingestion-lib). The summary said so only in each file's warnings, which the file limit cuts off. In this thread, a MongoDB upload of 112 JUnit files, partly restored from Bazel's cache, showed 1344 passing tests and "No test failures found". The warning that mattered was hidden behind…and 104 more, and Trunk then dropped those runs.What changes
The upload summary says how many files have old timestamps, apart from the per-file warnings. It never truncates that line and shows it with
--validation-report nonetoo:--summary-output-file,summary-output-schema): a top-levelfilesWithOldTimestampsand a per-fileoldTimestamps. Both default when absent, so summaries from older CLIs and the RSpec gem still parse.github-annotations: a warning annotation with the same text. A passing run with old files now has something to say, so the command exits 0 for it.validate: the same lines after its totals, andfilesWithOldTimestampsin its counts.JunitReportValidationIssueSubOptimal::OldTimestamps, the issue whose message ingestion matches (JunitReportValidation::has_old_timestamps).The Bazel hint is worded conditionally and always shown: the file paths can't tell us the files came from Bazel (MongoDB's were
/data/mci/.../results.xml).Tests
cli/tests/summary: a 112-file run past the file limit, the JSON fields, the annotation, reading a summary without the new fields, and the validate output.cli/tests/upload.rs: 10 old files past the 8-file limit. It checks that the warning shows once, that all 10 files are uploaded, and thatfilesWithOldTimestampsis 10.🤖 Generated with Claude Code