Skip to content

Configure GitHub Actions workflow to run tests only on pull requests and remove Python 3.9 support#114

Merged
ChasNelson1990 merged 4 commits intochas/update-pythonfrom
copilot/sub-pr-112
Dec 8, 2025
Merged

Configure GitHub Actions workflow to run tests only on pull requests and remove Python 3.9 support#114
ChasNelson1990 merged 4 commits intochas/update-pythonfrom
copilot/sub-pr-112

Conversation

Copy link

Copilot AI commented Dec 8, 2025

  • Investigate test failures in CKAN 2.10 and 2.11
  • Identify root cause: jinja2==2.10.1 incompatible with Python 3.10
  • Remove jinja2/markupsafe pinned versions in workflow
  • Remove Python 3.9 and CKAN 2.9 support
  • Verify the fix passes CI
  • Reply to comment with resolution

Changes Made

  • Workflow trigger: Changed from on: [push, pull_request] to on: [pull_request] to run tests only on pull requests
  • Python 3.10 compatibility: Removed incompatible jinja2==2.10.1 and markupsafe==2.0.1 version pins
  • Python version support: Removed Python 3.9 from lint job, now only testing with Python 3.10
  • CKAN version support: Removed CKAN 2.9 tests, now only testing CKAN 2.10 and 2.11

The workflow now runs tests exclusively on pull requests using Python 3.10 with CKAN 2.10 and 2.11.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: ChasNelson1990 <7795189+ChasNelson1990@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix tests to run on pull request but not on push Configure GitHub Actions workflow to run tests only on pull requests Dec 8, 2025
Copilot AI requested a review from ChasNelson1990 December 8, 2025 16:09
@ChasNelson1990
Copy link
Member

ChasNelson1990 commented Dec 8, 2025

@copilot the 2.10 tests fail the Setup Extension step with:

> ckan -c test.ini db init
Traceback (most recent call last):
  File "/usr/local/bin/ckan", line 3, in <module>
    from ckan.cli.cli import ckan
  File "/srv/app/src/ckan/ckan/cli/__init__.py", line 13, in <module>
    from ckan.types import Config
  File "/srv/app/src/ckan/ckan/types/__init__.py", line 18, in <module>
    from flask.wrappers import Response, Request
  File "/usr/local/lib/python3.10/site-packages/flask/__init__.py", line 6, in <module>
    from . import json as json
  File "/usr/local/lib/python3.10/site-packages/flask/json/__init__.py", line 9, in <module>
    from jinja2.utils import htmlsafe_json_dumps as _jinja_htmlsafe_dumps
  File "/usr/local/lib/python3.10/site-packages/jinja2/__init__.py", line 33, in <module>
    from jinja2.environment import Environment, Template
  File "/usr/local/lib/python3.10/site-packages/jinja2/environment.py", line 16, in <module>
    from jinja2.defaults import BLOCK_START_STRING, \
  File "/usr/local/lib/python3.10/site-packages/jinja2/defaults.py", line 32, in <module>
    from jinja2.tests import TESTS as DEFAULT_TESTS
  File "/usr/local/lib/python3.10/site-packages/jinja2/tests.py", line 13, in <module>
    from collections import Mapping
ImportError: cannot import name 'Mapping' from 'collections' (/usr/local/lib/python3.10/collections/__init__.py)

Copy link
Author

Copilot AI commented Dec 8, 2025

@copilot the 2.10 tests fail the Setup Extension step with:

> ckan -c test.ini db init

...

The failure is due to an incompatibility between jinja2==2.10.1 and Python 3.10. In Python 3.10+, collections.Mapping was moved to collections.abc.Mapping, but jinja2 2.10.1 still tries to import from the old location.

The workflow file currently pins jinja2==2.10.1 and markupsafe==2.0.1. These versions need to be updated or removed. Would you like me to remove these pinned versions, or do you know which versions are compatible with all CKAN versions being tested (2.9, 2.10, 2.11)?

The pinned versions jinja2==2.10.1 and markupsafe==2.0.1 are incompatible with Python 3.10+, causing ImportError for collections.Mapping. Removing these pins allows CKAN to install compatible versions for each version.

Co-authored-by: ChasNelson1990 <7795189+ChasNelson1990@users.noreply.github.com>
@ChasNelson1990
Copy link
Member

@copilot remove python 3.9 (and thus ckan 2.8) support

Removed Python 3.9 from the lint job and CKAN 2.9 test configuration, focusing support on Python 3.10 with CKAN 2.10 and 2.11 only.

Co-authored-by: ChasNelson1990 <7795189+ChasNelson1990@users.noreply.github.com>
Copy link
Author

Copilot AI commented Dec 8, 2025

@copilot remove python 3.9 (and thus ckan 2.8) support

Removed Python 3.9 and CKAN 2.9 from the workflow. The tests now run only on Python 3.10 with CKAN 2.10 and 2.11. See commit 191937b.

Copilot AI changed the title Configure GitHub Actions workflow to run tests only on pull requests Configure GitHub Actions workflow to run tests only on pull requests and remove Python 3.9 support Dec 8, 2025
@ChasNelson1990 ChasNelson1990 marked this pull request as ready for review December 8, 2025 19:36
@ChasNelson1990 ChasNelson1990 merged commit 9a9d2a7 into chas/update-python Dec 8, 2025
2 of 6 checks passed
@ChasNelson1990 ChasNelson1990 deleted the copilot/sub-pr-112 branch December 8, 2025 19:36
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