← Back to issue list

fix: properly log the fetch-service's output

View original Github issue

Metadata

Project
craft-application
Number
#555
Type
pull request
State
merged
Author
tigarmo
Labels
Created
Updated
Closed

Current evaluation

Merged a fix for fetch-service logging that bypasses snap file descriptor restrictions by passing the logfile path via a new CLI option instead of bash redirection. Approved by two reviewers, passed CI, and resolves issue #550.

Suggested action:

No scores available.

Issue body

The issue with redirecting the fetch-service's output to a file via bash is this: as a strict snap, the fetch-service cannot inherit the file descriptors from the bash process if said process is spawned by a classic snap. This is the case when the integration is controlled by a snapped craft tool: ``` +----------------------------+ +-------------+ |(snapped) craft-tool -> bash| -----> |fetch-service| +----------------------------+ +-------------+ ``` The solution here is to pass the path to the logfile to the fetch-service itself through a new, recently implemented command-line option. We also print the path to the logfile when emitting the warning about the integration being experimental. Refs: - https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1849753 Fixes #550 - [ ] Have you followed the guidelines for contributing? - [ ] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? - [ ] Have you successfully run `tox`? -----

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b Merged a fix for fetch-service logging that bypasses snap file descriptor restrictions by passing the logfile path via a new CLI option instead of bash redirection. Approved by two reviewers, passed CI, and resolves issue #550.
qwen3.6-35b-a3b-mtp-q6 Merged a fix that resolves fetch-service logging by passing the logfile path via a new CLI option instead of relying on bash file descriptor inheritance, which fails in strict snap environments. Resolves #550.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#543 fix: properly capture fetch-service-related output craft-application closed Merged to wrap fetch-service configuration output into a progress stream, resolving issue #536. The update adds a 62-line diff across 5 files to improve user feedback during instance setup.
75%
#544 fix: cleanup UI for fetch-service-related commands craft-application merged Merged UI cleanup for fetch-service commands. Added progress steps to replace noisy Apt output, resolving issue #536. Approved by two reviewers with passing CI checks.
75%
#294 feat: allow logging to a file fetch-service merged Merged to add a configurable file logging option for the fetch-service, bypassing standard output capture limitations. Resolves #288. Approved by two reviewers, modifying three files with a net addition of 58 lines.
75%
#72 feat: service logging to a file fetch-service merged Merged implementation for service file logging. Configured to output logs to /var/snap/fetch-service/current to satisfy confined snap restrictions. Approved by two reviewers and passed CI checks.
74%
#542 fix: don't start the fetch-service in managed mode craft-application merged Merged to prevent the fetch-service from starting in managed mode, resolving issue #537. Approved by two reviewers, the commit modifies three files with 13 additions and one deletion.
70%