Skip to content

THRIFT-5564: ci: Add Python to cross-test matrix#3

Open
greggdonovan wants to merge 1 commit intomasterfrom
python_cross_test
Open

THRIFT-5564: ci: Add Python to cross-test matrix#3
greggdonovan wants to merge 1 commit intomasterfrom
python_cross_test

Conversation

@greggdonovan
Copy link
Owner

@greggdonovan greggdonovan commented Feb 1, 2026

Summary

Add Python (py) to the cross-language test matrix. Python was never included in the GitHub Actions cross-test despite being part of the original migration plan (THRIFT-5564). Dropped the separate py3 branch, as we only support python 3 now. Hopefully we can remove some of these known failures in future PRs.

Related issues:

  • THRIFT-5564: Migrate to GitHub Actions and replace Travis and Appveyor
  • THRIFT-5537: Drop support for end-of-life python versions (including python 2)

Changes

  1. Add Python to cross-test matrix

    • Add precross step to lib-python job (for Python 3.12)
    • Upload Python precross artifacts (lib, gen-py, test scripts)
    • Download Python artifacts in cross-test job
    • Add 'py' to server_lang and client_lang matrix
    • Install Python test dependencies in cross-test job
  2. Add 582 known failures based on actual CI results:

    • cpp-py: 54 SSL failures
    • go-py: 18 SSL failures
    • java-py: 72 SSL failures
    • py-cpp: 162 failures (protocol incompatibilities)
    • py-go: 48 failures (protocol incompatibilities)
    • py-java: 171 failures (protocol incompatibilities)
    • py-kotlin: 5 SSL failures
    • py-py: 72 SSL failures
    • py-rs: 40 failures (protocol incompatibilities)
  3. Remove 279 stale py3 entries - The py3 test suite was removed and these entries were never validated in GitHub Actions CI.

Test plan

  • CI cross-tests pass with known failures skipped
  • All Python cross-test combinations verified

@greptile-apps
Copy link

greptile-apps bot commented Feb 1, 2026

Greptile Overview

Greptile Summary

This PR integrates Python (py) into the GitHub Actions cross-language test matrix by adding precross artifact generation, uploading Python test artifacts from the lib-python job (Python 3.12 only), downloading them in the cross-test job, and adding py to both server and client language matrices.

Key changes:

  • Adds make precross step to lib-python job for Python 3.12
  • Uploads Python artifacts: compiled library (lib/py/build/lib.*), generated code (test/py/gen-py), and test scripts
  • Downloads Python artifacts in cross-test job and sets executable permissions
  • Adds Python test dependencies (tornado, twisted, zope.interface) to cross-test job
  • Adds py as both a server and client language in the cross-test matrix
  • Pins Python version to 3.12 in cross-test job (was "3.x")

The implementation follows the same pattern used by other languages (go, rs, cpp, java, kotlin) in the workflow.

Confidence Score: 4/5

  • Safe to merge with minimal risk - follows established patterns
  • The changes follow the exact pattern used by other languages (go, rs, cpp) already in the cross-test matrix. The artifact paths align with the Python Makefile structure and test configuration. Dependencies match those in lib-python job (minus linting tools). The only uncertainty is whether all Python cross-tests will pass, as noted in the test plan.
  • No files require special attention - the workflow configuration is straightforward

Important Files Changed

Filename Overview
.github/workflows/build.yml Added Python to cross-test matrix with precross artifact uploads, downloads, and dependency installation

Sequence Diagram

sequenceDiagram
    participant LPJ as lib-python Job (3.12)
    participant Artifacts as GitHub Artifacts
    participant CTJ as cross-test Job
    participant TestRunner as test.py

    Note over LPJ: Build & Test Python Library
    LPJ->>LPJ: make -C lib/py
    LPJ->>LPJ: make -C lib/py install
    LPJ->>LPJ: make -C lib/py check
    LPJ->>LPJ: make -C test/py check
    
    Note over LPJ: Generate Cross-Test Artifacts
    LPJ->>LPJ: make -C test/py precross
    LPJ->>Artifacts: Upload py-precross artifact
    Note right of Artifacts: lib/py/build/lib.*<br/>test/py/gen-py<br/>test/py/*.py scripts

    Note over CTJ: Prepare Cross-Test Environment
    CTJ->>CTJ: Setup Python 3.12
    CTJ->>CTJ: pip install dependencies
    CTJ->>CTJ: Setup Java 8
    Artifacts->>CTJ: Download java-precross
    Artifacts->>CTJ: Download kotlin-precross
    Artifacts->>CTJ: Download rs-precross
    Artifacts->>CTJ: Download go-precross
    Artifacts->>CTJ: Download cpp-precross
    Artifacts->>CTJ: Download py-precross
    CTJ->>CTJ: chmod a+x scripts & binaries

    Note over CTJ,TestRunner: Run Cross-Language Tests
    CTJ->>TestRunner: python test/test.py<br/>--server {lang}<br/>--client py
    TestRunner->>TestRunner: Execute py client tests
    CTJ->>TestRunner: python test/test.py<br/>--server py<br/>--client {lang}
    TestRunner->>TestRunner: Execute py server tests
Loading

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

1 file reviewed, no comments

Edit Code Review Agent Settings | Greptile

@greggdonovan greggdonovan changed the title ci: Add Python to cross-test matrix THRIFT-5564: ci: Add Python to cross-test matrix Feb 1, 2026
Add Python (py) to the cross-language test matrix. Python was never
included in the GitHub Actions cross-test despite being part of the
original migration plan.

Changes:
- Add precross step to lib-python job (for Python 3.12)
- Upload Python precross artifacts (lib, gen-py, test scripts)
- Download Python artifacts in cross-test job
- Add 'py' to server_lang and client_lang matrix
- Install Python test dependencies in cross-test job
- Add 582 known failures based on actual CI results
- Remove 279 stale py3 entries (never validated in GitHub Actions)

Known failure categories added:
- cpp-py: 54 SSL failures
- go-py: 18 SSL failures
- java-py: 72 SSL failures
- py-cpp: 162 protocol incompatibilities
- py-go: 48 protocol incompatibilities
- py-java: 171 protocol incompatibilities
- py-kotlin: 5 SSL failures
- py-py: 72 SSL failures
- py-rs: 40 protocol incompatibilities
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.

1 participant