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.
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
Publish test report #5030
Publish test report #5030
Changes from 10 commits
7468c2c
7f6e2d6
40396b7
d2e01fc
a26c734
6d002f4
a53b45e
9943f11
ed69e54
5cd1dc0
396fb72
aa357c1
2be51fa
e5827a6
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
what does this do?
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.
Oops, good catch, that was me experimenting with https://github.com/EnricoMi/publish-unit-test-result-action/blob/v2.12.0/README.md#support-fork-repositories-and-dependabot-branches and was an accidental half-baked change. Reverted in 396fb72 and aa357c1.
That may have been why we could see the test report in https://github.com/jaegertracing/jaeger/actions/runs/7315855796?pr=5030#summary-19929936699, but I'll check once the test CI job is done.
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.
@albertteoh what makes it a JSON file? If I change it to
| tee test-results.json
then I see the standard text output:If it is meant to be std output, then I would suggest changing to
|tee
because it makes the CI logs show the test progress.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.
The
test-ci
make target definesGOTEST
as:GOTEST := $(GOTEST_QUIET) -json
; so it's the extra-json
flag that makes the output json: https://github.com/jaegertracing/jaeger/blob/main/Makefile#L460.So the full command would resemble (with
| tee
):Adding a
| jq .
to the end of that, and the output looks like:It's a good callout though, because I hadn't considered the impact of this change on the stdout display of test results which are useful for debugging unit test runs. Maybe test summaries are not worth the trade-off for harder to read test output?
What do you think?
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 see. I think
jq
will be overkill, but changing totee
is good. Thetest-ci
is not really meant to be run locally, but with-json
flag the output is still readable(btw
jq
wouldn't work at all because ^ is not a well-formed JSON, it has no top-level container).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.
Cool, I've created a PR to use
| tee
: #5050.Running it locally,
jq
seemed to be okay with it; it just outputs separate JSON blobs: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.
there's also the question of pipe buffering, I think it gets worse so we'd less the output less frequently (but maybe I was just impatient). Anyway, I think one line is fine for now. I am more concerned with now failing the rest of the workflow when test results cannot be uploaded for whatever reason.
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.
There are no upload/download steps in our test summary reporting workflows at the moment. You're right though, because I vaguely recall codecov upload failures may have failed the rest of the workflow in the past.
If we do want test summary reports on our PRs as comments and in the check runs, then artifact uploads and downloads would be required. Is this feature desirable enough to warrant introducing uploads? If not, I can hit the pause button on my WIP.
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 don't feel like it's worth the hustle. The fact that test results are already showing in the summary is good, although if all it does is show the count (not the details of the failures) then it's pretty useless. Adding comments and checks is nice to have, but not at the expense of stability of the CI, which has been happening in the past few days due to these changes.