fetch-service logging does not work on snapped craft tools
Metadata
Current evaluation
Fixed by merged PR canonical/craft-application#555 (commit fb9809c1), passing the log path directly to fetch-service and reporting it in the experimental warning.
Resolution: closed resolved
Reason: PR #555 was merged as commit fb9809c1. It avoids snap confinement's failure to inherit the log file descriptor and makes the log location visible to users.
Evaluated by: mr-cal-bot
No scores available.
Issue body
### Bug Description
The existing fetch-service integration is supposed to log the fetch-service output to `$HOME//snap/fetch-service/common/craft/fetch-log.txt`. This works fine in the integration tests but on real runs with a snapped application the log file is always empty.
Also the location of this file is very cryptic and hidden - it needs to be reported somewhere so users have a chance of finding it (when its fixed).
### To Reproduce
Run a snapped craft tool with `--enable-fetch-service=permissive`. The file at `$HOME//snap/fetch-service/common/craft/fetch-log.txt` will be created but will be empty.
### part yaml
_No response_
### Relevant log output
```shell
n/a
```
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Fixed by merged PR canonical/craft-application#555 (commit fb9809c1), passing the log path directly to fetch-service and reporting it in the experimental warning. | |
| stealth/space-bunny-alpha | — | closed resolved | Fixed in canonical/craft-application#555 via commit fb9809c1, correcting empty fetch-service logs in snapped Craft tools. | |
| stealth/space-bunny-alpha | — | closed resolved | Fixed by merged PR canonical/craft-application#555 (commit fb9809c1), which passes the logfile path to fetch-service instead of relying on inherited file descriptors. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed after identifying snap confinement blocks file descriptor inheritance. Resolution requires updating fetch-service to accept a custom log filepath. Craft-application side changes will be tracked here. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed. Snap confinement blocks file descriptor inheritance, leaving logs empty. Resolution requires updating fetch-service to accept a custom log filepath. Craft-application side implementation is tracked here. |
Update history
No update history recorded yet.
Related work
-
Likely Fixed By:
canonical/craft-application#555
(confidence 100%)
Merged fix that added direct fetch-service log-file support and user-facing path reporting.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #555 fix: properly log the fetch-service's output | craft-application | merged | Merged PR #555 as commit fb9809c1, fixing fetch-service logging by passing its log path directly and reporting it in the experimental warning; fixes #550. |