Skip to content

[NOGIL] Wheel creation and verification jobs - #2352

Open
Ojasva Jain (ojasvajain) wants to merge 6 commits into
dev_thread_free_supportfrom
dev_thread_free_wheels_ci
Open

[NOGIL] Wheel creation and verification jobs#2352
Ojasva Jain (ojasvajain) wants to merge 6 commits into
dev_thread_free_supportfrom
dev_thread_free_wheels_ci

Conversation

@ojasvajain

@ojasvajain Ojasva Jain (ojasvajain) commented Sep 8, 2026

Copy link
Copy Markdown
Member
  1. Modified existing wheel creation jobs to also create wheels for Python 3.14t.
  2. Defined free threaded wheel verification jobs for all supported platforms. Smoke testing, done as part of verification jobs, executes all unit test cases.
  3. Some unit tests were found to be failing/flaky on Windows. Those have also been fixed.

Successful job run with wheel verification passing: https://semaphore.ci.confluent.io/workflows/680a3b0c-18db-4c97-a66a-499158b0e9ad?pipeline_id=8b6d3812-11d5-4a63-abca-121b2a77a14b


Checklist

  • Contains customer facing changes? Including API/behavior changes
  • Did you add sufficient unit test and/or integration test coverage for this PR?
    • If not, please explain why it is not required

References

JIRA:

Test & Review

Open questions / Follow-ups

@confluent-cla-assistant

Copy link
Copy Markdown

🎉 All Contributor License Agreements have been signed. Ready to merge.
Please push an empty commit if you would like to re-run the checks to verify CLA status for all contributors.

@sonarqube-confluent

Copy link
Copy Markdown

Quality Gate failed Quality Gate failed

Failed conditions
6.1% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube

@k-raina Kaushik Raina (k-raina) 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.

Thanks for PR! Left couple of comments

# framework gets installed and the cpython314t interpreter is
# never created.
py_version_digits = cpython_tag[2:-1]
choicechanges_xml = os.path.join(script_dir, f"free-threaded-enable-{py_version_digits} .xml")

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.

Suggested change
choicechanges_xml = os.path.join(script_dir, f"free-threaded-enable-{py_version_digits} .xml")
choicechanges_xml = os.path.join(script_dir, f"free-threaded-enable-{py_version_digits}.xml")

install_args = f"-applyChoiceChangesXML {choicechanges_xml} "
os.system(f"sudo installer -pkg {tmp_pkg_file_name} {install_args}-target /")

os.system(install_command)

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.

Is this command redundant?

set CIBW_BUILD=cp38-%BW_ARCH% cp39-%BW_ARCH% cp310-%BW_ARCH% cp311-%BW_ARCH% cp312-%BW_ARCH% cp313-%BW_ARCH% cp314-%BW_ARCH%
set CIBW_BEFORE_BUILD=python -m pip install delvewheel==1.1.4
set CIBW_BUILD=cp38-%BW_ARCH% cp39-%BW_ARCH% cp310-%BW_ARCH% cp311-%BW_ARCH% cp312-%BW_ARCH% cp313-%BW_ARCH% cp314-%BW_ARCH% cp314t-%BW_ARCH%
set CIBW_BEFORE_BUILD=python -m pip install delvewheel==1.10.0

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.

Why is this change needed?

"$PYTHON" -c "import sys, sysconfig; assert sysconfig.get_config_var('Py_GIL_DISABLED'), sys.executable + ' is not a free-threaded build'"

echo "# Importing must not re-enable the GIL"
"$PYTHON" -W error::RuntimeWarning -c "import sys, confluent_kafka; assert not sys._is_gil_enabled(), 'import re-enabled the GIL'"

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.

-W error::RuntimeWarning Will it check all warnings or just GIL warning?

Comment thread .semaphore/semaphore.yml
- uv venv _venv314t --python 3.14t && source _venv314t/bin/activate
- uv pip install -r requirements/requirements-tests-install-nogil.txt
- artifact pull workflow artifacts
- cd artifacts && ls *.tgz |xargs -n1 tar -xvf && cd ..

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.

Should we fail loudly if there are no artifacts?

Comment thread tests/test_Admin.py
a.elect_leaders(correct_election_type, [correct_partitions]).result(timeout=1)


def _poll_until_callback_raises(admin, timeout_s=5.0, step_s=0.2, ignore=()):

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.

Should we move this to helper? Currently used in test_Consumer.py also

Comment thread .semaphore/semaphore.yml
- export ARCH=x64
# sem-version only provides a pip to bootstrap uv; the wheel runs in the 3.14t venv uv creates.
- sem-version python 3.11
- pip install uv

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.

Should we move common steps to helper script to reduce future maintenance?

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants