Skip to content

Use new HTTP retry logic when fetching SDK's index.json + refactor #8711

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

Merged
merged 2 commits into from
Apr 29, 2025

Conversation

isoos
Copy link
Collaborator

@isoos isoos commented Apr 18, 2025

@isoos
Copy link
Collaborator Author

isoos commented Apr 29, 2025

I think we should land this this week. @sigurdm @jonasfj

}) async {
return await retry(
() async {
final client = http.Client();
Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps we pass in a client instead of creating a new client for every url to fetch?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Planning to do that in subsequent PRs (when migrating more functions to use this).

The practical difference in this specific case was negligible: we would only call the method when the index.json is not fetched at container creation time (or in local tests).

@isoos isoos merged commit 4914f01 into dart-lang:master Apr 29, 2025
31 checks passed
@isoos isoos deleted the http-retry branch April 29, 2025 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants