feat(lifecycle)!: don't build on incompatible bases
Metadata
Current evaluation
Merged following reviewer approval and CI passes. Introduces a base compatibility check in the Lifecycle service to block builds on mismatched host OS environments, resolving issue #154.
Suggested action: —
No scores available.
Issue body
The Lifecycle service will now check whether the build's base (as stored in the BuildInfo) matches the running environment. This doesn't affect managed runs (barring bugs), but is a change in behavior as we will no longer build, say, Ubuntu 22.04 artifacts on Fedora hosts in destructive mode.
We define "matches" here as this:
- If the build base is "devel", then only the systems have to match. For instance, you can build a "devel" Ubuntu-based artefact on any Ubuntu system, but not on a Fedora system.
- Otherwise, both the base's system and version must match, such that it is no longer possible to build ubuntu@22.04 on (say) ubuntu@20.04 systems.
Fixes #154
- [ ] 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 |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Merged following reviewer approval and CI passes. Introduces a base compatibility check in the Lifecycle service to block builds on mismatched host OS environments, resolving issue #154. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged a breaking change adding base environment compatibility checks to the Lifecycle service. Builds now verify host system and version match the target base, preventing incompatible builds. Resolves #154. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #251 feat(lifecycle)!: don't build on incompatible bases | craft-application | closed | Proposed build base compatibility checks were closed and superseded by pull request #263, which addressed the same lifecycle service requirement. | |
| #1162 fix: fail fast on unsupported lifecycle bases | craft-application | open | Moves unsupported-base check before lifecycle init to fail fast. PR is inactive (18 days, 0 comments) and appears superseded by merged PR #263 which implements the same base compatibility check. | |
| #2569 lifecycle: warn about bases | snapcraft | merged | Merged after resolving test failures and conflicting warning messages. Adds lifecycle warnings for snaps missing the base keyword or building on mismatched hosts. Approved and merged following local validation and code formatting. | |
| #4540 fix(lifecycle): return correct base when using devel for build-base (… | snapcraft | merged | Merged a fix to return the correct base when using devel for build-base. Approved by two reviewers, the change spans seven files. Codecov noted one uncovered line, but the pull request was successfully merged. |