Skip to content

R repositories : moving to "/bin/linux"-style URLs when using PACKAGE_MANAGER_URL#330

Merged
phlg merged 2 commits intoInseeFrLab:mainfrom
phlg:r_package_manager_refactor
Dec 10, 2025
Merged

R repositories : moving to "/bin/linux"-style URLs when using PACKAGE_MANAGER_URL#330
phlg merged 2 commits intoInseeFrLab:mainfrom
phlg:r_package_manager_refactor

Conversation

@phlg
Copy link
Copy Markdown
Contributor

@phlg phlg commented Dec 3, 2025

Hello,

Here's a PR to tweak the behavior of onyxia-set-repositories.sh regarding R repositories specifically. Namely, the intent is replace the /__linux__/ style URLs with the /bin/linux, as this allows for better management when using third-party internal repositories (for instance, Sonatype Nexus). For more info on Linux binary resolution on Posit Package Manager, see this link.

To explain in detail, when using the former style, it's necessary to use one Nexus repository per major.minor version of R (as we need to set the User-Agent matching the R version on a per-repository basis - even if the agent is set on the R client side, it's lost when Nexus tries to proxy Posit Package Manager). When using the latter style, we can use just one Nexus repository to proxy all the different architectures (both in terms of versions of R and Linux distributions).

But as simple as the change is, it might be a breaking change in its current state, for two reasons :

  • The rstudio image is based on the rocker image, which forcibly configures a repository based on the CRAN environment variable, which in turn is set here to a /__linux__/ style URL here. This is probably desirable for users not using an internal repository, and assuming we should leave this untouched, we then have to "reset" this when actually using the PACKAGE_MANAGER_URL - this PR is implemented as such, but this is a new behavior which might lead to regression for some users (I can't see any obvious use case, but that doesn't mean there isn't any).
  • The very fact that I'm suggesting to change from one style of URL to the other means that other people using the images straight from https://hub.docker.com/r/inseefrlab but just adding the PACKAGE_MANAGER_URL variable would need to change the value for that variable. Pre-PR, the value could have been something like https://mypackagemanager.domain.com/r-packages/__linux__, but if the PR is accepted as is, the value would need to change to https://mypackagemanager.domain.com/r-packages

As such, any suggestion that could transform this in a non-breaking change is more than welcome. Or otherwise, this PR can also be closed, we can still implement the necessary changes on our in-house rebuild of the images.

Thanks !

@phlg phlg merged commit 952111c into InseeFrLab:main Dec 10, 2025
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 this pull request may close these issues.

1 participant