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

Static branching exercises error #35

Closed
2 tasks done
sctyner opened this issue Oct 12, 2020 · 7 comments
Closed
2 tasks done

Static branching exercises error #35

sctyner opened this issue Oct 12, 2020 · 7 comments
Assignees

Comments

@sctyner
Copy link

sctyner commented Oct 12, 2020

Prework

Description

The exercises page at https://colorado.rstudio.com/rsc/learndrake/static/ has an error. (4-static/4-static.Rmd)

Reproducible example

Not applicable

Session info

I got the error on Microsoft Edge Version 86.0.622.38 and Google Chrome Version 86.0.4240.75. Running Windows 10 Enterprise.

Expected output

A functioning learnr tutorial

wlandau-lilly added a commit that referenced this issue Oct 12, 2020
@wlandau
Copy link
Owner

wlandau commented Oct 12, 2020

Thanks for catching that. Not sure what is wrong yet, but for now there is a working instance at https://wlandau.shinyapps.io/learndrakestatic/. Currently checking if I just need to regenerate manifest.json.

By the way, targets is the long-term successor to drake, and it is in the initial stages of rOpenSci review. It solves several of drake's permanent problems, including the reliance on a complicated DSL to declare each target. Static branching in targets is easier to learn and use, more consistent, and more reliable. The actual implementation is a bunch of functions in tarchetypes, notably tar_map() and tar_combine().

That said, drake is never going away, and sticking with it is still a reasonable choice. More details are at https://wlandau.github.io/targets/articles/need.html#drake. But if you do decide to transition from drake to targets, these tables can help.

@wlandau
Copy link
Owner

wlandau commented Oct 12, 2020

@colearendt, do you happen to know what would explain this parsing error? manifest.json appears valid when I parse it locally with jsonlite::fromJSON().

@colearendt
Copy link
Collaborator

colearendt commented Oct 13, 2020

@wlandau It looks like the issue is here:

(I searched for that version number and then poked around that point in the file). Some libraries (i.e. jsonlite::fromJSON()) are a bit more forgiving on JSON parsing, but may just truncate part of the file. There may be a way to make it more strict though - I'm not sure off-hand.

Was this manifest produced directly by rsconnect::writeManifest()?

(Also, do you have a workshop coming up?)

EDIT: Merp. Never mind. This is a map, not an array 😑 Too early haha. I'm actually suspicious this error is coming from elsewhere.

@wlandau
Copy link
Owner

wlandau commented Oct 13, 2020

Yes, the manifest was generated by rsconnect::writeManifest() (with rsconnect 0.8.16). Removing the lifecycle package entry was worth a shot but does not seem to have worked.

I no longer have drake workshops coming up, but I did teach https://github.com/wlandau/targets-tutorial last week at R/Pharma. The RStudio Cloud space worked super well, and I plan to reuse it for subsequent iterations. the targets workshop is entirely notebook-based and does not have apps.

@colearendt
Copy link
Collaborator

colearendt commented Oct 13, 2020

Awesome! Good to hear! I believe this may be related:

curl: HTTP 404 https://colorado.rstudio.com/rspm/all/__linux__/bionic/latest/src/contrib/Archive/storr/storr_1.2.4.tar.gz
10/13 11:50:44.438 (GMT)
curl: (22) The requested URL returned error: 404
10/13 11:50:45.441 (GMT)
FAILED
10/13 11:50:45.442 (GMT)
Error in getSourceForPkgRecord(pkgRecord, srcDir(project), availablePackagesSource(repos = repos), : Failed to retrieve package sources for storr 1.2.4 from CRAN (internet connectivity issue?) [1.2.1 is current]
10/13 11:50:45.442 (GMT)
10/13 11:50:45.442 (GMT)
Unable to fully restore the R packages associated with this deployment.
10/13 11:50:45.442 (GMT)
Please review the preceding messages to determine which package
10/13 11:50:45.442 (GMT)
encountered installation difficulty and the cause of the failure.
10/13 11:50:45.452 (GMT)
Warning message:
10/13 11:50:45.452 (GMT)
In getSourceForPkgRecord(pkgRecord, srcDir(project), availablePackagesSource(repos = repos), :
10/13 11:50:45.452 (GMT)
Package version '1.2.4' is newer than the latest version reported by CRAN ('1.2.1') -- packrat may be unable to retrieve package sources.

The packrat restore actually failed for your most recent deployment, because you are using a newer version of the storr package than is available on RSPM. If it's possible to downgrade storr, that might fix the deployment issue. Otherwise, RSPM will likely update storr in a day or so and we can redeploy. It's curious that the roll-back failed with this strange issue.

EDIT: Same for drake too 🙈 An RSPM snapshot should be coming soon.

Error in getSourceForPkgRecord(pkgRecord, srcDir(project), availablePackagesSource(repos = repos), : Failed to retrieve package sources for drake 7.12.6 from CRAN (internet connectivity issue?) [7.12.5 is current]

EDIT2: I confirmed that this error is an error from 2 months ago 🙈 I bumped one version back and it is working. When a new deployment succeeds, it should take precedence. These package versions are preventing new deployments.

image

39705 has the error

@wlandau
Copy link
Owner

wlandau commented Oct 13, 2020

Thanks, Cole! Looks like it's working now.

@wlandau wlandau closed this as completed Oct 13, 2020
@colearendt
Copy link
Collaborator

Just to be clear, it's running on the old version right now. I'll make a note to try redeploying the latest tomorrow when RSPM is updated.

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

No branches or pull requests

3 participants