Skip to content

feat: Add integration test workflow + Python 3.12 setuptools fix#611

Merged
dahagag merged 6 commits intoascoderu:masterfrom
dahagag:feature/add-integration-test-trigger-rebased
Feb 8, 2026
Merged

feat: Add integration test workflow + Python 3.12 setuptools fix#611
dahagag merged 6 commits intoascoderu:masterfrom
dahagag:feature/add-integration-test-trigger-rebased

Conversation

@dahagag
Copy link
Member

@dahagag dahagag commented Feb 8, 2026

Changes

1. Integration Test Trigger Workflow

  • Adds GitHub Actions workflow to trigger IIAB integration tests
  • Uses label test-integration on PRs to trigger tests in iiab-lokole-tests repo
  • Sends PR details (number, ref, sha, repo) to test infrastructure

2. Python 3.12+ Compatibility Fix

  • Adds setuptools>=65.5.0 to requirements-webapp.txt
  • Problem: Python 3.12+ no longer includes setuptools by default
  • Issue: flask-security==3.0.0 imports pkg_resources which requires setuptools
  • Error: ModuleNotFoundError: No module named 'pkg_resources'
  • Solution: Explicitly add setuptools as a runtime dependency

Testing

  • Tested with IIAB PR #4259 on Ubuntu 24.04 with Python 3.12
  • Integration test workflow successfully dispatches events
  • Setuptools fix resolves pkg_resources import error

Related

This workflow enables automated integration testing with Internet-in-a-Box (IIAB):

- Triggers on PR labeled 'test-iiab-integration'
- Triggers on merge to master
- Dispatches events to ascoderu/iiab-lokole-tests repository
- Posts test results back to PRs

Related to integration test suite at:
https://github.com/ascoderu/iiab-lokole-tests
…k PRs

This implements the 'safe to test' pattern used by major OSS projects:
- Maintainers explicitly approve fork PRs by adding test-iiab-integration label
- pull_request_target runs in base repo context with access to secrets
- Safe because we don't checkout/execute PR code, only read metadata
- Enables integration testing for fork PRs after maintainer review

Fixes the workflow failure on fork PRs while maintaining security.
Python 3.12+ no longer includes setuptools by default, but flask-security
3.0.0 imports pkg_resources which requires it. This fixes the error:
ModuleNotFoundError: No module named 'pkg_resources'
Setuptools 73+ removed pkg_resources module which is still required by
flask-security 3.0.0. Testing showed:
- setuptools 72.2.0: ✅ pkg_resources available (deprecated but works)
- setuptools 82.0.0: ❌ pkg_resources removed

Constraint: setuptools>=65.5.0,<73.0.0
…tibility

API server was crashing with 'ModuleNotFoundError: No module named pkg_resources'
because gunicorn requires pkg_resources from setuptools, but setuptools 73+
removed this module.

The constraint was already in requirements-webapp.txt for the client, but
requirements.txt (used by API/worker containers) was missing it, causing
the API container to fail on startup.

Root cause: docker/app/Dockerfile installs both requirements-webapp.txt AND
requirements.txt, but the latter lacked the setuptools constraint, allowing
pip to install setuptools 73+ which doesn't provide pkg_resources.

Fix: Add setuptools>=65.5.0,<73.0.0 to requirements.txt to ensure pkg_resources
is available for gunicorn in Python 3.9 API/worker containers.

Fixes: Integration test failures where API container exits with code 1
@dahagag dahagag merged commit 27ed239 into ascoderu:master Feb 8, 2026
4 checks passed
@dahagag dahagag deleted the feature/add-integration-test-trigger-rebased branch February 24, 2026 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant