You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "lhotari (via GitHub)" <gi...@apache.org> on 2023/03/28 08:12:43 UTC
[GitHub] [pulsar] lhotari opened a new pull request, #19947: [fix][build] Dump Jacoco coverage data to file with JMX interface in TestNG listener
lhotari opened a new pull request, #19947:
URL: https://github.com/apache/pulsar/pull/19947
Fixes #19931
### Motivation
See #19931. Sometimes the default Jacoco shutdown hook doesn't run and there's no coverage data. This causes the Codecov upload to fail since there's no Jacoco coverage report available.
### Modifications
- enable Jacoco agent's JMX interface
- Dump Jacoco coverage to file with JMX interface in TestNG listener
### Documentation
<!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. -->
- [ ] `doc` <!-- Your PR contains doc changes. -->
- [ ] `doc-required` <!-- Your PR changes impact docs and you will update later -->
- [x] `doc-not-needed` <!-- Your PR changes do not impact docs -->
- [ ] `doc-complete` <!-- Docs have been already added -->
### Matching PR in forked repository
PR in forked repository: <!-- ENTER URL HERE -->
<!--
After opening this PR, the build in apache/pulsar will fail and instructions will
be provided for opening a PR in the PR author's forked repository.
apache/pulsar pull requests should be first tested in your own fork since the
apache/pulsar CI based on GitHub Actions has constrained resources and quota.
GitHub Actions provides separate quota for pull requests that are executed in
a forked repository.
The tests will be run in the forked repository until all PR review comments have
been handled, the tests pass and the PR is approved by a reviewer.
-->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] tisonkun commented on pull request #19947: [fix][build] Dump Jacoco coverage data to file with JMX interface in TestNG listener
Posted by "tisonkun (via GitHub)" <gi...@apache.org>.
tisonkun commented on PR #19947:
URL: https://github.com/apache/pulsar/pull/19947#issuecomment-1487857532
@lhotari the error info says "not_found" and I read it as file not created. But it seems different from the previous one.
Do we now always dump the file, but the upload action itself is still unstable? IIRC there is an [upstream issue](https://community.codecov.com/t/upload-issues-unable-to-locate-build-via-github-actions-api/3954) for the latter one.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] tisonkun commented on pull request #19947: [fix][build] Dump Jacoco coverage data to file with JMX interface in TestNG listener
Posted by "tisonkun (via GitHub)" <gi...@apache.org>.
tisonkun commented on PR #19947:
URL: https://github.com/apache/pulsar/pull/19947#issuecomment-1486706750
> The building step took 55 minutes and the workflow timed out because of that. I don't see what changes you are requesting.
Yes, that's the case. Are your going to rerun the workflow in your fork and notify here once it passed, or we tag this PR as ready-to-test and rerun here?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] tisonkun commented on pull request #19947: [fix][build] Dump Jacoco coverage data to file with JMX interface in TestNG listener
Posted by "tisonkun (via GitHub)" <gi...@apache.org>.
tisonkun commented on PR #19947:
URL: https://github.com/apache/pulsar/pull/19947#issuecomment-1486976987
Hmmm...Now we can pass the flaky tests job, but it seems the integration tests upload job is still suffering:
<img width="1728" alt="image" src="https://user-images.githubusercontent.com/18818196/228266778-d25872f1-9d07-451f-9917-6cb6e8925555.png">
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] lhotari merged pull request #19947: [fix][build] Dump Jacoco coverage data to file with JMX interface in TestNG listener
Posted by "lhotari (via GitHub)" <gi...@apache.org>.
lhotari merged PR #19947:
URL: https://github.com/apache/pulsar/pull/19947
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] lhotari commented on pull request #19947: [fix][build] Dump Jacoco coverage data to file with JMX interface in TestNG listener
Posted by "lhotari (via GitHub)" <gi...@apache.org>.
lhotari commented on PR #19947:
URL: https://github.com/apache/pulsar/pull/19947#issuecomment-1486842828
/pulsarbot rerun-failure-checks
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] lhotari commented on pull request #19947: [fix][build] Dump Jacoco coverage data to file with JMX interface in TestNG listener
Posted by "lhotari (via GitHub)" <gi...@apache.org>.
lhotari commented on PR #19947:
URL: https://github.com/apache/pulsar/pull/19947#issuecomment-1487279512
> Hmmm...Now we can pass the flaky tests job, but it seems the integration tests upload job is still suffering:
>
this PR doesn't improve upload at all. It's just about dumping the Jacoco exec data.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] lhotari commented on pull request #19947: [fix][build] Dump Jacoco coverage data to file with JMX interface in TestNG listener
Posted by "lhotari (via GitHub)" <gi...@apache.org>.
lhotari commented on PR #19947:
URL: https://github.com/apache/pulsar/pull/19947#issuecomment-1486745376
@tisonkun I revisited the dumping logic once more. It turns out that with maven-surefire-plugin each test is run in it's own TestNG suite. TestNG has a separate listener interface for the completion of all tests.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] lhotari commented on pull request #19947: [fix][build] Dump Jacoco coverage data to file with JMX interface in TestNG listener
Posted by "lhotari (via GitHub)" <gi...@apache.org>.
lhotari commented on PR #19947:
URL: https://github.com/apache/pulsar/pull/19947#issuecomment-1486702502
> It seems personal CI failed before upload the report - https://github.com/lhotari/pulsar/actions/runs/4540821034/jobs/8002229561?pr=145
@tisonkun it didn't fail because of the changes made in the PR. The building step took 55 minutes and the workflow timed out because of that. I don't see what changes you are requesting.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] lhotari commented on pull request #19947: [fix][build] Dump Jacoco coverage data to file with JMX interface in TestNG listener
Posted by "lhotari (via GitHub)" <gi...@apache.org>.
lhotari commented on PR #19947:
URL: https://github.com/apache/pulsar/pull/19947#issuecomment-1487912636
> @lhotari the error info says "not_found" and I read it as file not created. But it seems different from the previous one.
>
> Do we now always dump the file, but the upload action itself is still unstable? IIRC there is an [upstream issue](https://community.codecov.com/t/upload-issues-unable-to-locate-build-via-github-actions-api/3954) for the latter one.
Exactly. For the upload issue, it seems that Codecov suggests to not consider the upload token as a secret:
> Public repositories that rely on PRs via forks will find that they cannot effectively use Codecov if the token is stored as a GitHub secret. The scope of the Codecov token is only to confirm that the coverage uploaded comes from a specific repository, not to pull down source code or make any code changes.
>
>For this reason, we recommend that teams with public repositories that rely on PRs via forks consider the security ramifications of making the Codecov token available as opposed to being in a secret.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] lhotari commented on pull request #19947: [fix][build] Dump Jacoco coverage data to file with JMX interface in TestNG listener
Posted by "lhotari (via GitHub)" <gi...@apache.org>.
lhotari commented on PR #19947:
URL: https://github.com/apache/pulsar/pull/19947#issuecomment-1486723152
> Yes, that's the case. Are your going to rerun the workflow in your fork and notify here once it passed, or we tag this PR as ready-to-test and rerun here?
@tisonkun re-running it. in progress at https://github.com/lhotari/pulsar/actions/runs/4540821034/jobs/8006055251?pr=145 . This time build step completed properly. Waiting for the whole build job to complete.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] codecov-commenter commented on pull request #19947: [fix][build] Dump Jacoco coverage data to file with JMX interface in TestNG listener
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #19947:
URL: https://github.com/apache/pulsar/pull/19947#issuecomment-1487313471
## [Codecov](https://codecov.io/gh/apache/pulsar/pull/19947?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#19947](https://codecov.io/gh/apache/pulsar/pull/19947?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (c5672e1) into [master](https://codecov.io/gh/apache/pulsar/commit/cda2827acbe62ba6c5a4dd98dbee7c9a82548339?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (cda2827) will **increase** coverage by `13.89%`.
> The diff coverage is `100.00%`.
[](https://codecov.io/gh/apache/pulsar/pull/19947?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #19947 +/- ##
=============================================
+ Coverage 58.92% 72.81% +13.89%
- Complexity 25921 31385 +5464
=============================================
Files 1846 1859 +13
Lines 136607 136808 +201
Branches 15033 15047 +14
=============================================
+ Hits 80498 99623 +19125
+ Misses 48645 29273 -19372
- Partials 7464 7912 +448
```
| Flag | Coverage Δ | |
|---|---|---|
| inttests | `24.42% <100.00%> (?)` | |
| systests | `25.07% <0.00%> (?)` | |
| unittests | `72.09% <100.00%> (+13.16%)` | :arrow_up: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/pulsar/pull/19947?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...ulsar/broker/resources/LocalPoliciesResources.java](https://codecov.io/gh/apache/pulsar/pull/19947?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHVsc2FyLWJyb2tlci1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3B1bHNhci9icm9rZXIvcmVzb3VyY2VzL0xvY2FsUG9saWNpZXNSZXNvdXJjZXMuamF2YQ==) | `75.86% <100.00%> (ø)` | |
... and [705 files with indirect coverage changes](https://codecov.io/gh/apache/pulsar/pull/19947/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org