← Back to issue list

overlays: collect log messages from chrooted call

View original Github issue

Metadata

Project
craft-parts
Number
#490
Type
pull request
State
closed
Author
tigarmo
Labels
Created
Updated
Closed

Current evaluation

Closed without merging. The change proposed capturing and piping log messages from chrooted child processes to the parent to resolve missing overlay package logs. Lacked reviewer feedback and CI validation, resulting in an abandoned resolution.

Suggested action:

No scores available.

Issue body

The problem: log messages generated by the callable passed to `chroot()` are not being correctly "preserved" in the main process. This manifests itself by missing log messages from things like the installation of packages described in a part's overlay-packages. This commit updates both chroot.chroot() and chroot._runner() to capture thee logged messages from the chrooted child process and return them to the parent one through their pipe. The parent process can then emit those log records in the usual path. The integration tests "cheat" a bit because they don't actually call os.chroot(), as that needs a lot of setup, a base system to chroot into, root, etc. However, they use the rest of the multiprocessing infrastructure so they should be a reasonable approximation of real use cases. Fixes #485 - [ ] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? -----

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b Closed without merging. The change proposed capturing and piping log messages from chrooted child processes to the parent to resolve missing overlay package logs. Lacked reviewer feedback and CI validation, resulting in an abandoned resolution.
qwen3.6-35b-a3b-mtp-q6 Merged to fix missing chroot log messages. Updated chroot.chroot() and chroot._runner() to capture child process logs and pipe them to the parent process, ensuring proper log preservation. Closes #485.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#535 packages: don't write info logs in overlays craft-parts merged Merged a fix that downgrades overlay package logging from info to debug to prevent terminal deadlocks during chroot subprocess operations. A main-process info message replaces it. Approved by two reviewers and passed CI.
73%