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

Error in github_resolve_ref.github_release trying to install IRkernel #767

Closed
breiter opened this issue Jul 19, 2023 · 3 comments
Closed

Comments

@breiter
Copy link

breiter commented Jul 19, 2023

Installing IRKernel via remotes in rocker-vesrioned2/scripts/install_jupiter.sh fails with an error Cannot find repo repo IRkernel/IRkernel although it exists and cannot open URL 'https://api.github.com/repos/IRkernel/IRkernel/releases' which also exists.

https://github.com/rocker-org/rocker-versioned2/blob/ef593dcd7b334e02e79188a9e17dcf6149c178b9/scripts/install_jupyter.sh#L36

R --quiet -e 'remotes::install_github("IRkernel/IRkernel@*release")'
41.01 > remotes::install_github("IRkernel/IRkernel@*release")
41.22 Error in github_resolve_ref.github_release(meta$ref %||% ref, meta, host = host,  : 
41.22   Cannot find repo IRkernel/IRkernel.
41.22 cannot open URL 'https://api.github.com/repos/IRkernel/IRkernel/releases'
41.22 Calls: <Anonymous> ... github_resolve_ref -> github_resolve_ref.github_release
41.22 Execution halted
------
Dockerfile:97
--------------------
  95 |     
  96 |     # install jupyter
  97 | >>> RUN /rocker_scripts/install_jupyter.sh
  98 |     
  99 |     # set up renv in order to build cache in ~/.cache/R/renv/library by creating a

I think this is happening in install-github.R in github_resolve_ref.github_release but I'm stumped as to why.

  # Retrieve the ref for the latest release
  #' @export
  github_resolve_ref.github_release <- function(x, params, ..., host, auth_token = github_pat()) {
    # GET /repos/:user/:repo/releases
    path <- paste("repos", params$username, params$repo, "releases", sep = "/")
    response <- tryCatch(
      github_GET(path, host = host, pat = auth_token),
      error = function(e) e
    )
  
    if (methods::is(response, "error") || !is.null(response$message)) {
      stop("Cannot find repo ", params$username, "/", params$repo, ".", "\n",
        response$message)
    }
  
    if (length(response) == 0L)
      stop("No releases found for repo ", params$username, "/", params$repo, ".")
  
    params$ref <- response[[1L]]$tag_name
    params
  }
@gaborcsardi
Copy link
Member

Works for me, try a newer version of remotes?

❯ remotes::install_github("IRkernel/IRkernel@*release")
Downloading GitHub repo IRkernel/IRkernel@1.3.2
'/opt/homebrew/bin/git' clone --depth 1 --no-hardlinks --recurse-submodules https://github.com/jupyter/jupyter_kernel_test.git /var/folders/ph/fpcmzfd16rgbbk8mxvy9m2_h0000gn/T//Rtmpt5mdcC/remotes12f45126204ea/IRkernel-IRkernel-1130602/tests/testthat/jkt
Cloning into '/var/folders/ph/fpcmzfd16rgbbk8mxvy9m2_h0000gn/T//Rtmpt5mdcC/remotes12f45126204ea/IRkernel-IRkernel-1130602/tests/testthat/jkt'...
remote: Enumerating objects: 22, done.
remote: Counting objects: 100% (22/22), done.
remote: Compressing objects: 100% (21/21), done.
remote: Total 22 (delta 1), reused 9 (delta 0), pack-reused 0
Receiving objects: 100% (22/22), 17.02 KiB | 2.13 MiB/s, done.
Resolving deltas: 100% (1/1), done.
'/opt/homebrew/bin/git' clone --depth 1 --no-hardlinks --recurse-submodules https://github.com/flying-sheep/ndjson-testrunner.git /var/folders/ph/fpcmzfd16rgbbk8mxvy9m2_h0000gn/T//Rtmpt5mdcC/remotes12f45126204ea/IRkernel-IRkernel-1130602/tests/testthat/njr
Cloning into '/var/folders/ph/fpcmzfd16rgbbk8mxvy9m2_h0000gn/T//Rtmpt5mdcC/remotes12f45126204ea/IRkernel-IRkernel-1130602/tests/testthat/njr'...
remote: Enumerating objects: 10, done.
remote: Counting objects: 100% (10/10), done.
remote: Compressing objects: 100% (8/8), done.
remote: Total 10 (delta 0), reused 6 (delta 0), pack-reused 0
Receiving objects: 100% (10/10), 15.97 KiB | 1.23 MiB/s, done.
Skipping 1 packages ahead of CRAN: cli
Installing 2 packages: pbdZMQ, IRdisplay
Installing packages into ‘/Users/gaborcsardi/Library/R/arm64/4.3/library’
(as ‘lib’ is unspecified)

The downloaded binary packages are in
	/var/folders/ph/fpcmzfd16rgbbk8mxvy9m2_h0000gn/T//Rtmpt5mdcC/downloaded_packages
── R CMD build ─────────────────────────────────────────────────────────────────
   checking for file ‘/private/var/folders/ph/fpcmzfd16rgbbk8mxvy9m2_h0000gn/T/R✔  checking for file ‘/private/var/folders/ph/fpcmzfd16rgbbk8mxvy9m2_h0000gn/T/Rtmpt5mdcC/build-12f45e4587e7/IRkernel/DESCRIPTION’
─  preparing ‘IRkernel’:
✔  checking DESCRIPTION meta-information ...
─  checking for LF line-endings in source and make files and shell scripts
─  checking for empty or unneeded directories
   Removed empty directory ‘IRkernel/example-notebooks’
─  building ‘IRkernel_1.3.2.tar.gz’

Installing package into ‘/Users/gaborcsardi/Library/R/arm64/4.3/library’
(as ‘lib’ is unspecified)
* installing *source* package ‘IRkernel’ ...
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded from temporary location
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (IRkernel)

@breiter
Copy link
Author

breiter commented Jul 19, 2023

Working directly on the unaltered rocker image, so I need to find the problem somewhere else.

$ docker run --rm -it rocker/rstudio:4 /bin/bash
root@908254633e8c:/# bash /rocker_scripts/install_jupyter.sh 
...
* DONE (IRkernel)
> 
> 
> IRkernel::installspec(user = FALSE)
> 
> 
Check the avalable jupyter kernels...

Available kernels:
  ir         /usr/local/share/jupyter/kernels/ir
  python3    /usr/local/share/jupyter/kernels/python3

Install jupyter, done!

thanks!

@breiter breiter closed this as completed Jul 19, 2023
@breiter
Copy link
Author

breiter commented Jul 19, 2023

I think this was caused by a regression in a security fix for curl in Ubuntu 22.04.

==========================================================================
Ubuntu Security Notice USN-6237-2
July 19, 2023

curl regression

A security issue affects these releases of Ubuntu and its derivatives:

  • Ubuntu 22.04 LTS

Summary:

USN-6237-1 introduced a regression in curl.

Software Description:

  • curl: HTTP, HTTPS, and FTP client and client libraries

Details:

USN-6237-1 fixed vulnerabilities in curl. The update caused a certificate
wildcard handling regression on Ubuntu 22.04 LTS. This update fixes the
problem.

We apologize for the inconvenience.

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

2 participants