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

Temporary fix for r-lib/remotes#663 #22

Closed
mpadge opened this issue Dec 2, 2021 · 2 comments
Closed

Temporary fix for r-lib/remotes#663 #22

mpadge opened this issue Dec 2, 2021 · 2 comments

Comments

@mpadge
Copy link
Member

mpadge commented Dec 2, 2021

r-lib/remotes#663 seems to be affecting the Digital Ocean server, where the failure is entirely reproducible within the server itself, although not directly within the docker container. Work-around will be committed that simply skips installation of system requirements if that error arises and proceeds with the rest. That is clearly going to fail on any packages with sysreqs, but will work otherwise.

If that issue really can not be circumvented, then I''ll need to find another way to install system requirements, which work anyway by just grabbing details directly from the RSPM API as remotes does anyway.

@mpadge mpadge closed this as completed in 622be1f Dec 2, 2021
@mpadge
Copy link
Member Author

mpadge commented Dec 2, 2021

That commit takes the code directly from remotes but replaces the internal json parser with jsonlite which seems to resolve the issue anyway.

@mpadge mpadge reopened this Dec 6, 2021
@mpadge
Copy link
Member Author

mpadge commented Dec 6, 2021

Nope, it's not yet resolved. The nginx server delivers a "504 Bad Gateway" error when calling RSPM via these lines:

res <- system2(
curl,
args = c(
"--silent",
"--data-binary",
shQuote(paste0("@", desc_file)),
shQuote(sprintf("%s/sysreqs?distribution=%s&release=%s&suggests=true",
rspm_repo_url,
os,
os_release)
)
),
stdout = TRUE
)

To fix:

  • Change the curl call cribbed from remotes to httr which is imported here anyway; and
  • If return code is not 200, fall back to the r-hub database as an alternative

mpadge added a commit that referenced this issue Dec 7, 2021
and use httr instead of direct curl call
mpadge added a commit that referenced this issue Dec 7, 2021
@mpadge mpadge closed this as completed in 7f98fbb Dec 7, 2021
mpadge added a commit that referenced this issue Dec 7, 2021
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

1 participant