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

ci: reopen unit test checks and fix fatal #546

Merged
merged 3 commits into from
May 8, 2022
Merged

Conversation

Xunzhuo
Copy link
Member

@Xunzhuo Xunzhuo commented May 6, 2022

Signed-off-by: Xunzhuo [email protected]

What this PR does:

ci: reopen unit test checks and fix fatal

Test cases in below packages:

@echo "===========> Run unit test in sdk/go-sdk"
@echo "===========> Run unit test in components"
@echo "===========> Run unit test in pkg"
@echo "===========> Run unit test in diagnostics"

resolve: #529

@Xunzhuo
Copy link
Member Author

Xunzhuo commented May 6, 2022

Only this test case failed TestPublishEvent, I did not see this failure #528

@Xunzhuo
Copy link
Member Author

Xunzhuo commented May 6, 2022

image

envelope is a map[string]interface{} type, when using jsoniter to marshal it fast, it will cause panic for unsafe map. I did not look into jsoniter codes deeply, but I think when using it to marshal a map, it will cause concurrency fatals?

After fixing this, I think all unit tests passed normally, we can reopen unit test check again. And we can excute make check, make all normally when in local development.

@Xunzhuo Xunzhuo requested a review from seeflood May 6, 2022 20:14
@Xunzhuo Xunzhuo changed the title ci: reopen unit test checks ci: reopen unit test checks and fix fatal May 6, 2022
@mosn-community-bot mosn-community-bot bot added the bug Something isn't working label May 6, 2022
@codecov
Copy link

codecov bot commented May 6, 2022

Codecov Report

Merging #546 (eba6443) into main (40b8e8e) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #546   +/-   ##
=======================================
  Coverage   60.70%   60.70%           
=======================================
  Files         120      120           
  Lines        6382     6382           
=======================================
  Hits         3874     3874           
  Misses       2139     2139           
  Partials      369      369           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 40b8e8e...eba6443. Read the comment docs.

@Xunzhuo Xunzhuo mentioned this pull request May 6, 2022
25 tasks
seeflood
seeflood previously approved these changes May 7, 2022
Copy link
Member

@seeflood seeflood left a comment

Choose a reason for hiding this comment

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

LGTM.

@seeflood
Copy link
Member

seeflood commented May 7, 2022

@Xunzhuo I just found this issue with same error json-iterator/go#608
It's beacuse current json-iterator version is incompatible with go 1.18

@Xunzhuo
Copy link
Member Author

Xunzhuo commented May 7, 2022

@Xunzhuo I just found this issue with same error json-iterator/go#608 It's beacuse current json-iterator version is incompatible with go 1.18

Yes, it should be an issue in jsoniter, but I think layotto is using go 1.14?

@seeflood
Copy link
Member

seeflood commented May 7, 2022

Yes, layotto use 1.14 because mosn use 1.14

@Xunzhuo
Copy link
Member Author

Xunzhuo commented May 7, 2022

Yes, layotto use 1.14 because mosn use 1.14

I tried to upgrade jsoniter to 1.12, the fatal disappeared. We can keep jsoniter again, since it is with more high performance.

@Xunzhuo
Copy link
Member Author

Xunzhuo commented May 7, 2022

see eba6443

@Xunzhuo Xunzhuo requested a review from seeflood May 7, 2022 15:18
@seeflood seeflood closed this May 7, 2022
@seeflood seeflood reopened this May 7, 2022
Copy link
Member

@seeflood seeflood left a comment

Choose a reason for hiding this comment

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

lgtm

@seeflood seeflood requested review from a team May 8, 2022 02:56
@Xunzhuo Xunzhuo merged commit 94a6b97 into mosn:main May 8, 2022
@Xunzhuo Xunzhuo deleted the refactor-unit branch May 8, 2022 12:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cla:yes size/S
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reopen unit test in CI
3 participants