Skip to content

Conversation

@vito
Copy link
Owner

@vito vito commented Sep 6, 2022

the intention here was to prevent accidentally caching a service that exits 0 when interrupted.

in reality this also prevented explicit cache mounts from working; they'd always just be empty. cache mounts are required for services that keep state, e.g. Nixery.

we also don't want to introduce any randomness to the LLB since that would prevent sharing of resources.

it doesn't seem possible to meet all of these constraints at the moment, so just get rid of the cache prevention as I haven't seen it actually cause any problems yet. maybe because we always interrupt the service, and that prevents buildkit from caching even if it exits 0? or maybe everything is just exiting nonzero properly? (none of this is confirmed, but it would be nice!)

the intention here was to prevent accidentally caching a service that
exits 0 when interrupted.

in reality this also prevented explicit cache mounts from working;
they'd always just be empty. cache mounts are required for services that
keep state, e.g. Nixery.

we also don't want to introduce any randomness to the LLB since that
would prevent sharing of resources.

it doesn't seem possible to meet all of these constraints at the moment,
so just get rid of the cache prevention as I haven't seen it actually
cause any problems yet. maybe because we always interrupt the service,
and that prevents buildkit from caching even if it exits 0? or maybe
everything is just exiting nonzero properly? (none of this is confirmed,
but it would be nice!)
@vito vito added the bugfix Fixes a regression or unintended behavior label Sep 6, 2022
@vito vito merged commit df94cc9 into main Sep 6, 2022
@vito vito deleted the cache-svc branch September 6, 2022 20:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Fixes a regression or unintended behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants