Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/test-integrations-tasks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@
with:
enable-cache: false
- name: Install Java
uses: actions/setup-java@de7274f081f381c8f8158605e0321c36c376e2e6 # v6
uses: actions/setup-java@b843ebf9b913146b38da2eaa7aeddf76074ae1ad # v6
with:
distribution: 'temurin'
java-version: '21'
java-version: '25'

Check warning on line 47 in .github/workflows/test-integrations-tasks.yml

View check run for this annotation

@sentry/warden / warden: code-review

Java 25 may break Spark integration test JVMs

The tasks workflow installs Java 25, and its Spark test step runs the pinned PySpark 3.5.9 and 4.2.0 environments without a `JAVA_HOME` override. Java 25 is outside the documented JDK compatibility of those Spark lines, so their JVM startup or tests may fail in CI. Please use a documented JDK version or confirm these environments run successfully on Java 25.

Check warning on line 47 in .github/workflows/test-integrations-tasks.yml

View check run for this annotation

@sentry/warden / warden: code-review

Generated workflow Java 25 is out of sync with template

This generated workflow now pins `java-version: '25'`, but `scripts/split_tox_gh_actions/templates/test_group.jinja` still has `'21'`; update the template (or regenerate from it) so the next `split_tox_gh_actions.py` run does not revert this.

Check warning on line 47 in .github/workflows/test-integrations-tasks.yml

View check run for this annotation

@sentry/warden / warden: find-bugs

Java 25 may break active Spark integration tests

The Tasks workflow installs Temurin 25, but the active PySpark 3.5.9 and 4.2.0 test environments do not override that Java version. Since Java 25 is outside the documented JDK support for these Spark lines, their JVM-based integration tests may fail in CI. Use a documented Java version for these tests or confirm compatibility with Java 25.

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.

Spark 3.5.9 integration tests inherit Java 25

The Tasks workflow installs Temurin 25, but the tox JAVA_HOME override only matches spark-v3.0.3 and spark-v3.5.6, not the configured spark-v3.5.9 environments. Those Spark 3.5.9 tests therefore run with Java 25, which is outside that Spark line’s supported Java versions and can prevent the Spark context from starting. Keep the job on a supported JDK or add a matching override.

Evidence
  • test-integrations-tasks.yml installs Temurin 25 before running the py${{ matrix.python-version }}-spark tox environments.
  • tox.ini configures Spark 3.5.9 environments for Python 3.8, 3.10, and 3.11, but its Java override matches spark-v{3.0.3,3.5.6} and does not apply to spark-v3.5.9.
  • tests/integrations/spark/test_spark.py::create_spark_context starts a real SparkContext, so the inherited Java runtime is used by the integration tests.

Identified by Warden · code-review · 4CC-FHB

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Java 25 breaks Spark tests

High Severity

The Tasks workflow now installs Java 25, but Spark tests still start a real SparkContext against pyspark 3.0.3 and 3.5.9. Those releases do not support Java 25 and fail during context startup because Subject.getSubject is unsupported and SecurityManager is disabled. The Tasks job will fail and block the required check.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 0a04245. Configure here.

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.

Generated workflow Java 25 is out of sync with template

This generated workflow now pins java-version: '25', but scripts/split_tox_gh_actions/templates/test_group.jinja still has '21'; update the template (or regenerate from it) so the next split_tox_gh_actions.py run does not revert this.

Evidence
  • File header says do not edit; it is produced by scripts/split_tox_gh_actions/split_tox_gh_actions.py.
  • Hunk sets java-version: '25' in .github/workflows/test-integrations-tasks.yml.
  • Source template scripts/split_tox_gh_actions/templates/test_group.jinja still has java-version: '21' under {% if needs_java %}.
  • Re-running the generator will rewrite this workflow from the template and drop the 25 pin.
Also found at 1 additional location
  • scripts/split_tox_gh_actions/templates/test_group.jinja:91-91

Identified by Warden · code-review · DRT-VBZ

- name: Mark workspace safe for git (3.6/3.7 container)
# needed to make git rev-parse work in the containers
# subprocesses (e.g. sentry_sdk.utils.get_git_revision) can run git.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ jobs:
uv run coverage combine .coverage-sentry-*
uv run coverage xml
- name: Report coverage and test results
uses: getsentry/coverage-action@88418cdae07a8bac2beaec1550bcafff9ec55c8b # 0.4.3
uses: getsentry/coverage-action@b3db4e382bd9859c913a96093a3d369b67f59177 # 0.4.4
with:
token: ${{ secrets.GITHUB_TOKEN }}
files: coverage.xml
Expand Down
2 changes: 1 addition & 1 deletion scripts/split_tox_gh_actions/templates/test_group.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,10 @@

{% if needs_java %}
- name: Install Java
uses: actions/setup-java@de7274f081f381c8f8158605e0321c36c376e2e6 # v6
uses: actions/setup-java@b843ebf9b913146b38da2eaa7aeddf76074ae1ad # v6
with:
distribution: 'temurin'
java-version: '21'

Check warning on line 91 in scripts/split_tox_gh_actions/templates/test_group.jinja

View check run for this annotation

@sentry/warden / warden: code-review

[DRT-VBZ] Generated workflow Java 25 is out of sync with template (additional location)

This generated workflow now pins `java-version: '25'`, but `scripts/split_tox_gh_actions/templates/test_group.jinja` still has `'21'`; update the template (or regenerate from it) so the next `split_tox_gh_actions.py` run does not revert this.
{% endif %}

- name: Mark workspace safe for git (3.6/3.7 container)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:
uv run coverage combine .coverage-sentry-*
uv run coverage xml
- name: Report coverage and test results
uses: getsentry/coverage-action@88418cdae07a8bac2beaec1550bcafff9ec55c8b # 0.4.3
uses: getsentry/coverage-action@b3db4e382bd9859c913a96093a3d369b67f59177 # 0.4.4
with:
token: {% raw %}${{ secrets.GITHUB_TOKEN }}{% endraw %}
files: coverage.xml
Expand Down
Loading