Skip to content

ci: bump CI to Python 3.11 and refresh deprecated GitHub Actions#788

Open
SarthakB11 wants to merge 3 commits into
hyperledger-cello:mainfrom
SarthakB11:ci/bump-python-3.11-actions
Open

ci: bump CI to Python 3.11 and refresh deprecated GitHub Actions#788
SarthakB11 wants to merge 3 commits into
hyperledger-cello:mainfrom
SarthakB11:ci/bump-python-3.11-actions

Conversation

@SarthakB11

Copy link
Copy Markdown

Filing in parallel with the new issue #787. Happy to adjust scope after maintainer review.

Python 3.8 reached EOL on 2024-10-07. actions/checkout@v3, actions/setup-python@v4, and actions/setup-node@v3 still pull the deprecated Node 16 runner that GitHub started flagging across all repos.

Changes:

  • .github/workflows/lint-check.yml: actions/checkout@v3 -> @v4, actions/setup-python@v4 -> @v5 with python-version: "3.11", actions/setup-node@v3 -> @v4.
  • .github/workflows/integration-tests.yml: actions/checkout@v3 -> @v4.
  • src/api-engine/tox.ini: envlist and [gh-actions] map updated from py38 to py311.

3.11 is the safest middle of Django 4.2 LTS's supported range (3.10/3.11/3.12). requirements.txt dependencies (Django 4.2.16, djangorestframework 3.15.2, cryptography 45.0.6) all support 3.11.

pygraphviz==1.5 in requirements is unrelated here; the lint job only installs flake8, not the project, so it does not affect this workflow.

Closes #787.

Python 3.8 reached EOL on 2024-10-07. actions/checkout@v3,
actions/setup-python@v4, and actions/setup-node@v3 still pull the
deprecated Node 16 runner that GitHub started flagging across all repos.

- .github/workflows/lint-check.yml: checkout@v3 -> @v4, setup-python@v4
  -> @v5 with python-version 3.11, setup-node@v3 -> @v4.
- .github/workflows/integration-tests.yml: checkout@v3 -> @v4.
- src/api-engine/tox.ini: envlist and [gh-actions] map updated from py38
  to py311.

Django 4.2 LTS supports 3.10/3.11/3.12; 3.11 sits in the middle of the
supported range. Existing requirements.txt deps (Django 4.2.16, DRF
3.15.2, cryptography 45.0.6) all support 3.11.

Closes hyperledger-cello#787

Signed-off-by: SarthakB11 <sarthak.bhardwaj21b@iiitg.ac.in>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Updates the repository CI configuration to run linting/tox under Python 3.11 and to use current major versions of commonly used GitHub Actions, avoiding deprecated Node 16-based action runtimes.

Changes:

  • Bumped actions/checkout to v4 in lint and integration test workflows.
  • Bumped actions/setup-python to v5 and updated the lint job to use Python 3.11.
  • Updated src/api-engine/tox.ini to run py311 (and map GitHub Actions’ Python 3.11 to py311 via tox-gh-actions).

Reviewed changes

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

File Description
.github/workflows/lint-check.yml Updates checkout/setup actions and moves lint CI to Python 3.11.
.github/workflows/integration-tests.yml Updates checkout action to the current major version.
src/api-engine/tox.ini Switches tox envlist and GH Actions mapping from py38 to py311.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@YoungHypo YoungHypo enabled auto-merge (squash) May 22, 2026 23:17
@YoungHypo YoungHypo disabled auto-merge May 22, 2026 23:17
YoungHypo
YoungHypo previously approved these changes May 22, 2026

@YoungHypo YoungHypo 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.

LGTM. One follow-up: the runtime image is still pinned to Python 3.8 in the api-engine Dockerfile. We should upgrade that as well

Follow-up to @YoungHypo review on hyperledger-cello#788: align the api-engine runtime
image with the lint/test workflow now running on Python 3.11. The
Dockerfile is the only remaining 3.8 pin in src/api-engine after the
CI bump.

Signed-off-by: SarthakB11 <sarthak.bhardwaj21b@iiitg.ac.in>
@SarthakB11

SarthakB11 commented May 23, 2026

Copy link
Copy Markdown
Author

Done in 5bd34b8, bumped src/api-engine/Dockerfile to python:3.11 to match the workflow. src/agents/hyperledger-fabric/Dockerfile is on python:3.13, which I left alone (different runtime, separate concern); happy to align that in a follow-up if you prefer.

This reverts commit 5bd34b8.

Signed-off-by: SarthakB11 <sarthak.bhardwaj21b@iiitg.ac.in>
@SarthakB11

Copy link
Copy Markdown
Author

Reverted the Dockerfile bump in f6bfc34. Moving the api-engine runtime to python:3.11 breaks the image build: the pinned psycopg2-binary==2.8.4 and pygraphviz==1.5 do not compile against the 3.11 C API (Py_TYPE is no longer an lvalue, so psycopg2 needs >=2.9; pygraphviz needs a newer release too).

That is a larger dependency-upgrade change than this PR should carry, so I have scoped this PR back to the CI workflow + tox bump (which is what your approval covered). The lint job runs flake8 under 3.11 and does not build the project, so it stays green. Happy to open a separate PR upgrading the api-engine runtime image once the psycopg2/pygraphviz pins are moved forward and tested.

@SarthakB11

Copy link
Copy Markdown
Author

@YoungHypo when you have a moment, this is ready for another look. The Dockerfile bump is reverted (the runtime image needs psycopg2 and pygraphviz pin upgrades before 3.11 can build cleanly, so that's better as a separate PR). The CI workflow + tox bump is what remains. CI runs are pending workflow approval on the revert commit.

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.

ci: bump CI to Python 3.11 and refresh deprecated action versions

3 participants