remote-build: add control logic when the project is in a git repo
Metadata
Current evaluation
Commit e0ef5ec27 added Git-aware remote-build dispatch: Git projects use the new implementation, while non-Git projects retain the legacy path.
Resolution: closed resolved
Reason: Commit e0ef5ec27 implements the requested repository check and preserves legacy behavior for projects outside Git. The change builds on the GitRepo wrapper merged in PR #4368.
Evaluated by: mr-cal-bot
No scores available.
Issue body
### What needs to get done
This adds control logic to determine whether to execute the new or legacy remote-build code.
If the project is not part of a git repository, then execute the legacy remote-build code. Otherwise, execute the new remote-build code.
This check can be done by using the GitPython wrapper class (#4320).

### Why it needs to get done
This check exists to minimize changes for existing workflows.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Commit e0ef5ec27 added Git-aware remote-build dispatch: Git projects use the new implementation, while non-Git projects retain the legacy path. | |
| stealth/space-bunny-alpha | — | closed resolved | Git-aware dispatch was added to remote-build: projects in Git repositories use the new implementation, while non-Git projects retain the legacy path. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed without implementation. The proposed control logic to switch remote-build execution based on git repository presence was abandoned. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed without implementation. The proposal to add GitPython-based routing logic for legacy versus new remote-build execution paths was abandoned with no further action or merge. | |
| qwen/qwen3.6-35b-a3b | — | — | Abandoned. The proposed control logic to route remote-build execution based on git repository presence was never implemented or merged. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Closed without resolution. The remote-build git detection logic remains unimplemented or superseded, with no merge or fix recorded. |
Update history
No update history recorded yet.
Related work
-
Related To:
canonical/snapcraft#4368
(confidence 98%)
Merged prerequisite work adding the GitRepo wrapper used by the dispatch logic.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #4318 remote-build: add control logic for snap base | snapcraft | closed | Base-aware remote-build routing was merged in PR #4343 (commit 128e0acb2), using legacy code for core20/core22 and the new path for devel/core24 and newer. | |
| #4324 remote-build: new command logic | snapcraft | closed | Remote-build logic was replaced by merged PR #4395 (commit 2e0647594), adding isolated per-build cache worktrees, cleanup, and generated build IDs. | |
| #4370 feat(remote-build): check if project is in a git repository | snapcraft | merged | Merged PR #4370 added Git-repository detection for remote-build, preserving legacy behavior for non-Git projects; commit e0ef5ec27 resolves #4321. | |
| #310 fix(remote-build): enable git repo check | craft-application | merged | Merged PR #310 in commit 28429b84, enabling remote builds to check Git cleanliness before staging and committing copied project changes. | |
| #3056 remote-build: package up local sources with source-type 'git' | snapcraft | merged | Merged PR #3056 in commit ccfd349af, making remote-build package local Git sources declared with source-type: git. |