diff --git a/apps/devops/app/common/models/deployment/deployment.py b/apps/devops/app/common/models/deployment/deployment.py index b9a3619..d4b9982 100644 --- a/apps/devops/app/common/models/deployment/deployment.py +++ b/apps/devops/app/common/models/deployment/deployment.py @@ -2,7 +2,6 @@ from datetime import datetime, timedelta from typing import Literal, List from beanie import Document -from bson import ObjectId from pydantic import Field, field_validator from pydantic import BaseModel from pymongo import IndexModel @@ -40,8 +39,8 @@ class Deployment(Document): class InitDeploymentRequest(BaseModel): product_id: str - sha256: str - target_env: str + sha256: str = "" + target_env: Literal["alpha", "prod"] user_id: str reason: str = "not provided" ttl_hours: int = 3 @@ -53,7 +52,7 @@ class CheckDeploymentStatusRequest(BaseModel): class CheckApplicationLogsRequest(BaseModel): product_id: str - target_env: Literal["alpha", "prod"] = "alpha" + target_env: Literal["alpha", "prod"] user_id: str = '' log_level: List[Literal["info", "error", "debug"]] = Field(default_factory=lambda: ["info"]) start_time: datetime = datetime.now() - timedelta(minutes=5)