From 6c60a0b6a59184840fdd173121803d52caef8eea Mon Sep 17 00:00:00 2001 From: zhenyus Date: Sun, 3 Aug 2025 04:04:19 +0800 Subject: [PATCH] fix: update deployment service to use correct product ID Changed the parameter name from deployment_project_id to deployment_product_id in the DevOpsReconcileRequest to ensure accurate referencing of the product associated with the deployment. Signed-off-by: zhenyus --- apps/devops/app/common/models/deployment/deployment.py | 2 +- apps/devops/app/routes/deployment/service.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/devops/app/common/models/deployment/deployment.py b/apps/devops/app/common/models/deployment/deployment.py index 360d890..b2c719a 100644 --- a/apps/devops/app/common/models/deployment/deployment.py +++ b/apps/devops/app/common/models/deployment/deployment.py @@ -84,5 +84,5 @@ class DevOpsReconcileRequest(BaseModel): causes: str commit_sha256: Optional[str] = None target_env: Literal["alpha", "prod"] - ttl_controled: bool = False + ttl_control: bool = False ttl: int = 10800 \ No newline at end of file diff --git a/apps/devops/app/routes/deployment/service.py b/apps/devops/app/routes/deployment/service.py index 142ab3b..d2c2e0c 100644 --- a/apps/devops/app/routes/deployment/service.py +++ b/apps/devops/app/routes/deployment/service.py @@ -175,12 +175,12 @@ class DeploymentService: request = DevOpsReconcileRequest( operation=DevOpsReconcileOperationType.START, id=deployment.deployment_id, - devops_proj_id=deployment.deployment_project_id, + devops_proj_id=deployment.deployment_product_id, triggered_user_id=deployment.deployed_by, causes=deployment.deployment_reason, target_env=deployment.deployment_target_env, - ttl_controled=True, - ttl=deployment.deployment_ttl_hours, + ttl_control=True, + ttl=deployment.deployment_ttl_hours * 60, commit_sha256=deployment.deployment_git_sha256, ) # send request to reoncile service