← Back to issue list

remote-build: new command logic

View original Github issue

Metadata

Project
snapcraft
Number
#4324
Type
issue
State
closed
Author
mr-cal
Labels
—
Created
Updated
Closed

Current evaluation

Remote-build logic was replaced by merged PR #4395 (commit 2e0647594), adding isolated per-build cache worktrees, cleanup, and generated build IDs.

Resolution: closed resolved

Reason: PR #4395 was merged as commit 2e0647594. It implemented isolated per-build work areas, removed successful worktrees, adopted build-ID generation, and moved command logic into snapcraft/commands/remote.py.

Evaluated by: mr-cal-bot

No scores available.

Issue body

### What needs to get done - [ ] Implement the new work area, where the WorkTree is not reused and removed after the build completes. - Each launchpad build has a unique build-id and WorkTree. In the legacy code, WorkTrees are stored by build-id in `~/.local/share/snapcraft/remote-build/<build-id>/`. - In the new code, WorkTrees will be stored in the work area `~/.cache/snapcraft/remote-build/<build-id>/`. When the build completes successfully, the WorkTree will be removed. WorkTrees are not reused. - [ ] use new `_generate_build_id()` from #4322 - [ ] linting and typing updates (e.g. use f-strings) - [ ] move snapcraft business logic to `snapcraft/commands/remote.py` ### Why it needs to get done This allows a user to inspect the contents of the WorkTree if the build fails and minimizes disk usage.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Remote-build logic was replaced by merged PR #4395 (commit 2e0647594), adding isolated per-build cache worktrees, cleanup, and generated build IDs.
stealth/space-bunny-alpha — closed resolved Merged PR #4395 (commit 2e0647594) implemented the new remote-build command logic with per-build cache work areas, cleanup, typing/lint updates, and migrated build-ID generation, resolving #4324.
stealth/space-bunny-alpha — closed stale Remote-build command refactoring was closed without implementation; the repository contains no resolving PR or commit linking the new WorkTree lifecycle to completion.
qwen/qwen3.6-35b-a3b — — The remote-build command logic update was closed without implementation. No linked pull request or resolution details exist, indicating the feature was abandoned.
qwen/qwen3.6-35b-a3b — — Closed and abandoned without implementation. No follow-up activity or pull requests were created to address the proposed remote-build work area changes, build ID generation, or code refactoring.
qwen/qwen3.6-35b-a3b — — Closed without implementation or linked pull request. Likely abandoned or superseded due to lack of comments or resolution details.
qwen3.6-35b-a3b-mtp-q6 — — Planned remote-build command logic updates were closed without implementation. The proposed work area restructuring, build ID integration, and code refactoring were abandoned.

Update history

No update history recorded yet.

Related work

  • Likely Fixed By: snapcraft#4395 (confidence 100%)

    Merged resolving PR implemented the requested remote-build command rewrite.

Related issues

Issue Project State Summary Similarity
#4395 feat(remote-build): new command logic snapcraft merged Merged as commit 2e0647594; adds RemoteBuild class and new remote-build command orchestration, per-build project cache in the local cache dir with post-build cleanup, plus typing/lint updates (CRAFT-1979). Fixes #4324.
81%
#4384 refactor(remote-build): reorganize functions snapcraft merged Merged #4384 via commit 23e2601c9, reorganizing remote-build functions in preparation for #4322; follow-up #4385 added build-ID generation.
76%
#2774 remote-build: architecture handling snapcraft merged Merged PR #2774 via commit 8300281d6, cleaning up and fixing remote-build architecture handling. Missing CLI unit tests were acknowledged as follow-up work.
75%
#4321 remote-build: add control logic when the project is in a git repo snapcraft closed Commit e0ef5ec27 added Git-aware remote-build dispatch: Git projects use the new implementation, while non-Git projects retain the legacy path.
73%
#586 feat: add a 'remote-build' command craft-application merged Merged PR #586 as commit 6e49d794, adding a remote-build command adapted from Charmcraft and generalized to be craft-tool-agnostic.
72%
#4842 remote build: document nuances of current and legacy remote builders snapcraft closed Remote-builder nuances were documented by PR #4882 (commit bd49f8db0), completing the documentation subtask split from #4842.
72%
#1531 feat: add remote build command charmcraft closed Remote-build PR was abandoned in favor of rebased #1546, which merged as df5e9c4f and added the remote-build command.
72%
#5223 remote-build: refactor onto craft-application's command snapcraft closed Remote-build was refactored onto craft-application's RemoteBuild in merged PR #5239 (commit f31d99498), bringing the requested upstream improvements.
71%
#3554 cli: add support for parallel remote builds snapcraft merged Merged #3554 in commit c26fc107a, adding project-state hashes and selectable build IDs so multiple remote builds can run and be tracked in parallel.
70%
#3919 cli: move remote build out of legacy snapcraft merged Merged as 686d69711, moving remote-build CLI logic out of legacy, exposing --build-for, hiding --build-on, and stopping the emitter during confirmation prompts.
70%