feat: scaffold worker package with FastAPI app and health endpoints#33
Merged
feat: scaffold worker package with FastAPI app and health endpoints#33
Conversation
Initial worker package structure for PR6 import job processing. Package structure: - FastAPI application (app.py) with health endpoints - Health routes (/health/live, /health/ready) for Kubernetes probes - Settings management via Pydantic (environment-based config) - Structured logging with JSON formatter - Pydantic models for health responses - Type checking configuration (pyrefly.toml) - Dependency management (pyproject.toml) Testing infrastructure: - Pytest with async support (pytest-asyncio) - HTTP client fixtures (AsyncClient via httpx) - 100% coverage for health endpoints (test_health.py) - CI workflows: lint (ruff), test (pytest), docker build Docker support: - Lightweight Dockerfile (Python 3.12-slim) - Entrypoint script for graceful startup - Health check endpoints for container orchestration - Added worker service to docker-compose.yml (port 8081) Documentation: - Comprehensive README.md with: - Architecture overview (lease-based job claiming) - Job processing pipeline (6 stages) - Running instructions (local + production) - Environment variables reference - Scaling guidelines - Troubleshooting guide Ready for implementation of job processing loop and stage runners in next commits. Related to PR6 implementation plan (pr6-import-job-plan.md).
Codecov Report✅ All modified and coverable lines are covered by tests.
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 18 files with indirect coverage changes 🚀 New features to boost your workflow:
|
- README.md: add apps/worker/ to stack, document PR #33 worker scaffold - CLAUDE.md: add Worker tech stack section, include worker file organization - implementation-plan.md: document architectural decision to extract worker upfront Co-Authored-By: OpenAI Codex <noreply@openai.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Initial worker package structure for PR6 import job processing.
Package structure:
Testing infrastructure:
Docker support:
Documentation:
Ready for implementation of job processing loop and stage runners in next commits.
Related to PR6 implementation plan (pr6-import-job-plan.md).
Documentation
Updated project documentation to reflect the new worker package:
apps/worker/as actual package (not "planned"), added PR feat: scaffold worker package with FastAPI app and health endpoints #33 worker scaffold entry to Completed section with implementation detailsapps/worker/file organization tree to Backend Development Guidelinesapps/worker/with architectural decision note explaining upfront extraction (originally planned to keep insideapps/api/), updated PR1 note about worker service, updated PR6 files list to reflect worker package structureThe documentation now accurately reflects the decision to extract the worker to a separate package from the start, providing clearer boundaries and simpler deployment patterns.