Skip to content

Conversation

@arnavk23
Copy link

Implements long-term solution for flaky tests and race conditions by introducing local Docker-based test infrastructure.

Changes

Infrastructure:

  • Add Docker Compose config for local test services (MySQL, PHP API v1, Python API v2)
  • Add test-server.sh management script for easy local development
  • Add pytest plugin for local server configuration (--local-server flag)

CI/CD:

  • Add new CI job for testing with local server
  • Enable tests marked with @pytest.mark.uses_test_server to run locally
  • Eliminate dependency on remote test.openml.org for most tests

Documentation:

  • Add comprehensive local_test_server.md guide
  • Update CONTRIBUTING.md with local testing instructions
  • Document migration path and troubleshooting steps

Benefits

  • Eliminates race conditions from parallel CI jobs
  • Removes flaky failures from server load/timeouts
  • Enables reliable local development and testing
  • Provides foundation for v1→v2 API migration ([ENH] V1 → V2 API Migration #1575)

Migration Path

Short-term: Mock server implementation for CI validation
Mid-term: Replace with official OpenML Docker images
Long-term: Full local test environment with production-like data

Implements long-term solution for flaky tests and race conditions by introducing
local Docker-based test infrastructure.

## Changes

**Infrastructure:**
- Add Docker Compose config for local test services (MySQL, PHP API v1, Python API v2)
- Add test-server.sh management script for easy local development
- Add pytest plugin for local server configuration (--local-server flag)

**CI/CD:**
- Add new CI job for testing with local server
- Enable tests marked with @pytest.mark.uses_test_server to run locally
- Eliminate dependency on remote test.openml.org for most tests

**Documentation:**
- Add comprehensive local_test_server.md guide
- Update CONTRIBUTING.md with local testing instructions
- Document migration path and troubleshooting steps

## Benefits

✅ Eliminates race conditions from parallel CI jobs
✅ Removes flaky failures from server load/timeouts
✅ Enables reliable local development and testing
✅ Provides foundation for v1→v2 API migration (openml#1575)

## Migration Path

**Short-term:** Mock server implementation for CI validation
**Mid-term:** Replace with official OpenML Docker images
**Long-term:** Full local test environment with production-like data

Fixes openml#1586

Co-authored-by: geetu040 (design from openml#1614)
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