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

fix: clean up missing project if it's gone, fixes #5322 #6029

Merged
merged 3 commits into from Apr 1, 2024

Conversation

rfay
Copy link
Member

@rfay rfay commented Mar 28, 2024

The Issue

People periodically delete a project's filesystem without doing a ddev delete first

How This PR Solves The Issue

When the filesystem is gone, remove the project from the project list

Manual Testing Instructions

mkdir junk && cd junk && ddev config --auto
cd .. && rm -r junk
ddev list

You should see the project mentioned while it's being removed from registry, but it won't error and won't show up on the next ddev list.

Automated Testing Overview

Added TestGetProjectsMissingApp

Related Issue Link(s)

Release/Deployment Notes

@rfay rfay force-pushed the 20240328_fix_missing_repo branch from d4e8fe9 to 30fc203 Compare March 29, 2024 16:28
@rfay rfay marked this pull request as ready for review March 29, 2024 23:26
@rfay rfay requested a review from a team as a code owner March 29, 2024 23:26
@rfay rfay requested a review from stasadev March 29, 2024 23:26
@rfay
Copy link
Member Author

rfay commented Mar 31, 2024

One thing we may still want to do here is to support ddev delete <project> when the project is not in the global list. That way people having trouble with an existing database could explicitly delete it in the easiest way.

Copy link
Member

@stasadev stasadev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, I like the automatic removal of a project from the list.

One thing we may still want to do here is to support ddev delete <project> when the project is not in the global list. That way people having trouble with an existing database could explicitly delete it in the easiest way.

This is a good idea, but probably beyond the scope of this PR.
I'll think about it when I come back to the task of cleaning up the docker's resources:

@rfay
Copy link
Member Author

rfay commented Apr 1, 2024

This is a good idea, but probably beyond the scope of this PR.
I'll think about it when I come back to the task of cleaning up the docker's resources: #5073

That one is about docker images, here we're talking about the docker volume where the database is stored. I agree it belongs in a separate PR.

@rfay rfay merged commit e1d399c into ddev:master Apr 1, 2024
24 checks passed
@rfay rfay deleted the 20240328_fix_missing_repo branch April 1, 2024 13:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants