-
Notifications
You must be signed in to change notification settings - Fork 25
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
Capture logs for all containers used in tests #1869
Conversation
I checked manually and the artifacts created in the integration tests now hold the logs for the containers that run alongside collector. |
For a slight quality of life improvement, can we change the log files to be in a directory per test (or per suite?) rather than prefixed with the test name? There's more and more files now, and it'd be nice to separate them to make it easier to go through them |
Makes sense, I'll get it done. |
Because of how the ansible fetch module works, either flattening files directly onto the destination, overwriting files with the same name, or keeping a long path that includes the hostname and the full path to the files, I decided to use archives and fetch those to ensure no collisions happen. Now when you download the zip archive from GHA and unzip it you get the following structure:
If you
It's not ideal, but I think it's good enough for now. |
Some flakes we have in CI may be due to errors on the auxiliar containers we run alongside collector. In order to make it easier to debug this type of flakes, container logs could be used to get more information on what is going on.
This is due to the ansible fetch module either flattening files directly onto the destination directory, overwritten files with the same name, or keeping a long path that includes the hostname and the full path to the files. Best workaround I could come up with is to generate uniquely named archives that hold all logs with the proper paths and files, then move those with the flat option.
0748254
to
a5966ce
Compare
return sbStdErr.String(), nil | ||
defer logFile.Close() | ||
|
||
_, err = logFile.WriteString(log.content) |
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 error is currently ignored - if intentional, we should just use _
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.
Is this a rustc reference?
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.
it isn't 😅, not intentionally anyway
Co-authored-by: Giles Hutton <[email protected]>
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.
LGTM!
Description
Some flakes we have in CI may be due to errors on the auxiliar containers we run alongside collector. In order to make it easier to debug this type of flakes, container logs could be used to get more information on what is going on.
Checklist
Automated testing
If any of these don't apply, please comment below.
Testing Performed
CI should be enough.