disko icon indicating copy to clipboard operation
disko copied to clipboard

cleanup host environment passed to VM for image building

Open pedohorse opened this issue 1 year ago • 4 comments

keeping only origBuilder env from host

should resolve https://github.com/nix-community/disko/issues/622

pedohorse avatar May 17 '24 14:05 pedohorse

Looks good. Does it work?

Mic92 avatar May 17 '24 16:05 Mic92

i've mentioned in the issue https://github.com/nix-community/disko/issues/622 that it does seem to work fine, but i only manually tested a few configs for config.system.build.diskoImagesScript, and visually confirmed that result boots and seems good, nothing else.

the change should affect only VM environment, created early in stage-2 script, the only change in environment in which the script that starts VM is executed is the absence of origBuilder var there, as it's set through preVM instead

i basically know two features in this project so far :) are there any automated tests to ensure nothing else broke from this change?

pedohorse avatar May 17 '24 19:05 pedohorse

there are tests in the tests folder, they should be nix-build able or alternatively with nix build .#tests.make-disk-image

Lassulus avatar May 19 '24 13:05 Lassulus

i've ran some tests so far (I assume - the process of building IS running the test), it seem to work fine. interestingly, the tests run with nix build will run in clean environment, so they won't catch issues as with running the result of image building script in tainted user enviornment. (unless there is such special test case that imitates that problem somewhere, but I doubt that since it seems that this was not noticed to be something noticeable before)

Oh wait, (i'm blind) I've just noticed that there are github actions that run all the tests, and all the tests pass

pedohorse avatar May 20 '24 20:05 pedohorse

@mergify queue

Mic92 avatar Jun 03 '24 11:06 Mic92

queue

✅ The pull request has been merged automatically

The pull request has been merged automatically at c194451352987aff99c472af131ebe71e2575df2

mergify[bot] avatar Jun 03 '24 11:06 mergify[bot]