Skip to content

CASSJAVA-144: Move ASF CI from ci-cassandra Jenkins to GH Action - #2104

Merged
SiyaoIsHiding merged 1 commit into
apache:trunkfrom
SiyaoIsHiding:trunk
Nov 25, 2026
Merged

SiyaoIsHiding merged 1 commit into
apache:trunkfrom
SiyaoIsHiding:trunk

Conversation

@SiyaoIsHiding

Copy link
Copy Markdown
Contributor

Example run:
https://github.com/SiyaoIsHiding/java-driver/actions/runs/40934985232
Largely reusing Node.js driver's GHA. Example user interface on a PR: https://redirect.github.com/apache/cassandra-nodejs-driver/pull/472

Disclose of Generative AI usage.

echo "CCM_UPDATE_PID_DEFAULT_TIMEOUT=120" >> "$GITHUB_ENV"
# "-" tells bin/cassandra not to use jemalloc, skipping its unbounded `find` over the
# library dirs, which can exceed the pid timeout on a cold cache under parallel tests.
echo "CASSANDRA_LIBJEMALLOC=-" >> "$GITHUB_ENV"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This line is prolly the only essential difference from the Node.js driver's GHA. AI found it out this is the reason why sometimes the first integration test likes to fail with cassandra pid not found.
It makes sense to me. I think I will port this change to Node.js driver's GHA, too.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

The CI report scan splits filenames containing spaces and suppresses read errors, allowing jobs to pass despite TCK failures.

3 open issues
What changed in this PR

Migrates the Java driver’s ASF CI from Jenkins to GitHub Actions, with reusable test-environment setup and test-result reporting.

Changes:

  • Adds a Java 17/21 test matrix against Cassandra 3.11, 4.0, 4.1, and 5.0.
  • Adds CCM setup, report uploads, and result publication.
  • Removes Jenkins infrastructure and switches documentation builds to Java 17.
File Description
Jenkinsfile-asf Removes the ASF Jenkins pipeline.
ci/​run-tests.sh Removes the Jenkins test runner.
ci/​install-jdk.sh Removes the legacy JDK installer.
ci/​create-user.sh Removes the container user-setup script.
.github/​workflows/​publish-docs-gp-pages.yml Uses Java 17 for documentation builds.
.github/​workflows/​ci.yml Adds matrix testing and test-result reporting.
.github/​actions/​setup-ccm/​action.yml Prepares CCM, JDKs, certificates, Simulacron, and Cassandra.

Review effort: Balanced

Comment thread .github/workflows/ci.yml Resolved
Comment thread .github/workflows/ci.yml Outdated
Comment on lines +22 to +25
on:
push:
pull_request:
workflow_dispatch: # allow manual trigger from the Actions page

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.

I mean, I guess...

The only thing scheduled builds are going to do for us are pick up variation in the patch version of a given Cassandra major/minor tree. Same is true for ccm, right, and ccm changes even less frequently. I guess I don't mind scheduled builds but it seems like the benefit here would be pretty small.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Added cron.
As for other branches, I think we can get this PR merged first, and we will see whether it works well, then we can talk about migrating other branches from Jenkins to GHA, too.

Comment thread .github/workflows/ci.yml Resolved
using: composite
steps:
# ---- Python for ccm ----
- name: Set up Python 3.15.2

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is another diff from the Node.js driver - installing python 3.9 started to fail on default github action runners because the default one is updated to Ubuntu 26.04, and python 3.9 is EOL.
so, the python version is updated to 3.15, and the below

python -m pip install --upgrade pip setuptools
pip install .

I will update the Node.js driver CI on this changes, too.

Comment thread .github/workflows/ci.yml Resolved
Comment thread .github/actions/setup-ccm/action.yml Resolved
Comment thread .github/workflows/ci.yml Resolved
Comment thread .github/workflows/ci.yml Resolved
Comment thread .github/workflows/ci.yml Resolved
Comment thread .github/workflows/ci.yml Resolved
Comment thread .github/workflows/ci.yml Resolved
Comment thread .github/actions/setup-ccm/action.yml Resolved
Comment thread .github/actions/setup-ccm/action.yml Outdated
Comment on lines +131 to +133
- name: Print environment
shell: bash
run: printenv | sort

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.

This can print sensitive data. Do we need it?

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

The CCM setup clones a nonexistent cassandra-test branch, causing installation to fail and blocking all eight test jobs.

2 open issues
2 resolved since last review

Review effort: Balanced

Comment thread .github/actions/setup-ccm/action.yml Outdated
shell: bash
run: |
python -m pip install --upgrade pip setuptools
git clone --depth 1 --single-branch -b cassandra-test https://github.com/apache/cassandra-ccm.git

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

That's a tag, used by cassandra's dtest.
I think either using trunk or pin a commit of the trunk is fine.

@SiyaoIsHiding

Copy link
Copy Markdown
Contributor Author

I believe I have addressed all your PR comments. I'd appreciate your review again! @adutra

patch by Jane He; reviewed by Alexandre Dutra
@SiyaoIsHiding
SiyaoIsHiding merged commit a97824d into apache:trunk Nov 25, 2026
4 of 8 checks passed
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.

4 participants