Skip to content

Comments

Fix conftest dependency breaking nightly wheel build#3078

Merged
kevinjqliu merged 7 commits intoapache:mainfrom
kevinjqliu:kevinjqliu/fix-nightly-wheel
Feb 22, 2026
Merged

Fix conftest dependency breaking nightly wheel build#3078
kevinjqliu merged 7 commits intoapache:mainfrom
kevinjqliu:kevinjqliu/fix-nightly-wheel

Conversation

@kevinjqliu
Copy link
Contributor

@kevinjqliu kevinjqliu commented Feb 22, 2026

Rationale for this change

Context: #2982 (comment)

Adding imports to conftest.py may break the nightly build pipeline. (For example BigQuery in #2982).
This is because nightly wheel build tests run in a narrower dependency set (--only-group dev), so new imports could cause test collection to fail.

This PR inlines the imports in conftest.py and also include a smoke test in CI to catch this problem going forward

Are these changes tested?

yes, nightly build works again https://github.com/apache/iceberg-python/actions/runs/22285169782

Are there any user-facing changes?

Comment on lines +205 to +225
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: '3.12'
- name: Install UV
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
# Why this exists:
# Catch import-time regressions (e.g., global conftest optional deps)
# in the same dev-only environment used by cibuildwheel wheel tests.
# Keep this in sync with wheel build test setup in
# .github/workflows/pypi-build-artifacts.yml:
# CIBW_BEFORE_TEST: uv sync --directory {project} --only-group dev --no-install-project
# CIBW_TEST_COMMAND: uv run --directory {project} pytest tests/avro/test_decoder.py
- name: Mirror wheel CIBW_BEFORE_TEST
run: uv sync --directory . --only-group dev --no-install-project
- name: Mirror wheel CIBW_TEST_COMMAND
run: uv run --directory . pytest tests/avro/test_decoder.py

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

will fix this separately

Copy link
Contributor

@Fokko Fokko left a comment

Choose a reason for hiding this comment

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

Thanks @kevinjqliu

@kevinjqliu kevinjqliu merged commit cbea824 into apache:main Feb 22, 2026
14 checks passed
@kevinjqliu kevinjqliu deleted the kevinjqliu/fix-nightly-wheel branch February 22, 2026 22:28
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.

2 participants