← Back to issue list

cli: add support for parallel remote builds

View original Github issue

Metadata

Project
snapcraft
Number
#3554
Type
pull request
State
merged
Author
kyrofa
Labels
Created
Updated
Closed

Current evaluation

Merged to master. Enables parallel remote builds in snapcraft CLI by hashing project state instead of the directory path, allowing concurrent builds. Introduces a user-specifiable build ID for tracking and recovery.

Suggested action:

No scores available.

Issue body

- [x] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)? - [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? - [x] Have you successfully run `./runtests.sh static`? - [x] Have you successfully run `./runtests.sh tests/unit`? ----- Currently, when spinning up a remote build, snapcraft calculates a hash of the path for the project being built, and uses that as a unique identifier for the build. This artificially limits the number of builds that can be happening for a given project to 1, which really limits the usefulness of remote builds. Instead of calculating a hash for the project directory, calculate a hash that represents the _state_ of the project, such that changing any file in the working tree (e.g. switching git branches) changes the hash. This allows multiple builds for different versions of a given project to be running at the same time. Of course, this introduces the complication of needing to track such builds. Expose the concept of a "build ID" to the user and allow them to specify it for every remote-build command, so they can check the status of or recover particular builds by providing the relevant build ID.

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b Merged to master. Enables parallel remote builds in snapcraft CLI by hashing project state instead of the directory path, allowing concurrent builds. Introduces a user-specifiable build ID for tracking and recovery.
qwen3.6-35b-a3b-mtp-q6 Merged into master. Replaces project path hashing with state-based hashing to enable concurrent remote builds. Introduces a user-specified build ID for tracking and recovery. Codecov reports a minor 0.04% coverage decrease.
qwen3.6-35b-a3b-mtp-q6 Merged into master. Replaces path hashing with state hashing to enable parallel remote builds. Adds a user-specifiable build ID for tracking. Codecov reported a minor coverage decrease.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#3648 cli: reintroduce remote-build and promote to snapcraft help snapcraft merged Merged the reintroduction of the remote-build CLI command and promoted it to snapcraft help. Approved by one reviewer, passed CI checks, and resolved Launchpad bug #1943244 via a single-file, four-line deletion.
74%
#6287 remote-build: support build paths snapcraft open Enhancement to add --project-dir support for remote-build command, allowing users to specify build paths when multiple snapcraft.yaml files exist. Issue is triaged and assigned to a contributor after upstream dependency was resolved.
72%
#1128 feat(remotebuild): add build-path to snap recipes craft-application merged Merged. Adds build-path to snap recipes and RemoteBuildService, resolving #1106 and unblocking snapcraft #6287. Exposed as --project-dir in the remote-build command. Approved by two reviewers and passed CI.
70%