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

[WIP] Add e2e ci for kubernetes with kind. #403

Closed
wants to merge 14 commits into from

Conversation

liangyuanpeng
Copy link
Contributor

@liangyuanpeng liangyuanpeng commented Jul 28, 2023

what problem are you trying to solve? (or if there's no problem, what's the motivation for this change?)

Make sure xline can work with kubernetes, so add e2e ci for kubernetes.

what changes does this pull request make?

add e2e ci for kubernetes.


Now, it's sometimes fail, sometimes success.

successed: https://github.com/liangyuanpeng/Xline/actions/runs/5688707901
failed: https://github.com/liangyuanpeng/Xline/actions/runs/5688679640/job/15418920092

@liangyuanpeng liangyuanpeng changed the title add e2e ci for kubernetes with kind. [WIP] Add e2e ci for kubernetes with kind. Jul 28, 2023
@liangyuanpeng
Copy link
Contributor Author

Now, it's sometimes fail, sometimes success.

I think it have some problem on the Xline side and need to fix.

@liangyuanpeng
Copy link
Contributor Author

/cc @bsbds @Phoenix500526

@codecov
Copy link

codecov bot commented Jul 29, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.95%. Comparing base (7ec7abb) to head (2fe65aa).
Report is 501 commits behind head on master.

❗ Current head 2fe65aa differs from pull request most recent head 5441d8b. Consider uploading reports for the commit 5441d8b to get more accurate results

Additional details and impacted files
@@             Coverage Diff             @@
##           master     #403       +/-   ##
===========================================
+ Coverage   53.38%   78.95%   +25.56%     
===========================================
  Files          96      154       +58     
  Lines       14853    21259     +6406     
  Branches    14853        0    -14853     
===========================================
+ Hits         7930    16786     +8856     
+ Misses       6427     4473     -1954     
+ Partials      496        0      -496     

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

@Phoenix500526
Copy link
Collaborator

Thank you for your contribution. Please add a sign-off in the commit message and modify It to comply with the conventional commit format. For your information: Xline commit message guidelines

@liangyuanpeng
Copy link
Contributor Author

liangyuanpeng commented Jul 31, 2023

@Phoenix500526

I will rebase it when this pr is ready for review.
For now, it's pending for here:

Now, it's sometimes fail, sometimes success.

I think it have some problem on the Xline side and need to fix.

It's need the Xline maintainer to help check ,Thanks. It's easy to reproduce it, just replace etcd with xline and work with kubernetes.

This PR can help to reproduce it.

@liangyuanpeng
Copy link
Contributor Author

Seems like it's related:

let me check it.

@liangyuanpeng
Copy link
Contributor Author

liangyuanpeng commented Aug 2, 2023

It's always successed if i disabled xline debug log.

https://github.com/liangyuanpeng/Xline/actions/workflows/kube.yml

image

@iGxnon
Copy link
Contributor

iGxnon commented Aug 2, 2023

It's always successed if i disabled xline debug log.

https://github.com/liangyuanpeng/Xline/actions/workflows/kube.yml

image

How about adding a script to display the debug log of xline within the container? You could consider adding a simple test in the CI that sends a basic request to xline and check the outputs. This might help us in analyzing any potential issues related to xline.

@liangyuanpeng
Copy link
Contributor Author

liangyuanpeng commented Aug 8, 2023

How about adding a script to display the debug log of xline within the container? You could consider adding a simple test in the CI that sends a basic request to xline and check the outputs. This might help us in analyzing any potential issues related to xline.

Absolutely. I just cut the log here, seems like the xline server have some problem. FYI

grep conflict

