-
Notifications
You must be signed in to change notification settings - Fork 154
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
Add process dump for failed integration tests #4304
Add process dump for failed integration tests #4304
Conversation
This pull request does not have a backport label. Could you fix it @pchila? 🙏
NOTE: |
5b77394
to
b153f35
Compare
Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane) |
c26d8da
to
b153f35
Compare
pkg/testing/fixture_install.go
Outdated
// Sub-test names are separated by "/" characters which are not valid filenames on Linux. | ||
sanitizedTestName := strings.ReplaceAll(f.t.Name(), "/", "-") | ||
|
||
filePath := filepath.Join(dir, "build", "diagnostics", fmt.Sprintf("TEST-%s-ProcessDump.json", sanitizedTestName)) |
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.
Did you manage to see a build where this artifact was attached? Can you link it here?
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's in build/diagnostics
, like in this failed run https://buildkite.com/elastic/elastic-agent/builds/7359#018dccc8-2c82-4845-9aa7-6440420fb850
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.
Great! Thanks!
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.
We probably want to put the test architecture in the artifact name. You'll be able to tell windows from linux by the contents, but not arm vs x86 linux.
Diagnostics have the same naming problem, but the variables file tells you the host arch when you open them.
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.
added os and arch in 1f9348a
b153f35
to
b40fccc
Compare
b40fccc
to
5104b03
Compare
e97544b
to
1f9348a
Compare
|
What does this PR do?
This PR adds a dump of the processes running on the system when an integration test fails and saves it in a JSON file available as artifact
Why is it important?
We are often encountering strange behavior in integration tests which can be attributed to extra processes running on the system and investigation benefits from having a picture of what was running on the system close to the time of failure.
Checklist
[ ] I have made corresponding changes to the documentation[ ] I have made corresponding change to the default configuration files[ ] I have added tests that prove my fix is effective or that my feature works[ ] I have added an entry in./changelog/fragments
using the changelog tool[ ] I have added an integration test or an E2E testAuthor's Checklist
How to test this PR locally
Related issues
Use cases
Screenshots
Logs
Questions to ask yourself