Skip to content
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

Upload test report #5035

Merged
merged 64 commits into from
Jan 2, 2024
Merged

Conversation

albertteoh
Copy link
Contributor

Which problem is this PR solving?

Description of the changes

  • Enables a test report summary in the PR comment and check summary.

How was this change tested?

Checklist

@albertteoh albertteoh added the changelog:ci Change related to continuous integration / testing label Dec 24, 2023
Albert Teoh added 5 commits December 25, 2023 10:44
Signed-off-by: Albert Teoh <albert@packsmith.io>
Signed-off-by: Albert Teoh <albert@packsmith.io>
Signed-off-by: Albert Teoh <albert@packsmith.io>
Signed-off-by: Albert Teoh <albert@packsmith.io>
Signed-off-by: Albert Teoh <albert@packsmith.io>
Albert Teoh added 2 commits December 25, 2023 10:51
Signed-off-by: Albert Teoh <albert@packsmith.io>
Copy link

codecov bot commented Dec 24, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (5c6348e) 95.62% compared to head (36a32c9) 95.63%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5035      +/-   ##
==========================================
+ Coverage   95.62%   95.63%   +0.01%     
==========================================
  Files         314      314              
  Lines       18294    18294              
==========================================
+ Hits        17493    17496       +3     
+ Misses        642      640       -2     
+ Partials      159      158       -1     
Flag Coverage Δ
cassandra-3.x 25.60% <ø> (ø)
cassandra-4.x 25.60% <ø> (ø)
elasticsearch-5.x 19.86% <ø> (-0.02%) ⬇️
elasticsearch-6.x 19.88% <ø> (ø)
elasticsearch-7.x 20.00% <ø> (ø)
elasticsearch-8.x 20.10% <ø> (ø)
grpc-badger 19.49% <ø> (ø)
kafka 14.10% <ø> (ø)
opensearch-1.x 20.01% <ø> (+0.01%) ⬆️
opensearch-2.x 20.01% <ø> (+0.01%) ⬆️
unittests 93.32% <ø> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: Albert Teoh <albert@packsmith.io>
@albertteoh
Copy link
Contributor Author

Set to draft to test a few things.

egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs

- name: Download and Extract Artifacts
uses: dawidd6/action-download-artifact@v3
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we know what's different about it? It's preferable to use official actions like https://github.com/actions/download-artifact

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not specifically, but I did spend a good number of hours trying out actions/download-artifact without any luck. Oddly, it wasn't able to discover the uploaded files, but there may have been a silly mistake on my part 🤷🏼 Happy to take suggestions!

Albert Teoh added 16 commits December 25, 2023 22:38
Signed-off-by: Albert Teoh <albert@packsmith.io>
Signed-off-by: Albert Teoh <albert@packsmith.io>
Signed-off-by: Albert Teoh <albert@packsmith.io>
Signed-off-by: Albert Teoh <albert@packsmith.io>
Signed-off-by: Albert Teoh <albert@packsmith.io>
Signed-off-by: Albert Teoh <albert@packsmith.io>
Signed-off-by: Albert Teoh <albert@packsmith.io>
Signed-off-by: Albert Teoh <albert@packsmith.io>
Signed-off-by: Albert Teoh <albert@packsmith.io>
Signed-off-by: Albert Teoh <albert@packsmith.io>
Signed-off-by: Albert Teoh <albert@packsmith.io>
Signed-off-by: Albert Teoh <albert@packsmith.io>
Signed-off-by: Albert Teoh <albert@packsmith.io>
Albert Teoh added 15 commits December 27, 2023 07:11
Signed-off-by: Albert Teoh <albert@packsmith.io>
WIP
Signed-off-by: Albert Teoh <albert@packsmith.io>
Signed-off-by: Albert Teoh <albert@packsmith.io>
Signed-off-by: Albert Teoh <albert@packsmith.io>
Signed-off-by: Albert Teoh <albert@packsmith.io>
Signed-off-by: Albert Teoh <albert@packsmith.io>
Signed-off-by: Albert Teoh <albert@packsmith.io>
Signed-off-by: Albert Teoh <albert@packsmith.io>
Signed-off-by: Albert Teoh <albert@packsmith.io>
Signed-off-by: Albert Teoh <albert@packsmith.io>
@albertteoh albertteoh marked this pull request as ready for review January 1, 2024 07:18
@albertteoh albertteoh requested a review from a team as a code owner January 1, 2024 07:18
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file needs to be merged into main first before we can see the results of the test report summary in PRs, which is why we can't see it in this PR.

