CI: create exit log
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
- Script Information: Script name Current working directory User running the script
- 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
- UCX Environment Variables
- UCX Info: Detailed output from ucx_info if available
- Modules Loaded
- CPU Affinity
- Ulimit Information
- System resource limits (ulimit settings)
- Disk Usage
- Current disk usage information
Demo
https://github.com/user-attachments/assets/00d6f925-cfef-4f93-91ef-37d1d4f482a4
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.
/azp run UCX PR
Pull request contains merge conflicts.