Closed slohr closed 1 year ago
Thanks for your patience on this! With the newer pins API, it's true that you can't set up a board object unless you can actually connect to it:
library(pins)
b <- board_rsconnect()
#> Connecting to RSC ??? at <https://colorado.rstudio.com/rsc>
#> Error in curl::curl_fetch_memory(url, handle = handle): Could not resolve host: colorado.rstudio.com
Created on 2022-11-04 with reprex v2.0.2
What still does work is a set of steps where you create the board object, then get disconnected from it and use the cache:
b %>% pin_read("julia.silge/very-good-numbers")
#> ✖ Failed to connect to RSC; using cached version
#> [1] 1 2 3 4 5 6 7 8 9 10
I can see how that change could be frustrating, so let's keep this issue open a bit longer to collect other feedback from users on this issue. We could try to document what use_cache_on_failure
does in a more clear way.
This issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue.
It appears that the 1.0.0 API does not honor the "use_cache_on_failure" flag when reading a previously accessed pin while offline. In addition, now that you need to pass around a "board" object it fails at an earlier stage in the process.
Perhaps I'm not adapting my code properly to use this feature in the new API?
Note: Legacy API access to cached pins in rsconnect works when you're offline (see #423)
Test case:
test data
Write with the new API
Now retrieve
If you disconnect VPN or WiFi so that the URL is not accessible, you'll then get this error:
Error in curl::curl_fetch_memory(url, handle = handle) : Timeout was reached: [connect.alkahest.io] LibreSSL SSL_read: SSL_ERROR_SYSCALL, errno 60
traceback