Server errors when 'location of repositories' has been changed.

Issue #85 on hold
Wouter Vermeiren created an issue

During installation I decided to use /repos as the location for 'location of repositories' (LOR) and Kallithea nicely scanned all my repositories in this directory. I configured other users and the review process was started. At a certain point (since this was a pilot to test kallithea for use in our organisation), I decided to change the LOR to /repo/kallithea.

After this change, all open pull request and any links to the repos throw 404 or 500 errors rather then a message saying 'this repo does not exist anymore in <LOR>'. I also wasn't offered any option to select certain repos to be moved to this new location (independently of whether this is a good thing to do or not).

Restarting and invalidating the cache did not resolve anything. The only thing that worked was changing the LOR back to the old value.

Comments (6)

  1. Mads Kiilerich

    Yes, if you one way or another manually introduce inconsistencies between database and filesystem then you have a problem. Don't do that. If you change the location of repositories, make sure to move the repositories.

    You can however scan for new repositories and remove removed ones from the admin settings.

    It could perhaps give a less fatal error if the repo is missing, but all review comments will have lost their context and be irrelevant so there wouldn't be much point in it.

    I don't think there is any bug here ... but feel free to improve that area.

  2. Wouter Vermeiren reporter

    I wasn't even able to remove the ones that are not located in the LOR anymore. So I was just left with a bunch of repos that generated errors.

  3. Mads Kiilerich

    "You can however scan for new repositories and remove removed ones from the admin settings."

  4. Wouter Vermeiren reporter

    I need to retest this when I have some time and then I will attempt to sent a proposal patch for a nicer fix.

  5. Log in to comment