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

Fix test diagnostics collection, zip the install directory when diagnostics collection fails #3468

Merged
merged 1 commit into from
Sep 25, 2023

Conversation

cmacknz
Copy link
Member

@cmacknz cmacknz commented Sep 25, 2023

This PR contains two changes to help with debugging test failures:

  1. It fixes the naming of the diagnostics files in the case where a sub-test is executing. Sub test names contain / characters which are illegal in file names on Linux. Replace the / with a -.
  2. If diagnostics collection fails for any reason, create a zip archive the agent installation directory on the test VM and upload that as a test artifact instead. This was useful when debugging the upgrade watcher test failures because I sometimes got logs and could see that the install directory was being manipulated very clearly.

Additionally, if diagnostics collection fails then capture and upload a
zip of the agent installation directory with the hope that it will
contain the logs and hint at the problem.
@cmacknz cmacknz added Team:Elastic-Agent Label for the Agent team backport-v8.10.0 Automated backport with mergify labels Sep 25, 2023
@cmacknz cmacknz requested a review from pchila September 25, 2023 15:29
@cmacknz cmacknz self-assigned this Sep 25, 2023
@cmacknz cmacknz requested a review from a team as a code owner September 25, 2023 15:29
@elasticmachine
Copy link
Contributor

Pinging @elastic/elastic-agent (Team:Elastic-Agent)

@cmacknz cmacknz enabled auto-merge (squash) September 25, 2023 15:35
@elastic-sonarqube
Copy link

SonarQube Quality Gate

Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2023-09-25T15:29:39.112+0000

  • Duration: 27 min 19 sec

Test stats 🧪

Test Results
Failed 0
Passed 6313
Skipped 59
Total 6372

💚 Flaky test report

Tests succeeded.

🤖 GitHub comments

Expand to view the GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

  • /package : Generate the packages.

  • run integration tests : Run the Elastic Agent Integration tests.

  • run end-to-end tests : Generate the packages and run the E2E Tests.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@elasticmachine
Copy link
Contributor

🌐 Coverage report

Name Metrics % (covered/total) Diff
Packages 98.78% (81/82) 👍
Files 66.102% (195/295) 👍
Classes 65.693% (360/548) 👍
Methods 52.744% (1134/2150) 👎 -0.025
Lines 38.149% (12858/33705) 👎 -0.079
Conditionals 100.0% (0/0) 💚

@cmacknz cmacknz merged commit 6a8d34a into elastic:main Sep 25, 2023
11 of 14 checks passed
mergify bot pushed a commit that referenced this pull request Sep 25, 2023
Additionally, if diagnostics collection fails then capture and upload a
zip of the agent installation directory with the hope that it will
contain the logs and hint at the problem.

(cherry picked from commit 6a8d34a)
@cmacknz cmacknz deleted the collect-more-info-failing-tests branch September 25, 2023 17:10
cmacknz added a commit that referenced this pull request Sep 25, 2023
Additionally, if diagnostics collection fails then capture and upload a
zip of the agent installation directory with the hope that it will
contain the logs and hint at the problem.

(cherry picked from commit 6a8d34a)

Co-authored-by: Craig MacKenzie <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-v8.10.0 Automated backport with mergify skip-changelog Team:Elastic-Agent Label for the Agent team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants