-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Revamp the end-of-test summary #4089
base: master
Are you sure you want to change the base?
Conversation
Co-authored-by: oleiade <[email protected]>
Co-authored-by: oleiade <[email protected]>
Co-authored-by: oleiade <[email protected]>
Co-authored-by: oleiade <[email protected]>
Co-authored-by: oleiade <[email protected]>
Co-authored-by: oleiade <[email protected]>
Co-authored-by: oleiade <[email protected]>
Co-authored-by: oleiade <[email protected]>
Co-authored-by: oleiade <[email protected]>
Co-authored-by: oleiade <[email protected]>
58138ac
to
126a188
Compare
…6 into new-end-of-test-summary-output
…6 into new-end-of-test-summary-output
1904999
to
4bb8f7a
Compare
4bb8f7a
to
9c1ed70
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did a pass on that, but need a couple of more for sure, commenting just signaling that I'm on it
@@ -360,7 +362,7 @@ func (r *Runner) HandleSummary(ctx context.Context, summary *lib.Summary) (map[s | |||
} | |||
}() | |||
|
|||
summaryCtx, cancel := context.WithTimeout(ctx, r.getTimeoutFor(consts.HandleSummaryFn)) | |||
summaryCtx, cancel := context.WithTimeout(ctx, 10*time.Minute) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Out of curriocity, why do we switch to a 10 mins timeout? 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Likely something I modified while debugging, that I forgot to set back, so great catch! 👍
@@ -207,7 +207,7 @@ type Check struct { | |||
Fails int64 `json:"fails"` | |||
} | |||
|
|||
// NewCheck creates a new check with the given name and parent group. The group may not be nil. | |||
// NewCheck creates a new check with the given name and parent group. The group must not be nil. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch! Keeping in mind comment, maybe add a validation to constructor with explicit error? 🤔
Sure, thanks! Take your time! |
Overview
This pull request changes the current end-of-test summary by a new design, with two available formats:
aiming to bring clearer a more valuable results to users. Find a screenshot below.
User-facing details
compact
summary with--with-summary=compact
, or with no argument, as it is the default choice.full
summary with--with-summary=full
.legacy
summary with--with-summary=legacy
.handleSummary
function is now different. So, those users relying on it must migrate their implementation or use--with-summary=legacy
meanwhile.Technical details (for review purposes)
output.Output
namedsummary
.internal/cmd/testdata/summary/...
with different scenarios, groups, thresholds, custom metrics and what not... that can be used for both automated and manual testing. If you think anything is missing, just suggest it.lib.Summary
vslib.LegacySummary
), to keep support for the legacy summary for some time, in an easy way, so things aren't complexity mixed and the the clean up in the future is simpler, just by removing that type, all the references to it, and simplifying the few conditionals that behave depending on which summary type is provided.summary-legacy.js
, for simpler cleanup whenever we remove that support, which I guess might be for v2 (once we ship the formalized JSON output format within v1).Internal Checklist
Before review readiness
lib.Report
as the new API for customhandleSummary
(note this would be a breaking change), or if we want to ship this progressively.js/summary.go
according to that decision.js/summary.js
:summarizeMetrics
andsummarizeMetricsWithThresholds
, or just replace the first with the second one (as we may no longer need the first one if we remove the old summary code).output/summary
package:playground/full-summary
files, or define a proper location for them.--- Ideas left for a second iteration---
General
make lint
) and all checks pass.make tests
) and all tests pass.