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

Packagemanager.rstudio.com migration broke R buildpack #1272

Closed
Xarthisius opened this issue May 22, 2023 · 1 comment · Fixed by #1273
Closed

Packagemanager.rstudio.com migration broke R buildpack #1272

Xarthisius opened this issue May 22, 2023 · 1 comment · Fixed by #1273

Comments

@Xarthisius
Copy link
Contributor

Bug description

Per https://status.posit.co/ Rstudio-now-Posit PackageManager server was migrated from https://packagemanager.rstudio.com to https://packagemanager.posit.co/. RBuildPack.get_rspm_snapshot_url doesn't handle the redirect properly.

Expected behaviour

r2d outputs Dockerfile to stdout

Actual behaviour

[Repo2Docker] Looking for repo2docker_config in /tmp/a
Picked Local content provider.
Using local repo ..
Traceback (most recent call last):
  File "/home/xarth/codes/jupyterhub/repo2docker/venv/lib/python3.10/site-packages/requests/models.py", line 971, in json
    return complexjson.loads(self.text, **kwargs)
  File "/usr/lib/python3.10/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.10/json/decoder.py", line 340, in decode
    raise JSONDecodeError("Extra data", s, end)
json.decoder.JSONDecodeError: Extra data: line 1 column 5 (char 4)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/xarth/codes/jupyterhub/repo2docker/venv/bin/jupyter-repo2docker", line 33, in <module>
    sys.exit(load_entry_point('jupyter-repo2docker', 'console_scripts', 'jupyter-repo2docker')())
  File "/home/xarth/codes/jupyterhub/repo2docker/repo2docker/__main__.py", line 469, in main
    r2d.start()
  File "/home/xarth/codes/jupyterhub/repo2docker/repo2docker/app.py", line 850, in start
    self.build()
  File "/home/xarth/codes/jupyterhub/repo2docker/repo2docker/app.py", line 799, in build
    print(picked_buildpack.render(build_args))
  File "/home/xarth/codes/jupyterhub/repo2docker/repo2docker/buildpacks/base.py", line 464, in render
    for user, script in self.get_build_scripts():
  File "/home/xarth/codes/jupyterhub/repo2docker/repo2docker/buildpacks/r.py", line 278, in get_build_scripts
    cran_mirror_url = self.get_cran_mirror_url(self.checkpoint_date)
  File "/home/xarth/codes/jupyterhub/repo2docker/repo2docker/buildpacks/r.py", line 241, in get_cran_mirror_url
    return self.get_rspm_snapshot_url(snapshot_date)
  File "/home/xarth/codes/jupyterhub/repo2docker/repo2docker/buildpacks/r.py", line 209, in get_rspm_snapshot_url
    ).json()
  File "/home/xarth/codes/jupyterhub/repo2docker/venv/lib/python3.10/site-packages/requests/models.py", line 975, in json
    raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: Extra data: line 1 column 5 (char 4)

How to reproduce

  1. mkdir /tmp/foo
  2. echo "r-2022-05-05" > /tmp/foo/runtime.txt
  3. jupyter-repo2docker --no-build --debug /tmp/foo
  4. See error

Your personal set up

  • OS: Linux
  • Docker version: 24.0.0
  • repo2docker version: 2022.10.0+69.g364bf2e.dirty (dirty cause I already tested a patch)
Xarthisius added a commit to Xarthisius/repo2docker that referenced this issue May 22, 2023
Xarthisius added a commit to whole-tale/repo2docker_wholetale that referenced this issue May 22, 2023
Xarthisius added a commit to Xarthisius/repo2docker that referenced this issue May 23, 2023
@pnasrat
Copy link

pnasrat commented May 30, 2023

Will there be a release with this fix in soon?

rgaiacs added a commit to GESIS-Methods-Hub/andrew that referenced this issue Jun 14, 2023
that was corrected upstream.

Relates to jupyterhub/repo2docker#1272
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

Successfully merging a pull request may close this issue.

2 participants