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

Refactor FsRepository's renders #1159

Draft
wants to merge 4 commits into
base: no-hard-links-for-dir-renders
Choose a base branch
from

Conversation

jrray
Copy link
Collaborator

@jrray jrray commented Dec 7, 2024

The goal is to make it so it is possible to open repo without creating the renders directory for the current user, in situations where that renders directory will not be used. Examples include when using fuse or when running spfs clean.

This introduces different flavors of a "render store" besides RenderStore that either represent a render store that hasn't been created yet (but can be) or the lack of a render store. Operations that don't require a render store can access the local repository without the renders directory being created.

WIP: The test suite passes1 with this code but it is unfinished.

Footnotes

  1. On my machine... A limitation of the test suite is that it uses the installed spfs binaries instead of the spfs code in the current branch.

@jrray jrray added the pr-chain This PR doesn't target the main branch, don't merge! label Dec 7, 2024
@jrray jrray self-assigned this Dec 7, 2024
@jrray jrray marked this pull request as draft December 7, 2024 02:08
@jrray jrray force-pushed the repo-renders-type-state branch from 8d8f699 to edf84c4 Compare December 10, 2024 02:22
@jrray
Copy link
Collaborator Author

jrray commented Dec 10, 2024

Tests are now passing legitimately (at least locally, with an spfs installed from this code). What's left besides general cleanup is creating some new tests that specifically exercise the desired outcome: not creating the renders directory if using fuse. I'm not sure if that is true yet with these changes but the framework for making it possible should be there.

@jrray jrray force-pushed the no-hard-links-for-dir-renders branch from 7ec8e8b to 51a8e45 Compare December 10, 2024 18:58
@jrray jrray force-pushed the repo-renders-type-state branch 4 times, most recently from 3d23f17 to 631cc72 Compare December 11, 2024 00:53
The goal is to make it so it is possible to open repo without creating
the renders directory for the current user, in situations where that
renders directory will not be used. Examples include when using fuse or
when running `spfs clean`.

This introduces different flavors of a "render store" besides
`RenderStore` that either represent a render store that hasn't been
created yet (but can be) or the lack of a render store. Operations that
don't require a render store can access the local repository without the
renders directory being created.

Signed-off-by: J Robert Ray <[email protected]>
Test that the renders directory is not created when using fuse.

Signed-off-by: J Robert Ray <[email protected]>
@jrray jrray force-pushed the repo-renders-type-state branch from 631cc72 to a367c0f Compare December 11, 2024 00:59
@jrray
Copy link
Collaborator Author

jrray commented Dec 11, 2024

Making progress but the behavior of spfs clean is not right yet (it currently skipping cleaning renders entirely). The existing tests via the fixture create a repo with RenderStore (pre-created renders) but spfs renders uses MaybeRenderStore, then the clean code treats this flavor as not having renders.

I'm trying to get it so spfs clean does clean any existing renders that are eligible without creating any new renders directories.

@jrray jrray linked an issue Dec 11, 2024 that may be closed by this pull request
Expand the clean tests to test the multiple flavors of FS repo.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-chain This PR doesn't target the main branch, don't merge!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

spfs clean fails if disk is full
1 participant