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

Add retry logic to dependency download #473

Open
ForestEckhardt opened this issue Mar 16, 2023 · 3 comments
Open

Add retry logic to dependency download #473

ForestEckhardt opened this issue Mar 16, 2023 · 3 comments
Labels
good first issue A good first issue to get started with hacktoberfest Hacktoberfest eligible

Comments

@ForestEckhardt
Copy link
Contributor

During test suites I often see failures that are coming from the buildpack having a network problem when downloading the dependencies. This issue is often resolved by rerunning the whole test suite again which takes time and leads to effort on false failures. It would be nice if the buildpack would try and do something like an exponential backoff attempt or even a simple retry when downloading artifacts.

@robdimsdale
Copy link
Member

If I could upvote this 100 times I would.

@ForestEckhardt ForestEckhardt added the good first issue A good first issue to get started with label Mar 16, 2023
@phil9909
Copy link
Member

We looked into this and tried to implement the retry logic in cargo.Transport and got to a working state.
But we wanted to add logging on retry (with backoff) so the users knows why nothing is happening. How would we inject a logger into the Transport instance? We thought about adding a new constructor NewTransportWithRetry while deprecating the old one.

Any opinions?

@robdimsdale
Copy link
Member

I'd prefer to find a way to add retry logic without requiring consumers to change the constructor. I think the way I would do this is make the logger optional (via a second constructor) and only interact with the logger during the retry loop if it is provided.

It's a bit gross, but I think it's worth it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue A good first issue to get started with hacktoberfest Hacktoberfest eligible
Projects
Status: 📝 Todo
Development

No branches or pull requests

4 participants