Closed kuriwaki closed 6 months ago
@kuriwaki, tell me if you want to talk out anything related to this.
Same.
The checks are now working, so it appears this was triggered by the temporary maintenance / upgrade on the server side. The CRAN administrators pointed out the CRAN rules that the package should not rely on network resources to run successfully. I think on the test side we are ok, but the vignettes were reliant.
CRAN check hit an error again due to a remote resource failing so this needs to be implemented and approved by May 12 (per email by CRAN maintainers to me today).
Quitting from lines at lines 21-24 [unnamed-chunk-1] (B-search.Rmd)
Error: processing vignette 'B-search.Rmd' failed with diagnostics:
Internal Server Error (HTTP 500). Failed to Exception running search for [Gary King] with filterQueries [dvObjectType:(dataverses OR datasets OR files), ] and paginationStart [0]: edu.harvard.iq.dataverse.search.SearchException: Internal Dataverse Search Engine Error org.apache.solr.client.solrj.SolrServerException org.apache.solr.client.solrj.SolrServerException: Timeout occurred while waiting response from server at: http://dvn-cloud-solr.lib.harvard.edu:8983/solr/collection1 java.net.SocketTimeoutException java.net.SocketTimeoutException: Read timed out .
--- failed re-building ‘B-search.Rmd’
I see, the test is searching Harvard Dataverse:
https://github.com/IQSS/dataverse-client-r/blob/v0.3.11/vignettes/B-search.Rmd#L22
The approach pyDataverse recently adopted is to spin up a instance of Dataverse in containers using GitHub Actions. If this is of interest, I'm sure @JR-1991 or I would be happy to walk you through https://github.com/gdcc/pyDataverse/blob/master/.github/workflows/test_build.yml
It could even be a topic for a future pyDataverse meeting: https://py.gdcc.io
Or a future container meeting: https://ct.gdcc.io
@pdurbin @JR-1991 I'd like to explore this. I just started by pasting your script in as a workflow in our dev branch: https://github.com/IQSS/dataverse-client-r/actions/workflows/test_build.yml
It looks like this workflow ^ is for creating a new dataverse instance to upload to, using https://github.com/gdcc/dataverse-action. In this R-client test, I only need to search and download existing datasets on dataverse.harvard.edu. I will try to make a ghactions workflow for that. @JR-1991 would you still recommend using one of your templates?
@kuriwaki — Yes, the action spins up a local Dataverse instance available to the action's runner. In terms of consistency, I would recommend using the Dataverse Action instead of querying dataverse.harvard.edu
. Partly because connections could be unavailable, as in this issue, but also because you can extend your range of tests.
For instance, you can create a collection and corresponding datasets using pyDataverse or cURL after setting up the Dataverse instance. This way, you can manage various cases (e.g., includes tabular data, zips, etc) and, in general, have more control over the tests themselves. I personally prefer it over using Demo or Harvard Dataverse, because it eliminates a layer of dependency.
I am happy to support you in setting up everything. PyDataverse already includes some functions we could employ in your Action to create datasets and collections.
Thanks @JR-1991, that sounds cool. For now, to resolve the immediate issue, I have done a simpler thing, which is to take out the live code away from vignettes (per CRAN policy) and putting them instead in tests/*ghaction.R
. I then added a chunk in ghactions to run those separately.
But when I close this, I will make a new issue to propose your pyDataverse solution.
- name: Test live dataverse in vignettes
run: |
devtools::load_all()
source("tests/B-search_ghaction.R")
source("tests/C-download_ghaction.R")
shell: Rscript {0}
Needs to be fixed by 2023-10-23 to prevent suspension from CRAN.
Detailed log currently at https://cran.r-project.org/web/checks/check_results_dataverse.html