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

Fixup debug line to target regular files and print file name #762

Merged
merged 1 commit into from
Jun 20, 2019
Merged

Fixup debug line to target regular files and print file name #762

merged 1 commit into from
Jun 20, 2019

Conversation

johnSchnake
Copy link
Contributor

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:

NONE

@johnSchnake johnSchnake requested a review from zubron June 19, 2019 20:24
Copy link
Contributor

@zubron zubron left a 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 {} \; \
Copy link
Contributor

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.

Suggested change
-exec echo {} \; \
-printf '%p\n' \

find results/plugins -type f \
-exec echo {} \; \
-exec cat {} \; \
-exec echo \; \
Copy link
Contributor

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"

Copy link
Contributor Author

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.

Copy link
Contributor

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.

@johnSchnake
Copy link
Contributor Author

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.

@zubron
Copy link
Contributor

zubron commented Jun 19, 2019

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 results/plugins/e2e/results/e2e.log is listed twice. Is it possible that it's being found as part of the find command but it's empty so there's nothing printed below it?

@zubron
Copy link
Contributor

zubron commented Jun 19, 2019

Perhaps you could include some additional markers in those debug lines to help you know what the output from find is?

@codecov-io
Copy link

Codecov Report

Merging #762 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           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.

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

@johnSchnake
Copy link
Contributor Author

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 \
Copy link
Contributor Author

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.

@johnSchnake johnSchnake merged commit 7e5103d into vmware-tanzu:master Jun 20, 2019
@johnSchnake johnSchnake deleted the debugLines branch June 20, 2019 17:54
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.

Debug lines fail and I can't reproduce
3 participants