disttask: make task executor `onError` print error's stack.
What problem does this PR solve?
Issue Number: close #56014
Problem Summary:
What changed and how does it work?
Error log in onError function's stack is always in the same function.
But the real stack should be the one invoking onError.
Check List
Tests
- [x] Unit test
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.
None
Hi @LindaSummer. Thanks for your PR.
I'm waiting for a pingcap member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.
Once the patch is verified, the new status will be reflected by the ok-to-test label.
I understand the commands that are listed here.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
Hi @LindaSummer. Thanks for your PR.
PRs from untrusted users cannot be marked as trusted with /ok-to-test in this repo meaning untrusted PR authors can never trigger tests themselves. Collaborators can still trigger tests on the PR using /test all.
I understand the commands that are listed here.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.
Hi @lance6716 ,
Please take a look. π
Thanks very much.
Best Regards, Edward
/ok-to-test
And please post the test result. Or if you can, add an unit test for it. For example, check the output of logger and verify it contents the function that throws the error
Codecov Report
Attention: Patch coverage is 66.66667% with 5 lines in your changes missing coverage. Please review.
Project coverage is 56.8286%. Comparing base (
e13bfeb) to head (5420294). Report is 13 commits behind head on master.
Additional details and impacted files
@@ Coverage Diff @@
## master #56618 +/- ##
=================================================
- Coverage 73.3262% 56.8286% -16.4977%
=================================================
Files 1630 1759 +129
Lines 450312 635618 +185306
=================================================
+ Hits 330197 361213 +31016
- Misses 99833 250289 +150456
- Partials 20282 24116 +3834
| Flag | Coverage Ξ | |
|---|---|---|
| integration | 37.0566% <20.0000%> (?) |
|
| unit | 73.0720% <66.6666%> (+0.6119%) |
:arrow_up: |
Flags with carried forward coverage won't be shown. Click here to find out more.
| Components | Coverage Ξ | |
|---|---|---|
| dumpling | 52.9478% <ΓΈ> (ΓΈ) |
|
| parser | β
<ΓΈ> (β
) |
|
| br | 53.0248% <ΓΈ> (+7.4360%) |
:arrow_up: |
/ok-to-test
And please post the test result. Or if you can, add an unit test for it. For example, check the output of logger and verify it contents the function that throws the error
Thanks very much for your suggestions!
I will try to add a test case for it. π
Best Regards, Edward
Hi @lance6716 ,
I have corrected my mistake and add unit tests. π
Please take a look.
Best Regards, Edward
Thanks very much for your warm suggestion and help!
I will update this PR later today.π
Best Regards, Edward
Hi @lance6716 ,
Thanks very much for your bazel patch!π
I have updated related code and added stacktrace explicitly for all onError invokers.
Best Regards, Edward
Hi @lance6716 οΌ
Thanks for your patience and warm help! π
I have added an error stack field for stack info inside error and skipped it for error without stack info.
Best Regards, Edward
/retest
rest lgtm
Thanks very much for your patience and help! π
I'll update it later today.
Best Regards, Edward
/retest
Hi @lance6716 ,
Thanks for your review and suggestions! π
I have updated the related code, please help take a look.
Best Regards, Edward
/cc @GMHDBJD
/retest
Hi @GMHDBJD,
Sorry to bother you. π
Could help take a look?
Best Regards, Edward
/retest
/retest
/retest
[LGTM Timeline notifier]
Timeline:
2024-10-17 13:49:07.952007338 +0000 UTC m=+538145.100917175: :ballot_box_with_check: agreed by lance6716.2024-10-22 02:37:36.911991612 +0000 UTC m=+318657.608782236: :ballot_box_with_check: agreed by Benjamin2037.
/assign
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: Benjamin2037, CbcWestwolf, lance6716
The full list of commands accepted by this bot can be found here.
The pull request process is described here
- ~~pkg/disttask/OWNERS~~ [Benjamin2037,lance6716]
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
/hold
/unhold