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

Repositories are broken after unsuccessful clone/mirror creation #1249

Closed
5 of 7 tasks
cookiengineer opened this issue Mar 14, 2017 · 8 comments
Closed
5 of 7 tasks
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented type/bug

Comments

@cookiengineer
Copy link

cookiengineer commented Mar 14, 2017

  • Git version: 1.1.0
  • Operating system: Arch Linux (both ARM and amd64)
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist: -

Description

When cloning a big repository on a slow (or time-outing) internet connection, the repository will be invalid and show a 500 error if the connection was interrupted or the cloning process was unsuccessful. You have to manually connect to the database on the machine and to remove all entries related to the repository to make it work again (or to retry cloning). This is bad error handling :-/

Expected Behaviour

Cloning process should be asynchronous and schedule it in the background, and not depend on the web interface opened up in the web browser. If clone fails, a message would be nice with an option to quickly delete the broken repository (or to try it again).

Steps to Reproduce

  • Use gitea on a cable connected machine (for easy reproduction)
  • Click + and create new repository
  • Migrate or clone a big repository from the interwebz
  • While cloning, pull the cable from the machine
  • Voila, repository is broken with 500 error

Alternative Steps to Reproduce

Disconnect Modem or use a network-wide Proxy with latency (e.g. TOR).

This issue is not dependent on whether giteaserver <> usermachine are connected or not. If git clone fails, repo is broken and browser will not receive any data in its never-ending request.

@lunny lunny added the type/bug label Mar 14, 2017
@lunny lunny added this to the 1.x.x milestone Mar 14, 2017
@pgaskin
Copy link
Contributor

pgaskin commented Mar 14, 2017

For me, this will happen until the repository is fully cloned. Try waiting a bit longer, or look at the monitoring section of the admin.

@cookiengineer
Copy link
Author

cookiengineer commented Mar 14, 2017

I can't wait longer than hours. The bug, as described above, will break the repository no matter if your browser is still open or not. It will be just an endless reloading website that never receives any HTML data, nothing more.

The backend side seems to wait until the clone was successfully completed. If anything happens in between, the repo will break and the browser will not receive an error message.

Above instruction were meant for reproduction. Any case in between can happen, from DNS timeout to proxy latency to routing issues (e.g. TOR). In any given case: If the git clone fails, everything is broken and the client-side that initiated the git clone via web interface never receives any answer from the gitea backend. This is not cable-connection-between-user-and-gitea specific.

@stale
Copy link

stale bot commented Feb 16, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.

@stale stale bot added the issue/stale label Feb 16, 2019
@LER0ever
Copy link
Contributor

This issue is still present on Git master today.
Migrating a large repo from Github caused timeout from proxy and visiting that repo just gives 500.

@stale stale bot removed the issue/stale label Feb 17, 2019
@zeripath
Copy link
Contributor

I think this would be fixed by #5949

@stale
Copy link

stale bot commented Apr 18, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.

@stale stale bot added the issue/stale label Apr 18, 2019
@lunny lunny added the issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented label Apr 19, 2019
@stale stale bot removed the issue/stale label Apr 19, 2019
@6543
Copy link
Member

6543 commented Oct 24, 2019

@lunny I think we can close this

If you test you get an 404 after reload and if you check our repos the repo is deleted / was not created ...

@6543
Copy link
Member

6543 commented Oct 24, 2019

I think #6200 do its job now ...

@lunny lunny closed this as completed Oct 24, 2019
@lunny lunny removed this from the 1.x.x milestone Oct 24, 2019
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented type/bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants