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

Improve debug output for K8s tests #5176

Conversation

pkoutsovasilis
Copy link
Contributor

@pkoutsovasilis pkoutsovasilis commented Jul 19, 2024

What does this PR do?

Add dumping all logs of the pods in the namespace of the TestKubernetesAgentStandalone test when this fails

Why is it important?

This helps in debugging the reason of this k8s test failing

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • [ ]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 test

Disruptive User Impact

N/A

How to test this PR locally

force TestKubernetesAgentStandalone to fail and check that the pod logs are getting saved. You can check the artifacts produced here of such a case

Related issues

@elastic elastic deleted a comment from mergify bot Jul 19, 2024
@pkoutsovasilis pkoutsovasilis force-pushed the pkoutsovasilis/improve_k8s_tests_log branch from 3cdebd3 to 9e51c85 Compare July 19, 2024 13:27
@pkoutsovasilis pkoutsovasilis changed the title [do not merge] Improve debug output for K8s tests Improve debug output for K8s tests Jul 19, 2024
@pkoutsovasilis pkoutsovasilis added the enhancement New feature or request label Jul 19, 2024
Copy link

@pkoutsovasilis pkoutsovasilis marked this pull request as ready for review July 19, 2024 14:00
@pkoutsovasilis pkoutsovasilis requested a review from a team as a code owner July 19, 2024 14:00
@pkoutsovasilis
Copy link
Contributor Author

pkoutsovasilis commented Jul 19, 2024

@rdner is this something to what you are after? 🙂

@elasticmachine
Copy link
Contributor

Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane)

@pierrehilbert pierrehilbert requested review from pchila and removed request for faec July 19, 2024 14:46
Copy link
Member

@rdner rdner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@pkoutsovasilis pkoutsovasilis merged commit 96996cd into elastic:main Jul 22, 2024
16 checks passed
@pkoutsovasilis pkoutsovasilis deleted the pkoutsovasilis/improve_k8s_tests_log branch July 22, 2024 11:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve debug output for K8s tests when the pod fails to start
4 participants