Issue Service
Core issue tracking service with workflow states, assignments, and SLA management for the issue tracker platform.
Service Structure
src/
├── core/
│ ├── config.py # Configuration settings
│ └── __init__.py # Package exports
├── domain/
│ ├── issue.py # Issue domain model
│ ├── sla.py # SLA domain model
│ ├── workflow.py # Workflow state machine
│ └── __init__.py # Package exports
├── events/
│ ├── publisher.py # Event publishers
│ └── __init__.py # Package exports
├── models/
│ ├── IssueModel # Issue database model
│ ├── SLAModel # SLA database model
│ ├── WorkflowModel # Workflow definition model
│ └── __init__.py # Package exports
├── repositories/
│ ├── IssueRepository # Issue CRUD operations
│ ├── SLARepository # SLA CRUD operations
│ └── __init__.py # Package exports
├── routers/
│ ├── issue_router.py # Issue API routes
│ ├── workflow_router.py # Workflow API routes
│ └── __init__.py # Package exports
├── services/
│ ├── IssueService # Issue business logic
│ ├── SLAService # SLA business logic
│ ├── WorkflowService # Workflow business logic
│ └── __init__.py # Package exports
├── database.py # Database connection
├── main.py # FastAPI application entrypoint
└── __init__.py # Package exports
Features
Issue Management
- Issue CRUD: Create, read, update, delete issues
- Issue Types: Bug, Feature, Task, Epic, Story
- Priority Levels: Critical, High, Medium, Low
- Status Workflow: Customizable state transitions
- Assignments: Assign issues to users/teams
- Labels/Tags: Categorize issues
- Attachments: File attachments support
- Comments: Threaded discussions
- Watchers: Subscribe to issue updates
Workflow Engine
- State Machine: Configurable workflow states
- Transitions: Valid state transitions with conditions
- Automation: Auto-transition on events
- Custom Workflows: Per-project workflows
SLA Management
- SLA Policies: Define response/resolution targets
- SLA Tracking: Monitor SLA compliance
- Escalation: Auto-escalate breached SLAs
- Business Hours: Configure working hours
- Holiday Calendar: Exclude holidays from SLA
Event Integration
- Issue Events: Publishes issue.created, issue.updated, issue.deleted, issue.status_changed, issue.assigned
- SLA Events: Publishes sla.breached, sla.warning
- Consumes Events: Listens for project, user, comment events
API Endpoints
Issues
Create Issue
POST /api/v1/projects/{project_id}/issues
Content-Type: application/json
{
"title": "Login page not loading",
"description": "Users cannot access login page",
"issue_type": "bug",
"priority": "high",
"assignee_id": "uuid",
"labels": ["frontend", "urgent"],
"due_date": "2024-01-20T10:00:00Z"
}
Get Issue
GET /api/v1/issues/{issue_id}
Response:
{
"id": "uuid",
"project_id": "uuid",
"title": "Login page not loading",
"description": "Users cannot access login page",
"issue_type": "bug",
"priority": "high",
"status": "open",
"assignee_id": "uuid",
"reporter_id": "uuid",
"labels": ["frontend", "urgent"],
"due_date": "2024-01-20T10:00:00Z",
"workflow_state": "open",
"sla_deadline": "2024-01-18T10:00:00Z",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z"
}
Update Issue
PATCH /api/v1/issues/{issue_id}
Content-Type: application/json
{
"status": "in_progress",
"assignee_id": "uuid",
"priority": "critical"
}
Delete Issue
DELETE /api/v1/issues/{issue_id}
List Issues
GET /api/v1/issues?project_id={project_id}&status=open&priority=high&skip=0&limit=20
Query Parameters:
- project_id: uuid (required)
- status: string (optional)
- priority: string (optional)
- assignee_id: uuid (optional)
- issue_type: string (optional)
- labels: string (comma-separated)
- skip: int (default: 0)
- limit: int (default: 20, max: 100)
- sort: string (default: -created_at)
Workflow
Get Workflow
GET /api/v1/projects/{project_id}/workflow
Update Workflow
PUT /api/v1/projects/{project_id}/workflow
Content-Type: application/json
{
"states": [
{"name": "open", "type": "start"},
{"name": "in_progress", "type": "intermediate"},
{"name": "in_review", "type": "intermediate"},
{"name": "done", "type": "end"}
],
"transitions": [
{"from": "open", "to": "in_progress"},
{"from": "in_progress", "to": "in_review"},
{"from": "in_review", "to": "done"},
{"from": "in_review", "to": "in_progress"}
]
}
Transition Issue
POST /api/v1/issues/{issue_id}/transition
Content-Type: application/json
{
"to_state": "in_progress"
}
SLA
Create SLA Policy
POST /api/v1/projects/{project_id}/sla
Content-Type: application/json
{
"name": "Critical Bug SLA",
"issue_type": "bug",
"priority": "critical",
"response_time_hours": 1,
"resolution_time_hours": 4,
"business_hours": {
"timezone": "UTC",
"monday": {"start": "09:00", "end": "17:00"},
...
}
}
Get SLA Status
GET /api/v1/issues/{issue_id}/sla
Configuration
Environment variables (in .env):
# Service
SERVICE_NAME=issue-service
SERVICE_VERSION=1.0.0
ENVIRONMENT=development
# Database
DATABASE_URL=postgresql+asyncpg://postgres:postgres_password@postgres:5432/issue_tracker
# Redis
REDIS_URL=redis://redis:6379/0
# RabbitMQ
RABBITMQ_URL=amqp://guest:guest@rabbitmq:5672/
# Observability
JAEGER_ENABLED=false
JAEGER_HOST=jaeger
JAEGER_PORT=6831
Health Check
GET /health
Response:
{
"status": "healthy",
"service": "issue-service",
"version": "1.0.0"
}
Development
Running the Service
pip install -r requirements.txt
uvicorn src.main:app --reload --host 0.0.0.0 --port 8000
# Or using Docker
docker build -f Dockerfile -t issue-service .
docker run -p 8004:8000 --env-file .env issue-service
Testing
pytest tests/
pytest --cov=src tests/
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file issue_service_byom-1.0.1-py3-none-any.whl.
File metadata
- Download URL: issue_service_byom-1.0.1-py3-none-any.whl
- Upload date:
- Size: 21.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a83813277fba35425e6756e6508cd9c12330166fbdd620960dd5849e68df3ebe
|
|
| MD5 |
f61b4bfeacba14b5066a622149430eff
|
|
| BLAKE2b-256 |
f0e297a11f69e34c16747f39d3fd08fc75d143fcc03120690e1133bc1ebee320
|
Provenance
The following attestation bundles were made for issue_service_byom-1.0.1-py3-none-any.whl:
Publisher:
publish-pypi.yml on omkumar01/Distributed-Issue-Tracker-FastAPI-Microservices
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
issue_service_byom-1.0.1-py3-none-any.whl -
Subject digest:
a83813277fba35425e6756e6508cd9c12330166fbdd620960dd5849e68df3ebe - Sigstore transparency entry: 2348916115
- Sigstore integration time:
-
Permalink:
omkumar01/Distributed-Issue-Tracker-FastAPI-Microservices@691bc9f9a089f1da103695dabbb9e1071a702bf5 -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/omkumar01
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@691bc9f9a089f1da103695dabbb9e1071a702bf5 -
Trigger Event:
workflow_dispatch
-
Statement type: