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

Make skip_if_offline() more robust by checking multiple hosts #1890

Merged
merged 5 commits into from
Nov 29, 2023
Merged

Make skip_if_offline() more robust by checking multiple hosts #1890

merged 5 commits into from
Nov 29, 2023

Conversation

jdblischak
Copy link
Contributor

r-project.org has been down all morning, which is causing my package tests to be skipped. This PR updates skip_if_offline() to check multiple hosts, and returns TRUE on the first connection. It's backwards compatible because it still works when provided a single domain to host. And it will be just as fast once r-project.org is restored.

I added github.com since it's hard to get much done anyways when GitHub is down. And I added captive.apple.com because I learned from sindresorhus/is-online that this is how iOS determines internet connectivity, so it should have a very reliable uptime.

If you are open to this update, I'll add an entry to NEWS.md

@jdblischak jdblischak closed this Oct 29, 2023
@jdblischak jdblischak reopened this Oct 29, 2023
@hadley
Copy link
Member

hadley commented Nov 29, 2023

Let's begin by just swapping r-project.org out for captive.apple.com. I think that's a minimal change that helps the default use case; but in general I do think you should be specifying the specific site you care about here.

@hadley hadley added this to the v3.2.1 milestone Nov 29, 2023
@jdblischak
Copy link
Contributor Author

Let's begin by just swapping r-project.org out for captive.apple.com

Works for me. And I see that you already made this change and added the NEWS bullet. Thanks!

@hadley hadley merged commit b4275f9 into r-lib:main Nov 29, 2023
11 of 12 checks passed
@jdblischak jdblischak deleted the robust-offline branch November 29, 2023 18:18
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