2023-08-08T08:01:16.533848Z DEBUG curp::server::cmd_worker::conflict_checked_mpmc: new ce event: ASReady(ProposeId("node1-657da3b8-0442-495a-b674-74a4390bfc2d"), 486)
2023-08-08T08:01:16.949130Z DEBUG curp::server::cmd_worker::conflict_checked_mpmc: new ce event: SpecExeReady(ProposeId("node1-1a24f9fa-e910-4a97-b7d1-eafad8928c32"), 487)
2023-08-08T08:01:16.949162Z DEBUG curp::server::cmd_worker::conflict_checked_mpmc: new ce event: ASReady(ProposeId("node1-1a24f9fa-e910-4a97-b7d1-eafad8928c32"), 487)
2023-08-08T08:01:18.964632Z DEBUG curp::server::cmd_worker::conflict_checked_mpmc: new ce event: SpecExeReady(ProposeId("node1-89e0ca86-814f-48f5-ba02-89a411b2f1c3"), 488)
2023-08-08T08:01:18.964658Z DEBUG curp::server::cmd_worker::conflict_checked_mpmc: new ce event: ASReady(ProposeId("node1-89e0ca86-814f-48f5-ba02-89a411b2f1c3"), 488)
2023-08-08T08:01:20.500827Z DEBUG curp::server::cmd_worker::conflict_checked_mpmc: new ce event: SpecExeReady(ProposeId("node1-10d77a7b-f4f2-4a19-958d-bcdb6fc0e683"), 489)
2023-08-08T08:01:20.500879Z DEBUG curp::server::cmd_worker::conflict_checked_mpmc: new ce event: ASReady(ProposeId("node1-10d77a7b-f4f2-4a19-958d-bcdb6fc0e683"), 489)
2023-08-08T08:01:20.592684Z DEBUG curp::server::cmd_worker::conflict_checked_mpmc: new ce event: SpecExeReady(ProposeId("node1-6b5111f6-628c-4cb1-b56c-12c59afd41e7"), 490)
2023-08-08T08:01:20.592766Z DEBUG curp::server::cmd_worker::conflict_checked_mpmc: new ce event: ASReady(ProposeId("node1-6b5111f6-628c-4cb1-b56c-12c59afd41e7"), 490)
2023-08-08T08:01:20.978428Z DEBUG curp::server::cmd_worker::conflict_checked_mpmc: new ce event: SpecExeReady(ProposeId("node1-0d4ea7a2-fb5c-4818-b797-1db8b7774564"), 491)
2023-08-08T08:01:20.978449Z DEBUG curp::server::cmd_worker::conflict_checked_mpmc: new ce event: ASReady(ProposeId("node1-0d4ea7a2-fb5c-4818-b797-1db8b7774564"), 491)
2023-08-08T08:01:22.992134Z DEBUG curp::server::cmd_worker::conflict_checked_mpmc: new ce event: SpecExeReady(ProposeId("node1-bb7c75ac-e5bc-4d77-87eb-dd213dc86340"), 492)
2023-08-08T08:01:22.992162Z DEBUG curp::server::cmd_worker::conflict_checked_mpmc: new ce event: ASReady(ProposeId("node1-bb7c75ac-e5bc-4d77-87eb-dd213dc86340"), 492)
2023-08-08T08:01:24.247018Z DEBUG curp::server::cmd_worker::conflict_checked_mpmc: new ce event: SpecExeReady(ProposeId("node1-7ef08fbe-ac08-4fb2-b1e6-7f5135aad687"), 493)
2023-08-08T08:01:24.247057Z DEBUG curp::server::cmd_worker::conflict_checked_mpmc: new ce event: ASReady(ProposeId("node1-7ef08fbe-ac08-4fb2-b1e6-7f5135aad687"), 493)
2023-08-08T08:01:25.006454Z DEBUG curp::server::cmd_worker::conflict_checked_mpmc: new ce event: SpecExeReady(ProposeId("node1-c3c6aa14-c3e3-41c5-95e1-43181ade0704"), 494)
2023-08-08T08:01:25.006476Z DEBUG curp::server::cmd_worker::conflict_checked_mpmc: new ce event: ASReady(ProposeId("node1-c3c6aa14-c3e3-41c5-95e1-43181ade0704"), 494)
2023-08-08T08:01:27.019814Z DEBUG curp::server::cmd_worker::conflict_checked_mpmc: new ce event: SpecExeReady(ProposeId("node1-58be4d25-ae1d-4a5c-bc9e-81472bc3baab"), 495)
2023-08-08T08:01:27.019862Z DEBUG curp::server::cmd_worker::conflict_checked_mpmc: new ce event: ASReady(ProposeId("node1-58be4d25-ae1d-4a5c-bc9e-81472bc3baab"), 495)

