-
Notifications
You must be signed in to change notification settings - Fork 624
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
Uploading docker logs on test failures #3236
Conversation
hdr, err := tr.Next() | ||
if err != nil { | ||
return nil, err | ||
} |
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 function is assuming as single file exists with the name provided, if this is no longer a valid assumption to make we can make this function more flexible.
diagnosticFiles := chainDiagnosticAbsoluteFilePaths(*cfg.ChainAConfig) | ||
diagnosticFiles = append(diagnosticFiles, chainDiagnosticAbsoluteFilePaths(*cfg.ChainBConfig)...) |
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.
note: this will mean that we are basically trying to get the chain-a files from chain-b and chain-b files from chain-a. They will just be skipped. I chose to make it simpler and just try them all for every container instead of finding only the correct files on a per container basis which would make things a little more complex. I think this doesn't really matter, as this is simply a tear-down function anyway.
- name: Upload Diagnostics | ||
uses: actions/upload-artifact@v3 | ||
if: ${{ failure() && inputs.upload-logs }} | ||
continue-on-error: true |
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 means uploading logs failing will not cause a test failure.
with: | ||
name: "${{ matrix.entrypoint }}-${{ matrix.test }}" | ||
path: e2e/diagnostics | ||
retention-days: 5 |
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.
arbitrary value, can probably increase this without any problems.
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.
Awesome work, should be a big improvement for debugging!
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.
Yay! Great work, code was really easy to follow
for ; !strings.HasSuffix(wd, e2eDir) || count > maxAttempts; wd = ospath.Dir(wd) { | ||
count++ | ||
} |
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.
I'm a bit confused by this. Is it possible to run these e2e's when your wd isn't the e2e directory?
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 is not strictly necessary, I just wanted to make sure that the test errors out if for some reason this case is ever true instead of hanging forever. It's probably safe to remove this entirely but I just went the extra careful route
It looks like the logs are actually being split. The logs uploaded include everything except the tail which interchain test is writing to stdout (outputted in our CI results). This is not intentional? |
Description
closes: #2666
This PR adds a cleanup hook to our E2E which fetches the container logs of all validator nodes and the relayer(s) as well as some key files which should aid debugging.
These files will be uploaded to the summary view of the github workflow.
When running these tests locally, these files will end up under
e2e/diagnostics
.There's a temporaryNot anymore!FailNow
in one of the tests to verify the log collection.Commit Message / Changelog Entry
N/A
see the guidelines for commit messages. (view raw markdown for examples)
Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.
docs/
) or specification (x/<module>/spec/
).godoc
comments.Files changed
in the Github PR explorer.Codecov Report
in the comment section below once CI passes.