evalEmpire / gitpan

Git repositories for all of CPAN
http://github.com/gitpan
73 stars 12 forks source link

Investigate the random 404 errors. #90

Closed schwern closed 10 years ago

schwern commented 10 years ago

We get a lot of "Unexpected HTTP status code: 404" in the tests and running of the code. These are not logged indicating they're happening outside the import_releases() function.

t/Dist.t ................................... 39/? Unexpected HTTP status code: 404# Tests were run but no plan was declared and done_testing() was not seen.

Track them down. Consider turning on Carp::Always to get a stack trace.

schwern commented 10 years ago

It's coming from inside libgit2 (ie. Git::Raw) which makes it difficult to get a stack trace.

schwern commented 10 years ago

It's coming from clone. Despite double checking with the API that the repository exists after creating it, "git clone" can still get a 404. How frustrating.

schwern commented 10 years ago

Put a backoff wrapper around clone so it tries it several times. Along with push and pull that should cover all the git network interaction.