Skip to content

new atime ci, no more old cml container - #7901

Draft
tdhock wants to merge 6 commits into
masterfrom
new-atime-ci
Draft

tdhock wants to merge 6 commits into
masterfrom
new-atime-ci

Conversation

@tdhock

@tdhock tdhock commented Sep 18, 2026

Copy link
Copy Markdown
Member

The old atime CI uses an old container (old compilers etc.)
I propose switching to this new CI which is definitely more code.
Plus: easier to customize.
Minus: more maintenance burden.

@tdhock tdhock added the atime Requests related to adding/improving/monitoring performance regression tests via atime. label Sep 18, 2026
@tdhock

tdhock commented Sep 18, 2026

Copy link
Copy Markdown
Member Author

ci says

* installing *source* package ‘data.table.b1b1832b0d2d4032b46477d9fe6efb15006664f4’ ...
** this is package ‘data.table.b1b1832b0d2d4032b46477d9fe6efb15006664f4’ version ‘1.12.9’
** using staged installation
zlib 1.3 is available ok
OpenMP supported
x86_64-linux-gnu-gcc -std=gnu2x 13.3.0
** libs
using C compiler: ‘x86_64-linux-gnu-gcc (Ubuntu 13.3.0-6ubuntu2~24.04.1) 13.3.0’
x86_64-linux-gnu-gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG      -fopenmp -fpic  -g -O2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -ffile-prefix-map=/build/r-base-SRqRsK/r-base-4.6.1=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -fdebug-prefix-map=/build/r-base-SRqRsK/r-base-4.6.1=/usr/src/r-base-4.6.1-6.2404.0 -Wdate-time -D_FORTIFY_SOURCE=3  -c assign.c -o assign.o
In file included from po.h:2,
                 from data.table.h:15,
                 from assign.c:1:
assign.c: In function ‘assign’:
assign.c:458:15: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘R_xlen_t’ {aka ‘long int’} [-Wformat=]
  458 |       error(_("Internal error: selfrefnames is ok but tl names [%d] != tl [%d]"), TRUELENGTH(names), oldtncol);  // # nocov
      |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
assign.c:458:13: note: in expansion of macro ‘_’
  458 |       error(_("Internal error: selfrefnames is ok but tl names [%d] != tl [%d]"), TRUELENGTH(names), oldtncol);  // # nocov
      |             ^
assign.c:458:66: note: format string is defined here
  458 |       error(_("Internal error: selfrefnames is ok but tl names [%d] != tl [%d]"), TRUELENGTH(names), oldtncol);  // # nocov
      |                                                                 ~^
      |                                                                  |
      |                                                                  int
      |                                                                 %ld
assign.c:506:5: error: format not a string literal and no format arguments [-Werror=format-security]
  506 |     if (ret) warning(ret);
      |     ^~
assign.c:638:33: warning: format ‘%d’ expects a matching ‘int’ argument [-Wformat=]
  638 |         error("Internal error: %d column numbers to delete not now in strictly increasing order. No-dups were checked earlier."); // # nocov
      |                                ~^
      |                                 |
      |                                 int
assign.c: In function ‘memrecycle’:
assign.c:806:21: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long unsigned int’ [-Wformat=]
  806 |             error(_("Unable to allocate working memory of %d bytes to combine factor levels"), nAdd*sizeof(SEXP *));
      |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
assign.c:806:19: note: in expansion of macro ‘_’
  806 |             error(_("Unable to allocate working memory of %d bytes to combine factor levels"), nAdd*sizeof(SEXP *));
      |                   ^
assign.c:806:60: note: format string is defined here
  806 |             error(_("Unable to allocate working memory of %d bytes to combine factor levels"), nAdd*sizeof(SEXP *));
      |                                                           ~^
      |                                                            |
      |                                                            int
      |                                                           %ld
cc1: some warnings being treated as errors
make: *** [/usr/lib/R/etc/Makeconf:190: assign.o] Error 1
ERROR: compilation failed for package ‘data.table.b1b1832b0d2d4032b46477d9fe6efb15006664f4’

