Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

don't ignore caches for services #244

Merged
merged 1 commit into from
Sep 6, 2022
Merged

don't ignore caches for services #244

merged 1 commit into from
Sep 6, 2022

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.

1 participant