Skip to content

Conversation

@nektro
Copy link

@nektro nektro commented Sep 9, 2025

under the current code if fetching the list of community mirrors fails then the the list is left empty and we jump straight to querying ziglang.org again and not relying on community mirrors at all. with this patch the action is more resilient to potential ziglang.org downtime by keeping a copy of the community mirrors list on hand and fallingback to them in the event this happens.

mirrors = (await mirrors_response.text()).split('\n').filter((url) => url.length != 0);
} catch {
// For some reason the mirrors are inaccessible. That's okay; allow ourselves to fall back to ziglang.org below.
// ziglang.org itself is down. Use this backup list instead.
Copy link
Contributor

Choose a reason for hiding this comment

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

Hi, I wonder why we don't upload the mirror file to GitHub?

Copy link
Author

Choose a reason for hiding this comment

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

to avoid the parsing overhead. it's not a long list to make an array

Copy link
Contributor

Choose a reason for hiding this comment

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

The problem is that this array is hardcoded, which I don't think is a good practice.

Copy link
Author

Choose a reason for hiding this comment

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

it being hardcoded here is the whole point of this patch

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