Signed-off-by: Albert Teoh <albert@packsmith.io>
@albertteoh albertteoh mentioned this pull request Jan 1, 2024
2 tasks
- completed

jobs:
unit-test-results:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is it necessary to separate this into a different workflow? Doing so requires all the juggling with artifact files. Can we not do all it at once directly in the unit test workflow, where we already call publish reports action?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is it necessary to separate this into a different workflow? Doing so requires all the juggling with artifact files. Can we not do all it at once directly in the unit test workflow, where we already call publish reports action?

It's a valid question, because one would think the action to execute the unit test and generate the results artifact is done as part of this repo's CI pipeline, so the relevant files should be easily accessible.

In fact, we're trying to do that now (publish test results as a comment to this PR) because, I agree, it's a lot simpler than juggling artifact uploads and downloads; but it's failing with this error message (from example run):

2024-01-01 12:55:11 +0000 - publish - INFO - This action is running on a pull_request event for a fork repository. Pull request comments and check runs cannot be created, so disabling these features. To fully run the action on fork repository pull requests, see https://github.com/EnricoMi/publish-unit-test-result-action/blob/v2.12.0/README.md#support-fork-repositories-and-dependabot-branches

I don't fully understand why, but from the log message, it almost sounds like a security measure to prevent PRs from another fork from writing to a PR owned by the "parent" repo, which seems to make sense.

Can you see any other alternative?

@yurishkuro yurishkuro merged commit 0a0bdd4 into jaegertracing:main Jan 2, 2024
40 checks passed
@yurishkuro
Copy link
Member

The output of this reporting action keeps rising my blood pressure... (not your fault, Albert)

https://github.com/jaegertracing/jaeger/actions/runs/7387766706

What is "1 🔥"? When I look at JSON output there is clearly a test that failed:

{"Time":"2024-01-02T16:00:59.335298108Z","Action":"fail","Package":"github.com/jaegertracing/jaeger/plugin/storage/es","Elapsed":0.635}

@albertteoh
Copy link
Contributor Author

What is "1 🔥"? When I look at JSON output there is clearly a test that failed

It's documented here, albeit a little vaguely that it's an "erroneous" test, as opposed to a "failed" test.

Based on your example "erroneous" test and an example "failed" test my interpretation is:

  • "erroneous": a test failure caused by a panic or exit. In your example, it's triggered by a goleak check which invokes syscall.Exit.
  • "failed": a test failure caused by a failed assertion.

It is a little confusing though that, in both cases, the "Action" is "failed".

@yurishkuro
Copy link
Member

@albertteoh one of the tests failed in Go Tip run: https://github.com/jaegertracing/jaeger/actions/runs/7428429111

Is there a way to see detailed test report? The one in the summary doesn't seem to have any links.

@albertteoh albertteoh mentioned this pull request Jan 6, 2024
2 tasks
@albertteoh
Copy link
Contributor Author

Is there a way to see detailed test report? The one in the summary doesn't seem to have any links.

Yes (I see you've already approved, thanks!): #5082

yurishkuro pushed a commit that referenced this pull request Jan 6, 2024
## Which problem is this PR solving?
-
#5035 (comment)

## Description of the changes
- Publish detailed test report on go tip workflow run completion.

## How was this change tested?
- Tested in my fork:
https://github.com/albertteoh/jaeger/actions/runs/7429751382

The detailed report will be published under the Go Tip unit test run
summary:

<img width="690" alt="Screenshot 2024-01-06 at 4 42 57 pm"
src="https://github.com/jaegertracing/jaeger/assets/26584478/5b1dc038-ab09-44fc-86d1-11cf18d21e2d">

<img width="722" alt="Screenshot 2024-01-06 at 4 43 12 pm"
src="https://github.com/jaegertracing/jaeger/assets/26584478/9a09089e-74bd-458e-acfc-45fb89b59c2c">

## Checklist
- [x] I have read
https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md
- [x] I have signed all commits

---------

Signed-off-by: Albert Teoh <albert@packsmith.io>
Co-authored-by: Albert Teoh <albert@packsmith.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog:ci Change related to continuous integration / testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants