Skip to content

GH-50298: [CI][R] Update ubuntu-clang CI job to use clang 22 to match CRAN - #50299

Merged
thisisnic merged 2 commits into
apache:mainfrom
thisisnic:GH-50298-clang22
Sep 6, 2026
Merged

thisisnic merged 2 commits into
apache:mainfrom
thisisnic:GH-50298-clang22

Conversation

@thisisnic

@thisisnic thisisnic commented Jun 30, 2026

Copy link
Copy Markdown
Member

Rationale for this change

CI clang version outdated, false positive failures against CRAN

What changes are included in this PR?

Update clang manually

Are these changes tested?

Will run CI

Are there any user-facing changes?

No

Copilot AI lite review requested due to automatic review settings June 30, 2026 08:30
@github-actions

Copy link
Copy Markdown

⚠️ GitHub issue #50298 has been automatically assigned in GitHub to PR creator.

@github-actions

Copy link
Copy Markdown

⚠️ GitHub issue #50298 has no components, please add labels for components.

@github-actions github-actions Bot added the awaiting committer review Awaiting committer review label Jun 30, 2026
@thisisnic

Copy link
Copy Markdown
Member Author

Once we're happy with this, we should file an issue on rhub

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Updates the R “as-CRAN” CI workflow to better match CRAN’s current debian-clang toolchain by enabling an optional clang upgrade path for the rhub/ubuntu-clang image.

Changes:

  • Adds a per-matrix flag (r_update_clang) for the ubuntu-clang job to trigger a clang upgrade.
  • Wires R_UPDATE_CLANG through the GitHub workflow → Docker Compose build args → linux-r.dockerfiler_docker_configure.sh.
  • Adds an apt.llvm.org-based installation step intended to install clang 22 inside the R image.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
dev/tasks/r/github.linux.cran.yml Adds matrix flag and env var to enable clang updates for ubuntu-clang.
compose.yaml Passes R_UPDATE_CLANG into the r image build args.
ci/scripts/r_docker_configure.sh Implements the clang 22 installation logic when R_UPDATE_CLANG=true.
ci/docker/linux-r.dockerfile Introduces r_update_clang build arg and propagates it to R_UPDATE_CLANG.

Comment thread ci/scripts/r_docker_configure.sh
@thisisnic

Copy link
Copy Markdown
Member Author

@github-actions crossbow submit test-r-linux-as-cran

@github-actions

Copy link
Copy Markdown

Revision: f846f90

Submitted crossbow builds: ursacomputing/crossbow @ actions-9491b6cbd6

Task Status
test-r-linux-as-cran GitHub Actions

Copilot AI review requested due to automatic review settings August 18, 2026 12:36

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

Comment thread ci/scripts/r_docker_configure.sh
Copilot AI review requested due to automatic review settings August 18, 2026 12:46
@thisisnic

Copy link
Copy Markdown
Member Author

@github-actions crossbow submit test-r-linux-as-cran

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.

Suppressed comments (2)

ci/scripts/r_docker_configure.sh:97

  • The LLVM APT repo is hardcoded to jammy and the GPG key is added to /etc/apt/trusted.gpg.d, which makes this job brittle (if the base image isn’t Ubuntu 22.04) and grants the key global trust. The repo already uses a more robust pattern elsewhere (derive the distro codename and use signed-by=).
  apt-get update -y --allow-releaseinfo-change
  apt-get install -y gnupg
  curl -fsSL https://apt.llvm.org/llvm-snapshot.gpg.key | gpg --dearmor -o /etc/apt/trusted.gpg.d/llvm.gpg
  echo "deb https://apt.llvm.org/jammy/ llvm-toolchain-jammy-22 main" > /etc/apt/sources.list.d/llvm22.list
  apt-get update -y --allow-releaseinfo-change

compose.yaml:1688

  • Adding r_update_clang: ${R_UPDATE_CLANG} introduces a new required env var for docker compose build and will emit a warning / pass an empty build arg when unset. Using a default keeps local/CI runs quieter and ensures ARG r_update_clang=false remains effective.
        r_update_clang: ${R_UPDATE_CLANG}

@github-actions

Copy link
Copy Markdown

Revision: f80c846

Submitted crossbow builds: ursacomputing/crossbow @ actions-1183ed957e

Task Status
test-r-linux-as-cran GitHub Actions

@thisisnic

Copy link
Copy Markdown
Member Author

@github-actions crossbow submit test-r-linux-as-cran

@github-actions

Copy link
Copy Markdown

Revision: f80c846

Submitted crossbow builds: ursacomputing/crossbow @ actions-65528c02b5

Task Status
test-r-linux-as-cran GitHub Actions

@jonkeane jonkeane left a comment

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.

Comment on lines +90 to +91
# The rhub/ubuntu-clang image ships clang-15 but CRAN's debian-clang now uses
# clang 22. Install clang-22 from LLVM's apt repos to match.

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.

Do we need to upstream this to rhub too? Could we link the issue / PR doing that?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@github-actions github-actions Bot added awaiting changes Awaiting changes and removed awaiting committer review Awaiting committer review labels Aug 25, 2026
@thisisnic

thisisnic commented Sep 6, 2026

Copy link
Copy Markdown
Member Author

Is this effectively the same as this line: https://github.com/apache/arrow/pull/50299/changes#diff-dbaf9a10b8e9f991e04ac5206183c2b4dfa9ca0e7977c7c14894952761fb7cd1R36 ?

Both rhub images are Ubuntu-based, but the clang22 image builds with -stdlib=libc++ to mirror fedora-clang, while ubuntu-clang uses libstdc++ to mirror debian-clang. So there's enough different to make it worth keeping them both.

@thisisnic
thisisnic merged commit 399f27c into apache:main Sep 6, 2026
59 of 61 checks passed
@thisisnic thisisnic removed the awaiting changes Awaiting changes label Sep 6, 2026
@github-actions github-actions Bot added the awaiting changes Awaiting changes label Sep 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting changes Awaiting changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants