Skip to content

Conversation

@askb
Copy link
Contributor

@askb askb commented Oct 2, 2025

Problem

The RTD validation workflows fail when running lftools commands with:

TypeError: deprecated() got an unexpected keyword argument 'name'
  File "/usr/lib/python3/dist-packages/OpenSSL/crypto.py", line 3263

Root Cause

The workflows install cryptography<3.4 (version 3.3.2 from 2021), which is incompatible with the system-installed pyOpenSSL package on modern Ubuntu runners (24.04/Python 3.12).

Solution

Remove the outdated cryptography<3.4 constraint and let pip resolve compatible versions automatically.

Changes:

  • gerrit-compose-required-rtdv3-verify.yaml: Remove cryptography pin
  • gerrit-compose-required-rtdv3-merge.yaml: Remove cryptography pin
- pip install lftools 'niet~=1.4.2' 'cryptography<3.4' yq tox
+ pip install lftools 'niet~=1.4.2' yq tox

Why this approach?

Option 1 (Implemented): Remove the pin entirely

  • ✅ Let pip resolve compatible versions automatically
  • ✅ Less maintenance overhead
  • ✅ Avoids system package conflicts
  • ✅ Modern cryptography versions (current: 46.x) are stable

Option 3 (Not chosen): Add pyOpenSSL upgrade

  • ❌ System-wide conflicts on Ubuntu runners
  • ❌ More complexity managing two packages
  • ❌ Future brittleness keeping versions in sync

Impact

  • ✅ Documentation builds successfully (unchanged)
  • ✅ Tox validation passes (unchanged)
  • The 'Running rtdv3' step now completes successfully

Testing

  • ✅ YAML syntax validated (yamllint)
  • ✅ GitHub Actions validated (actionlint)
  • ✅ All pre-commit hooks passed

Environment

  • Ubuntu runner: 24.04
  • Python: 3.12
  • Affected workflows: gerrit-compose-required-rtdv3-{verify,merge}.yaml

Fixes the lftools/RTD deployment step failures in projects using these reusable workflows.

Signed-off-by: Anil Belur [email protected]

@github-actions github-actions bot added the bug Something isn't working label Oct 2, 2025
Remove 'cryptography<3.4' constraint from rtdv3 workflows to fix
lftools failures caused by incompatibility between old cryptography
versions and system pyOpenSSL packages.

The outdated pin (cryptography 3.3.2 from 2021) causes TypeError
when lftools attempts to use OpenSSL functionality:
  TypeError: deprecated() got unexpected keyword argument 'name'

By removing the constraint, pip will resolve compatible versions
of cryptography and its dependencies (including pyOpenSSL) that
work together correctly on modern Ubuntu runners (24.04/Python 3.12).

This fix allows the 'Running rtdv3' step to complete successfully
while maintaining compatibility with lftools and other dependencies.

Changes:
- gerrit-compose-required-rtdv3-verify.yaml: Remove cryptography pin
- gerrit-compose-required-rtdv3-merge.yaml: Remove cryptography pin

Signed-off-by: Anil Belur <[email protected]>
@askb askb force-pushed the fix-rtdv3-cryptography-pin branch from a7b0eaf to 33dc379 Compare October 2, 2025 23:09
@askb askb requested a review from Copilot October 2, 2025 23:09
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes RTD workflow failures by removing an outdated cryptography version pin that was causing compatibility issues with modern Ubuntu runners.

  • Remove cryptography<3.4 constraint from pip install commands
  • Allow pip to automatically resolve compatible cryptography versions
  • Fix TypeError in lftools commands caused by version incompatibility

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
.github/workflows/gerrit-compose-required-rtdv3-verify.yaml Remove cryptography version pin from pip install command
.github/workflows/gerrit-compose-required-rtdv3-merge.yaml Remove cryptography version pin from pip install command

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@askb askb merged commit 4231fda into lfit:main Oct 2, 2025
8 checks passed
@askb askb deleted the fix-rtdv3-cryptography-pin branch October 2, 2025 23:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants