From f81297cb540692658ef10b2ac5f033e9103080c4 Mon Sep 17 00:00:00 2001 From: Antonio Lain Date: Wed, 4 Dec 2024 16:01:21 -0800 Subject: [PATCH] Rename fields, add comments --- internal/deployment_client.go | 8 ++++---- internal/internal_deployment_client.go | 4 ++-- internal/workflow.go | 4 +++- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/internal/deployment_client.go b/internal/deployment_client.go index f9c693d3c..6b40a07f8 100644 --- a/internal/deployment_client.go +++ b/internal/deployment_client.go @@ -99,8 +99,8 @@ type ( // CreateTime - When this deployment was created. CreateTime time.Time - // Current - Whether this deployment is the current one for its deployment series. - Current bool + // IsCurrent - Whether this deployment is the current one for its deployment series. + IsCurrent bool // TaskQueuesInfo - List of task queues polled by workers in this deployment. TaskQueuesInfo []DeploymentTaskQueueInfo @@ -119,7 +119,7 @@ type ( CreateTime time.Time // Whether this deployment is the current one for its deployment series. - Current bool + IsCurrent bool } // DeploymentListIterator is an iterator for deployments. @@ -147,7 +147,7 @@ type ( // DeploymentReachabilityInfo extends DeploymentInfo with reachability information. // NOTE: Experimental DeploymentReachabilityInfo struct { - DeploymentInfo + DeploymentInfo DeploymentInfo // Reachability - Kind of tasks that may reach a worker // associated with a deployment. diff --git a/internal/internal_deployment_client.go b/internal/internal_deployment_client.go index 86f49ab62..bc3aafff0 100644 --- a/internal/internal_deployment_client.go +++ b/internal/internal_deployment_client.go @@ -95,7 +95,7 @@ func deploymentListEntryFromProto(deployment *deployment.DeploymentListInfo) *De return &DeploymentListEntry{ Deployment: deploymentFromProto(deployment.GetDeployment()), CreateTime: deployment.GetCreateTime().AsTime(), - Current: deployment.GetIsCurrent(), + IsCurrent: deployment.GetIsCurrent(), } } @@ -115,7 +115,7 @@ func deploymentInfoFromProto(deploymentInfo *deployment.DeploymentInfo) Deployme return DeploymentInfo{ Deployment: deploymentFromProto(deploymentInfo.GetDeployment()), CreateTime: deploymentInfo.GetCreateTime().AsTime(), - Current: deploymentInfo.GetIsCurrent(), + IsCurrent: deploymentInfo.GetIsCurrent(), TaskQueuesInfo: deploymentTaskQueuesInfoFromProto(deploymentInfo.GetTaskQueueInfos()), Metadata: deploymentInfo.GetMetadata(), } diff --git a/internal/workflow.go b/internal/workflow.go index e2237057b..0681c7d70 100644 --- a/internal/workflow.go +++ b/internal/workflow.go @@ -413,7 +413,9 @@ type ( // inside a workflow as a child workflow. Name string DisableAlreadyRegisteredCheck bool - // Optional: Provides a Versioning Behavior to workflows of this type. + // Optional: Provides a Versioning Behavior to workflows of this type. It is required + // when WorkerOptions does not specify DeploymentOptions.DefaultVersioningBehavior, + // DeploymentOptions.DeploymentSeriesName is set, and UseBuildIDForVersioning is true. // NOTE: Experimental VersioningBehavior VersioningBehavior }