← Back to issue list

On timeout, `remote-build` should return the artifacts that have successfully finished building

View original Github issue

Metadata

Project
charmcraft
Number
#2709
Type
issue
State
open
Author
sinapah
Labels
—
Created
Updated
Closed
—

Current evaluation

Feature request: `remote-build` returns 75 on --launchpad-timeout without fetching already-successful artifacts; maintainer-linked to the pending --build-for request #2467. Still open and unlabelled.

Suggested action: keep open

Reason: The behavior is real and verified in the current code: the `except TimeoutError:` handler in charmcraft/application/commands/remote.py (lines 176-184) emits a resume hint and `return 75` before ever reaching `builder.fetch_artifacts(...)` at line ~190, so successfully built arches are discarded. The feature is valid and MichaelThamm explicitly linked it to the still-open --build-for request (#2467), so it has maintainer acknowledgement and is not untriaged. It is not yet implementable turnkey: artifact fetching is delegated to `builder.fetch_artifacts(pathlib.Path.cwd())` via craft-application's remote_build service and operates over the whole `builds` collection rather than per-arch, so selecting only succeeded arches likely needs upstream craft-application changes, and the issue does not specify what exit code a partial artifact set should return (publishing to Charmhub still fails for missing arches).

Evaluated by: mr-cal-bot

Impact: 55 Quick Win: 12 Complexity: 60 Confidence: 78 Actionability: 55

Issue body

### Check existing issues - [x] I've verified that this request isn't described by any existing issues. ### Request Remote building can sometimes be flaky due to builder availability and infrastructure stability. In most cases, AMD and ARM successfully finish packing. However, plenty of times, S390x and PPC64el take longer to complete, possibly due to runner unavailability. In such cases, it would be better if the artifacts that were successfully built are returned. ### The problem it solves Some of our release workflows rely on remote building (using `charmcraft 3.5.3`). These workflows tend to be flaky when LP is experiencing extra load. We often need to re-run these workflows multiple times. On almost all runs, the logs indicate that the build succeeded for ARM and AMD. In such cases, if we can get those artifacts and release them, we can probably hold off on S390x and PPC64el builds. This ensures we release the charms to Charmhub faster and reduces the number of retries, easing pressure on LP.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha
Impact: 55
Quick Win: 12
Complexity: 60
Confidence: 78
Actionability: 55
keep open Feature request: `remote-build` returns 75 on --launchpad-timeout without fetching already-successful artifacts; maintainer-linked to the pending --build-for request #2467. Still open and unlabelled.
stealth/space-bunny-alpha
Impact: 58
Quick Win: 24
Complexity: 43
Confidence: 93
Actionability: 73
needs triage Proposed partial artifact retrieval for remote-build after a local Launchpad timeout; still open, unlabelled, and linked to the pending --build-for request.
qwen3.6-35b-a3b-mtp-q6
Impact: 60
Quick Win: 36
Staleness: 65
Complexity: 40
Confidence: 70
Support Request: 20
needs triage Feature request for remote-build to return partially built artifacts on timeout instead of failing entirely. Untriaged, 98 days old.
qwen/qwen3.6-35b-a3b
Staleness: 45
Complexity: 60
Confidence: 90
Support Request: 10
needs triage Feature request to have remote-build return successfully completed architecture artifacts instead of failing completely on timeout. Currently unlabelled and awaiting maintainer triage.
qwen3.6-35b-a3b-mtp-q6
Staleness: 45
Complexity: 45
Confidence: 90
Support Request: 10
needs triage Feature request to modify remote-build to return successfully completed architecture artifacts instead of failing entirely on timeout, reducing workflow flakiness. Currently unlabelled and awaiting maintainer assessment.

Update history

No update history recorded yet.

Related work

  • Related To: canonical/charmcraft#2467 (confidence 92%)

    Explicit cross-reference in MichaelThamm's 2026-06-08 comment ('Related to: .../issues/2467'); that open remote-build --build-for feature request is the complementary fix for arch-selective builds.

Related issues

Issue Project State Summary Similarity
#618 Remote build does cleanup even after a timeout craft-application closed Remote-build cleaned up build resources after a --launchpad-timeout; fixed by PR #625 (commit 7c636d3a) which raises TimeoutError so the handler returns exit 75 without cleanup. Shipped in 4.8.3.
74%
#2845 remote-build: configurable timeout/deadline for starting and monitoring build snapcraft merged PR #2845 merged as ba92ac5f7, restoring --launchpad-timeout as a shared deadline for starting and monitoring remote builds and clarifying timeout failures.
71%