grep error

ror(Body, Error { kind: Io(Custom { kind: BrokenPipe, error: "stream closed because of a broken pipe" }) })) }
2023-08-08T08:01:27.829271Z DEBUG tonic::codec::decode: decoder inner stream error: Status { code: Unknown, message: "h2 protocol error: error reading a body from connection: stream closed because of a broken pipe", source: Some(hyper::Error(Body, Error { kind: Io(Custom { kind: BrokenPipe, error: "stream closed because of a broken pipe" }) })) }
2023-08-08T08:01:27.829287Z  WARN xline::server::watch_server: Receive WatchRequest error Status { code: Unknown, message: "h2 protocol error: error reading a body from connection: stream closed because of a broken pipe", source: Some(hyper::Error(Body, Error { kind: Io(Custom { kind: BrokenPipe, error: "stream closed because of a broken pipe" }) })) }
2023-08-08T08:01:27.829395Z DEBUG tonic::codec::decode: decoder inner stream error: Status { code: Unknown, message: "h2 protocol error: error reading a body from connection: stream closed because of a broken pipe", source: Some(hyper::Error(Body, Error { kind: Io(Custom { kind: BrokenPipe, error: "stream closed because of a broken pipe" }) })) }
2023-08-08T08:01:27.829415Z  WARN xline::server::watch_server: Receive WatchRequest error Status { code: Unknown, message: "h2 protocol error: error reading a body from connection: stream closed because of a broken pipe", source: Some(hyper::Error(Body, Error { kind: Io(Custom { kind: BrokenPipe, error: "stream closed because of a broken pipe" }) })) }
2023-08-08T08:01:27.829498Z DEBUG tonic::codec::decode: decoder inner stream error: Status { code: Unknown, message: "h2 protocol error: error reading a body from connection: stream closed because of a broken pipe", source: Some(hyper::Error(Body, Error { kind: Io(Custom { kind: BrokenPipe, error: "stream closed because of a broken pipe" }) })) }
2023-08-08T08:01:27.829519Z  WARN xline::server::watch_server: Receive WatchRequest error Status { code: Unknown, message: "h2 protocol error: error reading a body from connection: stream closed because of a broken pipe", source: Some(hyper::Error(Body, Error { kind: Io(Custom { kind: BrokenPipe, error: "stream closed because of a broken pipe" }) })) }
2023-08-08T08:01:27.829540Z DEBUG hyper::proto::h2::server: stream error: error writing a body to connection: send stream capacity unexpectedly closed
2023-08-08T08:01:27.829557Z DEBUG hyper::proto::h2::server: stream error: error writing a body to connection: send stream capacity unexpectedly closed
2023-08-08T08:01:27.829566Z DEBUG hyper::proto::h2::server: stream error: error writing a body to connection: send stream capacity unexpectedly closed
2023-08-08T08:01:27.829573Z DEBUG hyper::proto::h2::server: stream error: error writing a body to connection: send stream capacity unexpectedly closed
2023-08-08T08:01:27.829580Z DEBUG hyper::proto::h2::server: stream error: error writing a body to connection: send stream capacity unexpectedly closed
2023-08-08T08:01:27.829650Z DEBUG tonic::codec::decode: decoder inner stream error: Status { code: Unknown, message: "h2 protocol error: error reading a body from connection: stream closed because of a broken pipe", source: Some(hyper::Error(Body, Error { kind: Io(Custom { kind: BrokenPipe, error: "stream closed because of a broken pipe" }) })) }
2023-08-08T08:01:27.829668Z  WARN xline::server::watch_server: Receive WatchRequest error Status { code: Unknown, message: "h2 protocol error: error reading a body from connection: stream closed because of a broken pipe", source: Some(hyper::Error(Body, Error { kind: Io(Custom { kind: BrokenPipe, error: "stream closed because of a broken pipe" }) })) }
2023-08-08T08:01:27.829688Z DEBUG hyper::proto::h2::server: stream error: error writing a body to connection: send stream capacity unexpectedly closed
2023-08-08T08:01:27.829703Z DEBUG hyper::proto::h2::server: stream error: error writing a body to connection: send stream capacity unexpectedly closed
2023-08-08T08:01:27.829718Z DEBUG hyper::proto::h2::server: stream error: error writing a body to connection: send stream capacity unexpectedly closed
2023-08-08T08:01:27.829730Z DEBUG hyper::proto::h2::server: stream error: error writing a body to connection: send stream capacity unexpectedly closed
2023-08-08T08:01:27.829816Z DEBUG tonic::codec::decode: decoder inner stream error: Status { code: Unknown, message: "h2 protocol error: error reading a body from connection: stream closed because of a broken pipe", source: Some(hyper::Error(Body, Error { kind: Io(Custom { kind: BrokenPipe, error: "stream closed because of a broken pipe" }) })) }
2023-08-08T08:01:27.829837Z  WARN xline::server::watch_server: Receive WatchRequest error Status { code: Unknown, message: "h2 protocol error: error reading a body from connection: stream closed because of a broken pipe", source: Some(hyper::Error(Body, Error { kind: Io(Custom { kind: BrokenPipe, error: "stream closed because of a broken pipe" }) })) }
2023-08-08T08:01:27.829858Z DEBUG hyper::proto::h2::server: stream error: error writing a body to connection: send stream capacity unexpectedly closed
2023-08-08T08:01:27.829873Z DEBUG hyper::proto::h2::server: stream error: error writing a body to connection: send stream capacity unexpectedly closed
2023-08-08T08:01:27.829886Z DEBUG hyper::proto::h2::server: stream error: error writing a body to connection: send stream capacity unexpectedly closed
2023-08-08T08:01:27.829898Z DEBUG hyper::proto::h2::server: stream error: error writing a body to connection: send stream capacity unexpectedly closed
2023-08-08T08:01:27.829912Z DEBUG hyper::proto::h2::server: stream error: error writing a body to connection: send stream capacity unexpectedly closed
2023-08-08T08:01:27.829924Z DEBUG hyper::proto::h2::server: stream error: error writing a body to connection: send stream capacity unexpectedly closed
2023-08-08T08:01:27.829988Z  WARN xline::server::watch_server: Receive WatchRequest error Status { code: Unknown, message: "h2 protocol error: error reading a body from connection: stream closed because of a broken pipe", source: Some(hyper::Error(Body, Error { kind: Io(Custom { kind: BrokenPipe, error: "stream closed because of a broken pipe" }) })) }
2023-08-08T08:01:27.830058Z  WARN xline::server::watch_server: Receive WatchRequest error Status { code: Unknown, message: "h2 protocol error: error reading a body from connection: stream closed because of a broken pipe", source: Some(hyper::Error(Body, Error { kind: Io(Custom { kind: BrokenPipe, error: "stream closed because of a broken pipe" }) })) }
2023-08-08T08:01:27.829293Z  WARN xline::server::watch_server: Receive WatchRequest error Status { code: Unknown, message: "h2 protocol error: error reading a body from connection: stream closed because of a broken pipe", source: Some(hyper::Error(Body, Error { kind: Io(Custom { kind: BrokenPipe, error: "stream closed because of a broken pipe" }) })) }

The log generate from v0.5.0

This issue #402 also have some error, but is not same with here.

Maybe we can run ci with no debug log first.

@liangyuanpeng liangyuanpeng marked this pull request as draft August 17, 2023 03:09
@liangyuanpeng liangyuanpeng force-pushed the ci_e2e_k8s branch 2 times, most recently from 72934cb to 0c9b510 Compare August 18, 2023 12:44
@liangyuanpeng
Copy link
Contributor Author

liangyuanpeng commented Mar 8, 2024

Waiting for #678 is merged, and then we can go ahead.

@liangyuanpeng
Copy link
Contributor Author

Releated: #677

Copy link
Collaborator

@Phoenix500526 Phoenix500526 left a comment

Choose a reason for hiding this comment

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

Please remove trailing spaces and squash these commits.

du -h --max-depth=1 /xline/kind
ls -allh /xline/kind/containers
- name: upload kind logs
if: always()
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think uploading detailed logs when deployment failed is a better choice.

@liangyuanpeng
Copy link
Contributor Author

Create a clean PR #696 to work for it, closing..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants