-
Notifications
You must be signed in to change notification settings - Fork 345
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
Fixup debug line to target regular files and print file name #762
Conversation
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.
Just a couple of minor suggestions, but feel free to ignore them :)
travis-ci.sh
Outdated
@@ -31,7 +31,11 @@ if [ $e2eCode -ne 0 ]; then | |||
./sonobuoy logs | |||
mkdir results; tar xzf $outFile -C results | |||
find results | |||
find results/plugins -exec cat {} \; | |||
find results/plugins -type f \ | |||
-exec echo {} \; \ |
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.
This could be replaced with the -printf
flag to find
.
-exec echo {} \; \ | |
-printf '%p\n' \ |
find results/plugins -type f \ | ||
-exec echo {} \; \ | ||
-exec cat {} \; \ | ||
-exec echo \; \ |
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.
And you could echo \n
directly here using echo -e "\n\n"
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.
Seemed like 6 on one hand, half a dozen on the other.
I wasn't sure if the -e
flag was as cross-platform supported. If you know one way or the other I'd be curious.
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.
Sorry, I don't know :( In that case, probably just best to leave it as is.
Any idea why it doesn't seem to work? https://travis-ci.org/heptio/sonobuoy/builds/547900555#L4013 It is as if none of the exec stuff runs at all. |
The file |
Perhaps you could include some additional markers in those debug lines to help you know what the output from |
Fixes #761 Signed-off-by: John Schnake <[email protected]>
Codecov Report
@@ Coverage Diff @@
## master #762 +/- ##
=======================================
Coverage 42.59% 42.59%
=======================================
Files 70 70
Lines 4029 4029
=======================================
Hits 1716 1716
Misses 2208 2208
Partials 105 105 Continue to review full report at Codecov.
|
This was green on tests but I reran to try and get a failure. See here: https://travis-ci.org/heptio/sonobuoy/builds/548216979#L4065 This is a known issue upstream and already has an issue filed: kubernetes/kubernetes#78699 LGTY @zubron ? I'd like to merge these now and am happy they've proven so useful in debugging this. Once we fix that upstream bug, hopefully we wont hit this path often though. |
|
||
echo "Printing data on the following files:" | ||
find results/podlogs -type f | ||
find results/podlogs -type f \ |
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.
FYI I also added the podlogs
since those can be vital for debugging.
Fixes #761
Special notes for your reviewer:
Unable to reproduce the problem on any number of images; though the workaround is just to clearly find only the regular files.
Release note: