eddelbuettel / rcppsimdjson

Rcpp Bindings for the 'simdjson' Header Library
115 stars 13 forks source link

Intermittent CI issues #90

Closed JosiahParry closed 5 months ago

JosiahParry commented 5 months ago

Hey! Love the package, and I use it thoroughly in the r-arcgis R packages I'm developing.

One thing I've been encountering is that RcppSimdJson intermittently fails to install during CI. I was curious if you might have some insight as to why it might be happening. For example this CI run https://github.com/R-ArcGIS/arcgisgeocode/actions/runs/8474106631/job/23220318803

eddelbuettel commented 5 months ago

What does 'intermitenly fails to install during CI' try to say? Are you building everything from source on each run?

Per your log you are using r-lib and caches and what not. Which ... I don't use so I am not sure I can help you with that.

I tend to minimize building what I don't have to build and fetch what I can as binaries from r2u ("works great"), r-universe, CRAN. The code in the package has not changed in some time and I am not aware of any fragility. That said, we know bugs lurc and I spent most of yesterday chasing a heisenbug once covr was activated...

eddelbuettel commented 5 months ago

For what it is worth: Six point nince seconds.

```sh edd@rob:~$ docker run --rm -ti rocker/r2u Rscript -e 'system.time(install.packages("RcppSimdJson"))' Ign https://r2u.stat.illinois.edu/ubuntu jammy InRelease Get:1 https://r2u.stat.illinois.edu/ubuntu jammy Release [5713 B] Get:2 https://r2u.stat.illinois.edu/ubuntu jammy Release.gpg [793 B] Get:3 https://r2u.stat.illinois.edu/ubuntu jammy/main amd64 Packages [2485 kB] Get:4 http://archive.ubuntu.com/ubuntu jammy InRelease [270 kB] Get:5 http://security.ubuntu.com/ubuntu jammy-security InRelease [110 kB] Get:6 https://r2u.stat.illinois.edu/ubuntu jammy/main all Packages [7928 kB] Get:7 https://cloud.r-project.org/bin/linux/ubuntu jammy-cran40/ InRelease [3626 B] Get:8 https://cloud.r-project.org/bin/linux/ubuntu jammy-cran40/ Packages [51.0 kB] Get:9 http://security.ubuntu.com/ubuntu jammy-security/restricted amd64 Packages [2067 kB] Get:10 http://archive.ubuntu.com/ubuntu jammy-updates InRelease [119 kB] Get:11 http://archive.ubuntu.com/ubuntu jammy-backports InRelease [109 kB] Get:12 http://archive.ubuntu.com/ubuntu jammy/restricted amd64 Packages [164 kB] Get:13 http://archive.ubuntu.com/ubuntu jammy/universe amd64 Packages [17.5 MB] Get:14 http://security.ubuntu.com/ubuntu jammy-security/multiverse amd64 Packages [44.6 kB] Get:15 http://security.ubuntu.com/ubuntu jammy-security/main amd64 Packages [1641 kB] Get:16 http://security.ubuntu.com/ubuntu jammy-security/universe amd64 Packages [1081 kB] Get:17 http://archive.ubuntu.com/ubuntu jammy/multiverse amd64 Packages [266 kB] Get:18 http://archive.ubuntu.com/ubuntu jammy/main amd64 Packages [1792 kB] Get:19 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 Packages [1357 kB] Get:20 http://archive.ubuntu.com/ubuntu jammy-updates/restricted amd64 Packages [2104 kB] Get:21 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages [1920 kB] Get:22 http://archive.ubuntu.com/ubuntu jammy-updates/multiverse amd64 Packages [61.2 kB] Get:23 http://archive.ubuntu.com/ubuntu jammy-backports/universe amd64 Packages [33.3 kB] Get:24 http://archive.ubuntu.com/ubuntu jammy-backports/main amd64 Packages [80.9 kB] Fetched 41.2 MB in 0s (0 B/s) Install system packages as root... Reading package lists... Done Building dependency tree... Done Reading state information... Done Reading package lists... Done Building dependency tree... Done Reading state information... Done Get:1 https://r2u.stat.illinois.edu/ubuntu jammy/main amd64 r-cran-rcpp amd64 1.0.12-1.ca2204.1 [1972 kB] Get:2 https://r2u.stat.illinois.edu/ubuntu jammy/main amd64 r-cran-rcppsimdjson amd64 0.1.11-1.ca2204.1 [1045 kB] Fetched 3017 kB in 0s (0 B/s) Selecting previously unselected package r-cran-rcpp. (Reading database ... 18321 files and directories currently installed.) Preparing to unpack .../r-cran-rcpp_1.0.12-1.ca2204.1_amd64.deb ... Unpacking r-cran-rcpp (1.0.12-1.ca2204.1) ... Selecting previously unselected package r-cran-rcppsimdjson. Preparing to unpack .../r-cran-rcppsimdjson_0.1.11-1.ca2204.1_amd64.deb ... Unpacking r-cran-rcppsimdjson (0.1.11-1.ca2204.1) ... Setting up r-cran-rcpp (1.0.12-1.ca2204.1) ... Setting up r-cran-rcppsimdjson (0.1.11-1.ca2204.1) ... user system elapsed 5.125 0.743 6.987 edd@rob:~$ ```
eddelbuettel commented 5 months ago

Maybe you are running out of ram or other resources? Anyway, I don't see anything with with the package.

eddelbuettel commented 5 months ago

Also, why are you wasting all these cycles? oldrel-4? Do you know when the last time was I ran R 3.6.* ?

It's a C++17 package, and it was quite demanding on the toolchain when we wrote it. I have no idea what mix you have there for a 2 year old distro release (as we get Ubuntu 24.04 next months) coupled with a five years old R binaries, It seems to work just fine on ubuntu devel and release.

JosiahParry commented 5 months ago

Thanks for your thoughts! I use the r-lib/actions r-cmd-check-full when working with Rust because I've been bitten by quite the number of issues with different OS in the CRAN submission process when Rust is involved. However, the point about 3.6.3 is a good one—I didn't realize that oldrel-4 was 3.6! I'm not even sure if CRAN is checking oldrel that far back (I'm not sure where I would see that)?

Removing the oldrel-4 check gets rid of the problem :) I suppose theres some compiler toolchain issue there thats beyond my head. Thank you for your time!!!

eddelbuettel commented 5 months ago

CRAN only knows three states: present (r-release), future (r-devel) and immediate past (r-oldrel). See e.g.for your arcgis package:

image

And if you click on the links therein you get these details:

image

For the next few weeks this is a little more refined as we have r-release at 4.3.3. the release cycle now in motion with r-devel at 4.4.0 and hence r-devel at 4.5.0 now. But the key point is that we still have the triplet <old-release, release, devel>. Nothing more.

Having usethis add five releases is (IMHO) utter nonsense. Net harmful but I suppose crypto mining and LLM training are more wasteful. But in difference to the other two, you have control over this last one. So I suggest you don't.

lemire commented 5 months ago

Net harmful but I suppose crypto mining and LLM training are more wasteful.

I come here for the rants. :-)

eddelbuettel commented 5 months ago

We aim to not disappoint.

JosiahParry commented 4 months ago

Net harmful but I suppose crypto mining and LLM training are more wasteful.

I come here for the rants. :-)

looool!

@eddelbuettel thank you for the details! To confirm my understanding the triplet is always the latest minor version difference, is that right? So we have <4.2.3, 4.3.3, 4.4.0> as the testing targets.

eddelbuettel commented 4 months ago

"Yes but" and as I wrote, because we are currently in the clearly outline beta/alpha/rc cycle it may now be 4.2., 4.3. and 4.5.0 because for a few weeks at least 4.4.0 and 4.3.3 kinda coexist.

But qualitatively this correct: old-rel is '-1', release is current and devel is what release with be next. But eg I was curious yesterday too and updated my local R-devel (which I otherwise do once every week, or every other week) and R-devel now calls itself 4.5.0:

edd@rob:~/svn/r-devel$ RD --version
R Under development (unstable) (2024-03-28 r86221) -- "Unsuffered Consequences"
Copyright (C) 2024 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under the terms of the
GNU General Public License versions 2 or 3.
For more information about these matters see
https://www.gnu.org/licenses/.

edd@rob:~/svn/r-devel$ RD -q -e 'print(getRversion())'
> print(getRversion())
[1] ‘4.5.0’
> 
> 
edd@rob:~/svn/r-devel$