Skip to content

Running nonexistent command with readonly root FS does not fail #254

@aaronlehmann

Description

@aaronlehmann
➜  hlb git:(6f04a1d) ✗ cat bug.hlb
fs default() {
        image "alpine"
        run "doesnotexist" with option {
                readonlyRootfs
        }
}
➜  hlb git:(6f04a1d) ✗ go run ./cmd/hlb run bug.hlb
[+] Building 0.7s (2/2) FINISHED
 => resolve image config for docker.io/library/alpine:latest                                                                    0.4s
 => CACHED docker-image://docker.io/library/alpine:latest                                                                       0.0s
 => => resolve docker.io/library/alpine:latest                                                                                  0.2s
➜  hlb git:(6f04a1d) ✗ echo $?
0

Does the run get optimized out of the build graph because the readonly root FS means it can't have side effects? I'm not sure this is expected behavior, since it could have side effects outside the context of the filesystem.

cc @hinshun @coryb

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions