-
Notifications
You must be signed in to change notification settings - Fork 205
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
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 |
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. |
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!
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.! |
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 |
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>
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>
fixes: #1252