-
Notifications
You must be signed in to change notification settings - Fork 202
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
e2e: make demo pod logged only when failed running #1470
Conversation
6ad7d7b
to
54a173b
Compare
93f4603
to
4ca229f
Compare
Codecov Report
@@ Coverage Diff @@
## main #1470 +/- ##
=======================================
Coverage 50.04% 50.04%
=======================================
Files 43 43
Lines 4884 4884
=======================================
Hits 2444 2444
Misses 2301 2301
Partials 139 139 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
8b2047a
to
1301a0c
Compare
There are some parts that we did not put log printing after running a demo pod. intel-device-plugins-for-kubernetes/test/e2e/fpga/fpga.go Lines 111 to 117 in c7feb2d
intel-device-plugins-for-kubernetes/test/e2e/qat/qatplugin_dpdk.go Lines 167 to 181 in c7feb2d
intel-device-plugins-for-kubernetes/test/e2e/sgx/sgx.go Lines 117 to 119 in c7feb2d
Then, do we add it in this PR? Or was there any reason that we do not need to check the logs from those? |
No reason. In the past each e2e module was worked on independently by different individuals and that made the implementations to differ. I hope your work can make them to be more consistent. If this PR plans to fix #1252, let's do that for all of the devices then and so that they work the same. Note that the ask for #1252 to not log output when there are no errors and only log when the sample app fails. |
1301a0c
to
69bb533
Compare
I see. I felt that it would be good to have a common function for pod logging, then it would be consistent in any case. The function does: 1. check if the error is nil or not 2. if not nil, then prints logs 3 and then fail with the error
Ok, with the function I made, we can also achieve that only when there are errors, logs are printed. |
Ready for review! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick, can you squash commits into one or two? I don't think each device merits a separate commit.
Otherwise, looks good!
69bb533
to
b3917d7
Compare
88001ea
to
75872c2
Compare
Idk why, but after changing to gomega way, linter govet (shadow the declaration of err earlier) complains a lot in many random places though there was no change there. Actually in the first place when I changed the structure of e2e tests to have layers like But, anyway, I included in this PR in the first commit to prevent all the possible problems in the future.! |
ad683a8
to
00e78f5
Compare
c3ae7fc
to
9febcfd
Compare
Something else to be chaged? |
@tkatila needs to approve to unblock merging but e2e-* are also not healthy so we will want to get everything working again before merging |
9febcfd
to
de0b4f6
Compare
when err is declared and any parts below that declare again, linter complains as follows: shadow: declaration of err shadows declaration at line 51 so, we name the first declaration as errFailedToLocateRepoFile so that other 'err's do not need to be named all in different names or can be declared as 'err' without linter error. Signed-off-by: Hyeongju Johannes Lee <hyeongju.lee@intel.com>
Signed-off-by: Hyeongju Johannes Lee <hyeongju.lee@intel.com>
de0b4f6
to
fe87b7c
Compare
this makes a demo pod's log get printed only when the pod did not run sucessfully Signed-off-by: Hyeongju Johannes Lee <hyeongju.lee@intel.com>
Signed-off-by: Hyeongju Johannes Lee <hyeongju.lee@intel.com>
fe87b7c
to
42a735b
Compare
fixes: #1252