pkgdepends fails to download from private git url, despite successfully resolving dependencies
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
Start in src/library/pkgdepends/R/type-git.R, comparing type_git_get_data() with async_git_download_repo() and git_download_repo(). Reproduce with an Enterprise GitLab URL and gitcreds credentials, then inspect the RemoteSha indexing and the writeBin() error path. Done means a private Git repository resolves and downloads successfully through pkgdepends.
Written by the indexing model from the issue text.
Description
I tried my best to track this issue down, but it's been a bit tricky to navigate the pak private library and async. Hopefully I'm close enough that the bug report is useful.
Reproducing the error
I'm struggling to find a way to make a full reprex, but the situation is
- Enterprise GitLab
- Using username and access token configured via
gitcreds
spec <- "pkgname=git::https://enterprise.com/org/pkgname.git"
prop <- pkgdepends::new_pkg_installation_proposal(spec)
prop$download()
# ℹ Getting 13 pkgs with unknown sizes
# ✖ Failed to download pkgname 0.0.0.9000 (source)
# ✔ Cached copy of RColorBrewer 1.1-3 (x86_64-pc-linux-gnu-ubuntu-22.04) is the latest build
# ✔ Cached copy of colorspace 2.1-0 (x86_64-pc-linux-gnu-ubuntu-22.04) is the latest build
# ✔ Cached copy of farver 2.1.1 (x86_64-pc-linux-gnu-ubuntu-22.04) is the latest build
# ...
# ✖ Failed to download 1 package.
Best effort at debugging
Given the remote,
- I've successfully fetched the
DESCRIPTIONinfo usingpkgdepends:::type_git_get_data(remote) - But then I hit an error at
async_git_download_repo(url, ref = sha, output = pkgdir)(orgit_download_repo)pkgdepends:::synchronize(pkgdepends:::async_git_download_repo(url, ref = sha, output = "/tmp/pkgname")) # Error in writeBin(parsed[[tr$hash[l]]]$raw, opath) : # can only write vector objects
[!NOTE]
while exploring this, this line seems like it's improperly indexed and I had to make the following modification just to attempt a download:- sha <- resolution$metadata[[1]][["RemoteSha"]] + sha <- resolution$metadata[["RemoteSha"]]
- Dominant language
- C
- Stars
- 135
- Forks
- 47
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from r-lib/pkgdepends
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
r-lib/pkgdepends#485 · 4 comments ·
-
Allow trailing slash(es) in urls?Possibly taken @BjarkeHautop claimed this 100 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
r-lib/pkgdepends#477 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 70/100
r-lib/pkgdepends#486 · 4 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 55/100
r-lib/pkgdepends#484 · 1 reaction ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
r-lib/pkgdepends#483 · 1 comment ·
All issues in r-lib/pkgdepends
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
containers/bubblewrap#826 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 1-3 hours Newbie friendliness 62/100
Revivedx/SavageWindRecomp#488 ·
Maintainers usually reply within 1 day
-
needs-device
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
feature/themes QA/No release-notes/exclude tests tests/missing-coverage tests/test-quality
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
brave/brave-browser#60971 ·
Maintainers usually reply within 1 day