ucx icon indicating copy to clipboard operation
ucx copied to clipboard

CI: create exit log

Open michal-shalev opened this issue 1 year ago • 3 comments

What?

Improves reporting across multiple CI scripts to provide clear information on the CI environment and the details required for reproducing issues.

Why?

Locating Docker info, identifying the machine, and gathering CI details is time-consuming, requiring repeated searches through logs. This change consolidates all relevant information into a single log section on script exit, simplifying and speeding up debugging, making it easier to replicate the CI environment for troubleshooting.

How?

  • Added a log_info_on_exit function triggered by trap "log_info_on_exit" EXIT in various CI scripts.
  • Collects and displays the information that is listed below.

Information printed in log_info_on_exit

  1. Script Information: Script name Current working directory User running the script
  2. Machine Information: Whether it's running inside a container Container hostname Container image details Docker-specific environment variables Host machine name (if not in a container) Operating system and version Kernel version and details System architecture
  3. UCX Environment Variables
  4. UCX Info: Detailed output from ucx_info if available
  5. Modules Loaded
  6. CPU Affinity
  7. Ulimit Information
  8. System resource limits (ulimit settings)
  9. Disk Usage
  10. Current disk usage information

Demo

https://github.com/user-attachments/assets/00d6f925-cfef-4f93-91ef-37d1d4f482a4

michal-shalev avatar Aug 28 '24 22:08 michal-shalev

Basically looks like a good addition to our CI but I think that most important part is about how to reproduce the same results in for exact job manually. In perfect world I would like to see list of commands that should be executed to reproduce the CI issue in the same environment manually.

ivankochin avatar Sep 19 '24 07:09 ivankochin

/azp run UCX PR

michal-shalev avatar Oct 13 '24 11:10 michal-shalev

Pull request contains merge conflicts.

azure-pipelines[bot] avatar Oct 13 '24 11:10 azure-pipelines[bot]