in contrast the old ci in this PR last week #7899
has a much older compiler (see below), and the build succeeded. but I could not find the same data.table.b1b compilation, because it was cached, so below we see compilation of another version, probably the PR branch:

  * installing *source* package ‘data.table.a1daab4d8d0dd3ae73f28f8039be8fb409e30db1’ ...
  ** this is package ‘data.table.a1daab4d8d0dd3ae73f28f8039be8fb409e30db1’ version ‘1.18.99’
  ** using staged installation
  gcc 9.4.0
  zlib 1.2.11 is available ok
  * checking if OpenMP works with CFLAGS='' LIBS=''... no
  * checking if OpenMP works with CFLAGS='$(SHLIB_OPENMP_CFLAGS)' LIBS='$(SHLIB_OPENMP_CFLAGS)'... yes
  ** libs
  using C compiler: ‘gcc (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0’
  gcc -std=gnu99 -I"/opt/R/4.6.1/lib/R/include" -DNDEBUG   -I/usr/local/include   -fvisibility=hidden  -fopenmp -DSTRING_PTR_RO=STRING_PTR_RO  -fpic  -g -O2  -c assign.c -o assign.o
  gcc -std=gnu99 -I"/opt/R/4.6.1/lib/R/include" -DNDEBUG   -I/usr/local/include   -fvisibility=hidden  -fopenmp -DSTRING_PTR_RO=STRING_PTR_RO  -fpic  -g -O2  -c backports.c -o backports.o

re-running that other PR build now https://github.com/Rdatatable/data.table/actions/runs/34461127844/job/105616421290 uses the new atime from CRAN with the old atime CI container (old compilers), and the build failed (gert not available, required instead of git2r by new atime).

  * installing *source* package ‘curl’ ...
  ** this is package ‘curl’ version ‘8.0.0’
  ** package ‘curl’ successfully unpacked and MD5 sums checked
  ** using staged installation
  Using PKG_CFLAGS=
  Using PKG_LIBS=-lcurl
  --------------------------- [ANTICONF] --------------------------------
  Configuration failed because libcurl was not found. Try installing:
   * deb: libcurl4-openssl-dev (Debian, Ubuntu, etc)
   * rpm: libcurl-devel (Fedora, CentOS, RHEL)
   * apk: curl-dev (Alpine)
  If libcurl is already installed, check that 'pkg-config' is in your
  PATH and PKG_CONFIG_PATH contains a libcurl.pc file. If pkg-config
  is unavailable you can set INCLUDE_DIR and LIB_DIR manually via:
  R CMD INSTALL --configure-vars='INCLUDE_DIR=... LIB_DIR=...'
  -------------------------- [ERROR MESSAGE] ---------------------------
  <stdin>:1:10: fatal error: curl/curl.h: No such file or directory
  compilation terminated.
  --------------------------------------------------------------------
  ERROR: configuration failed for package ‘curl’
  ERROR: dependency ‘curl’ is not available for package ‘credentials’
  ERROR: dependency ‘credentials’ is not available for package ‘gert’

@tdhock tdhock mentioned this pull request Sep 18, 2026
@tdhock

tdhock commented Sep 18, 2026

Copy link
Copy Markdown
Member Author

I tried replicating the CI error locally using

atime::atime_versions_remove("data.table")
tinfo <- atime::atime_pkg_test_info("data.table")
tcall <- tinfo$test.call[["shallow regression fixed in #4440"]]
tres <- eval(tcall)

but it compiles on my ubuntu laptop, see below:

* installing *source* package ‘data.table.b1b1832b0d2d4032b46477d9fe6efb15006664f4’ ...
** this is package ‘data.table.b1b1832b0d2d4032b46477d9fe6efb15006664f4’ version ‘1.12.9’
** using staged installation
zlib 1.3 is available ok
OpenMP supported
gcc -std=gnu2x 13.3.0
** libs
using C compiler: ‘gcc (Ubuntu 13.3.0-6ubuntu2~24.04.1) 13.3.0’
gcc -std=gnu99 -I"/home/local/USHERBROOKE/hoct2726/lib/R/include" -DNDEBUG   -I/usr/local/include   -fopenmp -fpic  -g -O2  -c assign.c -o assign.o
In file included from po.h:2,
                 from data.table.h:15,
                 from assign.c:1:
assign.c: In function ‘assign’:
assign.c:458:15: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘R_xlen_t’ {aka ‘long int’} [-Wformat=]
  458 |       error(_("Internal error: selfrefnames is ok but tl names [%d] != tl [%d]"), TRUELENGTH(names), oldtncol);  // # nocov
      |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
assign.c:458:13: note: in expansion of macro ‘_’
  458 |       error(_("Internal error: selfrefnames is ok but tl names [%d] != tl [%d]"), TRUELENGTH(names), oldtncol);  // # nocov
      |             ^
assign.c:458:66: note: format string is defined here
  458 |       error(_("Internal error: selfrefnames is ok but tl names [%d] != tl [%d]"), TRUELENGTH(names), oldtncol);  // # nocov
      |                                                                 ~^
      |                                                                  |
      |                                                                  int
      |                                                                 %ld
assign.c:506:5: warning: format not a string literal and no format arguments [-Wformat-security]
  506 |     if (ret) warning(ret);
      |     ^~
assign.c:638:33: warning: format ‘%d’ expects a matching ‘int’ argument [-Wformat=]
  638 |         error("Internal error: %d column numbers to delete not now in strictly increasing order. No-dups were checked earlier."); // # nocov
      |                                ~^
      |                                 |
      |                                 int
assign.c: In function ‘memrecycle’:
assign.c:806:21: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long unsigned int’ [-Wformat=]
  806 |             error(_("Unable to allocate working memory of %d bytes to combine factor levels"), nAdd*sizeof(SEXP *));
      |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
assign.c:806:19: note: in expansion of macro ‘_’
  806 |             error(_("Unable to allocate working memory of %d bytes to combine factor levels"), nAdd*sizeof(SEXP *));
      |                   ^
assign.c:806:60: note: format string is defined here
  806 |             error(_("Unable to allocate working memory of %d bytes to combine factor levels"), nAdd*sizeof(SEXP *));
      |                                                           ~^
      |                                                            |
      |                                                            int
      |                                                           %ld
gcc -std=gnu99 -I"/home/local/USHERBROOKE/hoct2726/lib/R/include" -DNDEBUG   -I/usr/local/include   -fopenmp -fpic  -g -O2  -c backports.c -o backports.o

The difference is:
on my machine

using C compiler: ‘gcc (Ubuntu 13.3.0-6ubuntu2~24.04.1) 13.3.0’
gcc -std=gnu99 -I"/home/local/USHERBROOKE/hoct2726/lib/R/include" -DNDEBUG   -I/usr/local/include   -fopenmp -fpic  -g -O2  -c assign.c -o assign.o
assign.c:506:5: warning: format not a string literal and no format arguments [-Wformat-security]

on CI

using C compiler: ‘x86_64-linux-gnu-gcc (Ubuntu 13.3.0-6ubuntu2~24.04.1) 13.3.0’
x86_64-linux-gnu-gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG      -fopenmp -fpic  -g -O2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -ffile-prefix-map=/build/r-base-SRqRsK/r-base-4.6.1=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -fdebug-prefix-map=/build/r-base-SRqRsK/r-base-4.6.1=/usr/src/r-base-4.6.1-6.2404.0 -Wdate-time -D_FORTIFY_SOURCE=3  -c assign.c -o assign.o
assign.c:506:5: error: format not a string literal and no format arguments [-Werror=format-security]
cc1: some warnings being treated as errors

So CI has all these extra flags:

-fno-omit-frame-pointer
-mno-omit-leaf-frame-pointer 
-ffile-prefix-map=/build/r-base-SRqRsK/r-base-4.6.1=. 
-fstack-protector-strong 
-fstack-clash-protection 
-Wformat
-Werror=format-security 
-fcf-protection 
-fdebug-prefix-map=/build/r-base-SRqRsK/r-base-4.6.1=/usr/src/r-base-4.6.1-6.2404.0 
-Wdate-time 
-D_FORTIFY_SOURCE=3

So we can fix this on CI if we can remove the -Werror=format-security flag, how to do that?

@github-actions

Copy link
Copy Markdown
  • HEAD=new-atime-ci much faster for DT[,.SD] improved in #4501
  • HEAD=new-atime-ci slower P<0.001 for Date-IDate regression in #7213
    Comparison Plot

Generated via commit e1fa82b

Download link for the artifact containing the test results: ↓ atime-results.zip

Task Duration
R setup and installing dependencies 1 minutes and 1 seconds
Installing different package versions 16 minutes and 0 seconds
Running and plotting the test cases 5 minutes and 12 seconds

GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
repo_token: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: Anirban166/Autocomment-atime-results@v1.4.3 No newline at end of file

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIUC this is designed to supplant the old action which can't be updated? Is there anything stopping us from forking it instead (or, if the current PR is intended as such a fork, could we at least host it in a dedicated repo under Rdatatable or maybe under your tdhock?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

atime Requests related to adding/improving/monitoring performance regression tests via atime.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants