From 9cde65cfd73c1cc5b1c1c986ce0c894013702113 Mon Sep 17 00:00:00 2001 From: YaqinLi Date: Fri, 17 Nov 2023 02:35:10 +0000 Subject: [PATCH] add debug log --- deploy-agent/deployd/types/deploy_goal.py | 7 +++++-- .../com/pinterest/deployservice/handler/PingHandler.java | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/deploy-agent/deployd/types/deploy_goal.py b/deploy-agent/deployd/types/deploy_goal.py index acf5c0d736..bd08c89661 100644 --- a/deploy-agent/deployd/types/deploy_goal.py +++ b/deploy-agent/deployd/types/deploy_goal.py @@ -21,6 +21,7 @@ def __init__(self, jsonValue=None): self.envId = None self.envName = None self.stageName = None + self.stageType = None self.deployStage = None self.build = None self.deployAlias = None @@ -34,6 +35,7 @@ def __init__(self, jsonValue=None): self.envId = jsonValue.get('envId') self.envName = jsonValue.get('envName') self.stageName = jsonValue.get('stageName') + self.stageName = jsonValue.get('stageType') # TODO: Only used for migration, should remove later if isinstance(jsonValue.get('deployStage'), int): self.deployStage = DeployStage._VALUES_TO_NAMES[jsonValue.get('deployStage')] @@ -54,6 +56,7 @@ def __key(self): self.envId, self.envName, self.stageName, + self.stageType, self.deployStage, self.build, self.deployAlias, @@ -76,10 +79,10 @@ def __ne__(self, other): and self.__key() == other.__key()) def __str__(self): - return "DeployGoal(deployId={}, envId={}, envName={}, stageName={}, " \ + return "DeployGoal(deployId={}, envId={}, envName={}, stageName={}, stageType={}, " \ "deployStage={}, build={}, deployAlias={}, agentConfig={}," \ "scriptVariables={}, firstDeploy={}, isDocker={})".format(self.deployId, self.envId, self.envName, - self.stageName, self.deployStage, + self.stageName, self.stageType, self.deployStage, self.build, self.deployAlias, self.config, self.scriptVariables, self.firstDeploy, self.isDocker) diff --git a/deploy-service/common/src/main/java/com/pinterest/deployservice/handler/PingHandler.java b/deploy-service/common/src/main/java/com/pinterest/deployservice/handler/PingHandler.java index 50225644e4..60a6388726 100644 --- a/deploy-service/common/src/main/java/com/pinterest/deployservice/handler/PingHandler.java +++ b/deploy-service/common/src/main/java/com/pinterest/deployservice/handler/PingHandler.java @@ -760,6 +760,7 @@ public PingResponseBean generateInstallResponse(GoalAnalyst.InstallCandidate ins goal.setEnvId(envBean.getEnv_id()); goal.setEnvName(envBean.getEnv_name()); goal.setStageName(envBean.getStage_name()); + LOG.debug("stage type: {}", envBean.getStage_type()); goal.setStageType(envBean.getStage_type()); goal.setIsDocker(envBean.getIs_docker());