← Back to issue list

isolate parts of a rockcraft build process from each other

View original Github issue

Metadata

Project
rockcraft
Number
#433
Type
issue
State
open
Author
ca-scribner
Labels
Created
2023-12-01 21:59:17+00:00
Updated
2025-08-15 15:12:51+00:00
Closed

Current evaluation

No evaluation has been recorded for this issue yet.

Issue body

### What needs to get done Fully isolate the environment of every part in a rockcraft build (while still allowing data to be passed between them or staged/primed, etc) ### Why it needs to get done The side effects that one part can have on another are not intuitive. For example: ```yaml name: python-version-test base: ubuntu@20.04 version: test summary: python version test description: | python version test license: GPL-3.0 platforms: amd64: parts: spy-before: plugin: nil # override-build: | # exit 1 use-python: after: [spy-before] plugin: nil build-packages: - python3.7 spy-after: after: [use-python] plugin: nil # override-build: | # exit 1 ``` It feels counterintuitive that all three parts have `python3.7`: * `use-python` has it because it defined `build-packages` * `spy-before` and `spy-after` have it because of `use-python`'s `build-packages` This feels surprising for two reasons: * the structure of parts makes them feel like they should be isolated. It does not feel intuitive that the `spy-*` parts get side effects from `use-python`. The idea of each part having its own workspace exists, but really its just its own directory in a shared workspace * it feels *really* counter-uituitive that `spy-before` has python, since `use-python` is scheduled `after: [spy-before]` [^1] This feels really error-prone and hard to predict. Coming from something like multi-stage builds in docker, the stages are nicely isolated but facilitate data exchange where its needed. The developer experience feels better when you have that strong isolation available. ^1: I understand this happens because the package install for `build-packages` for all parts happens before other steps in the part lifecycle, but that it happens at all still feels strange

Evaluation history

No evaluation history available.