fix: properly log the fetch-service's output
Metadata
Current evaluation
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.
Resolution: closed resolved
Reason: PR #555 was merged as commit fb9809c1. The change avoids unreliable Bash file-descriptor redirection under strict snaps by supplying the logfile path directly to fetch-service.
Evaluated by: mr-cal-bot
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 |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | 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. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged fix: fetch-service now receives the logfile path directly, avoiding Bash file-descriptor redirection failures under strict snaps and reporting the path in the experimental-integration warning. | |
| 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. |
Update history
No update history recorded yet.
Related work
-
Related To:
canonical/craft-application#550
(confidence 100%)
The PR explicitly states “Fixes #550”; that issue records resolution by #555 and commit fb9809c1.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #543 fix: properly capture fetch-service-related output | craft-application | closed | PR #543 was closed unmerged; its fetch-service output cleanup was superseded by merged PR #544 (commit b21bd7ba), which resolved #536. | |
| #550 fetch-service logging does not work on snapped craft tools | craft-application | closed | 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. | |
| #544 fix: cleanup UI for fetch-service-related commands | craft-application | merged | Merged PR #544 as commit b21bd7ba, adding progress feedback for fetch-service setup while suppressing noisy Apt output; it resolves #536. | |
| #542 fix: don't start the fetch-service in managed mode | craft-application | merged | Merged PR #542 as commit 6efe5447, preventing fetch-service startup in managed mode and resolving #537. |