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

Check for orphaned tree files in stache:doctor command #3902

Conversation

arthurperton
Copy link
Contributor

Helps with detecting the cause of #3478.

PR's #3889 and #3901 help to prevent that issue, this PR is for when the damage is already done.

@arthurperton arthurperton requested a review from jasonvarga June 24, 2021 14:45
@jasonvarga
Copy link
Member

Unless I'm mistaken, having a tree file without a corresponding collection doesn't hurt anything.

It looks more like you get an error when there is a tree file for a collection that exists, when the tree probably shouldn't exist.

Your other PR addresses this. 👍

@jasonvarga jasonvarga closed this Jun 30, 2021
@arthurperton
Copy link
Contributor Author

Yeah definitely a mistake here, a ghost tree file gets you quite stuck. You won't be able to warm or refresh the stache again until you find the problem and remove the file. Which is hard when you don't know what you're looking for. Speaking from experience here 😅

Just drop a .yaml file with an empty structure { } in /content/tree/collections for a collection that is not orderable. Then try to warm the stache.

@arthurperton arthurperton reopened this Jul 1, 2021
@arthurperton
Copy link
Contributor Author

PS It was actually a bit of a challenge to write this code in a way that wouldn’t trigger the error.

@jasonvarga
Copy link
Member

I still get an error the first time I run the command.

If this is just to track down the cause of an error because there's a file that exists when it shouldn't... I don't think this is really necessary. The other PR where you fix the orphan files is the fix. The problem will just go away after that.

Or, we could additionally make the store ignore any trees that don't have corresponding collections.

@edalzell
Copy link
Contributor

edalzell commented Jul 1, 2021

Or, we could additionally make the store ignore any trees that don't have corresponding collections.

I've run into this error as well. It's tricky to see the issue...this would be great!

@jasonvarga
Copy link
Member

I don't think this command is needed. Once #3889 is done, the problem will eventually die out.

@jasonvarga jasonvarga closed this Jul 1, 2021
@arthurperton
Copy link
Contributor Author

Or, we could additionally make the store ignore any trees that don't have corresponding collections.

That would be great. Working on a PR for it. No need for the doctor to check then, I agree.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants