Skip to content

Test only oldest and newest supported polars versions in PR CI - #22939

Merged
rapids-bot[bot] merged 8 commits into
NVIDIA:mainfrom
Matt711:polars-compat-endpoint-testing
Jun 23, 2026
Merged

Test only oldest and newest supported polars versions in PR CI#22939
rapids-bot[bot] merged 8 commits into
NVIDIA:mainfrom
Matt711:polars-compat-endpoint-testing

Conversation

@Matt711

@Matt711 Matt711 commented Jun 22, 2026

Copy link
Copy Markdown
Member

Description

The polars compat test job runs the cudf-polars test suite against every
supported polars version, which helps make it one of the longest running CI jobs.

Since regressions are most likely to appear at the boundaries of the support
matrix, restrict PR CI to only the oldest and newest supported versions.
The middle versions are retained in nightly CI via test.yaml, which continues
to run the full matrix.

The script accepts a POLARS_VERSIONS=endpoints environment variable to
select this mode, so the full matrix can still be run locally or in nightlies
without any script changes — useful when updating polars version pins to
verify the right version guards are in place.

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

Nightly CI continues to test all versions via test.yaml.
Set POLARS_VERSIONS=endpoints locally or in test.yaml to run the full matrix.
@Matt711
Matt711 requested a review from a team as a code owner June 22, 2026 19:07
@Matt711
Matt711 requested a review from gforsyth June 22, 2026 19:07
@Matt711 Matt711 added improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels Jun 22, 2026
@coderabbitai

coderabbitai Bot commented Jun 22, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The PR adds POLARS_VERSIONS=endpoints as a job-level environment variable in the PR workflow for the wheel-tests-cudf-polars job, and implements a corresponding conditional block in ci/test_wheel_cudf_polars.sh that, when POLARS_VERSIONS equals endpoints, truncates the VERSIONS array to only its first and last elements. A CI trigger comment is added to python/cudf_polars/cudf_polars/__init__.py to force workflow re-evaluation. SPDX copyright headers are updated in the modified files.

Changes

Polars version endpoint filtering and CI trigger

Layer / File(s) Summary
Endpoint version filtering in workflow, test script, and CI trigger
.github/workflows/pr.yaml, ci/test_wheel_cudf_polars.sh, python/cudf_polars/cudf_polars/__init__.py
The PR workflow sets POLARS_VERSIONS=endpoints for the wheel-tests-cudf-polars job; the test script checks this variable and truncates VERSIONS to its first and last elements before running the per-version test loop. A CI trigger comment is added to force workflow re-evaluation.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

  • rapidsai/cudf#22189: Both PRs modify ci/test_wheel_cudf_polars.sh's Polars compatibility version selection logic—this PR conditionally narrows the computed versions via POLARS_VERSIONS=endpoints, while the retrieved PR changes the source to come from dependencies.yaml.
  • rapidsai/cudf#22467: Both PRs modify the wheel-tests-cudf-polars CI path through ci/test_wheel_cudf_polars.sh, affecting how wheel tests are executed in PR workflows.

Suggested reviewers

  • bdice
  • jameslamb
  • TomAugspurger
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: restricting PR CI testing to only the oldest and newest Polars versions instead of the full matrix.
Description check ✅ Passed The description is directly related to the changeset, explaining the rationale for testing only endpoint versions and how the environment variable enables the feature.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@ci/test_wheel_cudf_polars.sh`:
- Around line 24-28: Add validation in the conditional block where
POLARS_VERSIONS is checked for "endpoints" to ensure the VERSIONS array contains
at least two elements before attempting to access ${VERSIONS[0]} and
${VERSIONS[-1]}. If the array has fewer than two elements, the script should
exit with a meaningful error message that explains the issue (such as "VERSIONS
array must contain at least 2 elements for endpoints comparison"), rather than
silently proceeding with potentially incorrect behavior or unclear failure
messages.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: e4a96843-060d-43ca-a080-377723d24108

📥 Commits

Reviewing files that changed from the base of the PR and between 18e8ccd and d20d472.

📒 Files selected for processing (2)
  • .github/workflows/pr.yaml
  • ci/test_wheel_cudf_polars.sh

Comment thread ci/test_wheel_cudf_polars.sh
Comment thread ci/test_wheel_cudf_polars.sh
Comment thread ci/test_wheel_cudf_polars.sh
Comment thread .github/workflows/pr.yaml Outdated
build_type: pull-request
container-options: "--cap-add CAP_SYS_PTRACE --shm-size=8g --ulimit=nofile=1000000:1000000"
script: "ci/test_wheel_cudf_polars.sh"
env: "POLARS_VERSIONS=endpoints"

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.

Suggested change
env: "POLARS_VERSIONS=endpoints"
env: "POLARS_VERSIONS=endpoints"

This needs to be at the same level as with, not inside of it

@Matt711
Matt711 force-pushed the polars-compat-endpoint-testing branch from d20d472 to f0afdfd Compare June 22, 2026 23:35
@Matt711
Matt711 requested a review from a team as a code owner June 22, 2026 23:35
@Matt711
Matt711 requested a review from pentschev June 22, 2026 23:35
@github-actions github-actions Bot added Python Affects Python cuDF API. cudf-polars Issues specific to cudf-polars labels Jun 22, 2026
@GPUtester GPUtester moved this to In Progress in cuDF Python Jun 22, 2026
Comment thread python/cudf_polars/cudf_polars/__init__.py Outdated
@Matt711
Matt711 force-pushed the polars-compat-endpoint-testing branch from ae1d669 to 46c8567 Compare June 23, 2026 12:34
@Matt711
Matt711 requested review from gforsyth and removed request for pentschev June 23, 2026 13:29
@Matt711

Matt711 commented Jun 23, 2026

Copy link
Copy Markdown
Member Author

/merge

@rapids-bot
rapids-bot Bot merged commit 646b3a3 into NVIDIA:main Jun 23, 2026
137 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Done in cuDF Python Jun 23, 2026
@Matt711
Matt711 deleted the polars-compat-endpoint-testing branch June 23, 2026 15:41
mhaseeb123 pushed a commit to mhaseeb123/cudf that referenced this pull request Jun 24, 2026
…A#22939)

The polars compat test job runs the cudf-polars test suite against every
supported polars version, which helps make it one of the longest running CI jobs.

Since regressions are most likely to appear at the boundaries of the support
matrix, restrict PR CI to only the oldest and newest supported versions.
The middle versions are retained in nightly CI via test.yaml, which continues
to run the full matrix.

The script accepts a `POLARS_VERSIONS=endpoints` environment variable to
select this mode, so the full matrix can still be run locally or in nightlies
without any script changes — useful when updating polars version pins to
verify the right version guards are in place.

Authors:
  - Matthew Murray (https://github.com/Matt711)

Approvers:
  - Gil Forsyth (https://github.com/gforsyth)
  - Mads R. B. Kristensen (https://github.com/madsbk)

URL: NVIDIA#22939
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cudf-polars Issues specific to cudf-polars improvement Improvement / enhancement to an existing function non-breaking Non-breaking change Python Affects Python cuDF API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants