Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
623 changes: 283 additions & 340 deletions api/persistenceblobs/v1/message.pb.go

Large diffs are not rendered by default.

7 changes: 0 additions & 7 deletions common/namespace/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ import (
"fmt"
"time"

"github.com/gogo/protobuf/types"
"github.com/pborman/uuid"
enumspb "go.temporal.io/api/enums/v1"
namespacepb "go.temporal.io/api/namespace/v1"
Expand Down Expand Up @@ -210,7 +209,6 @@ func (d *HandlerImpl) RegisterNamespace(
}
config := &persistenceblobs.NamespaceConfig{
RetentionDays: registerRequest.GetWorkflowExecutionRetentionPeriodDays(),
EmitMetric: registerRequest.GetEmitMetric(),
HistoryArchivalState: nextHistoryArchivalState.State,
HistoryArchivalUri: nextHistoryArchivalState.URI,
VisibilityArchivalState: nextVisibilityArchivalState.State,
Expand Down Expand Up @@ -440,10 +438,6 @@ func (d *HandlerImpl) UpdateNamespace(
}
if updateRequest.Config != nil {
updatedConfig := updateRequest.Config
if updatedConfig.EmitMetric != nil {
configurationChanged = true
config.EmitMetric = updatedConfig.GetEmitMetric().GetValue()
}
if updatedConfig.GetWorkflowExecutionRetentionPeriodInDays() != 0 {
configurationChanged = true
config.RetentionDays = updatedConfig.GetWorkflowExecutionRetentionPeriodInDays()
Expand Down Expand Up @@ -644,7 +638,6 @@ func (d *HandlerImpl) createResponse(
}

configResult := &namespacepb.NamespaceConfig{
EmitMetric: &types.BoolValue{Value: config.EmitMetric},
WorkflowExecutionRetentionPeriodInDays: config.RetentionDays,
HistoryArchivalState: config.HistoryArchivalState,
HistoryArchivalUri: config.HistoryArchivalUri,
Expand Down
15 changes: 0 additions & 15 deletions common/namespace/handler_GlobalNamespaceDisabled_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ import (
"os"
"testing"

"github.com/gogo/protobuf/types"
"github.com/pborman/uuid"
"github.com/stretchr/testify/suite"
enumspb "go.temporal.io/api/enums/v1"
Expand Down Expand Up @@ -127,7 +126,6 @@ func (s *namespaceHandlerGlobalNamespaceDisabledSuite) TestRegisterGetNamespace_
description := "some random description"
email := "some random email"
retention := int32(7)
emitMetric := true
activeClusterName := cluster.TestCurrentClusterName
clusters := []*replicationpb.ClusterReplicationConfig{
{
Expand All @@ -142,7 +140,6 @@ func (s *namespaceHandlerGlobalNamespaceDisabledSuite) TestRegisterGetNamespace_
Description: description,
OwnerEmail: email,
WorkflowExecutionRetentionPeriodDays: retention,
EmitMetric: emitMetric,
Clusters: clusters,
ActiveClusterName: activeClusterName,
Data: data,
Expand All @@ -158,7 +155,6 @@ func (s *namespaceHandlerGlobalNamespaceDisabledSuite) TestRegisterGetNamespace_
description := "some random description"
email := "some random email"
retention := int32(7)
emitMetric := true
activeClusterName := cluster.TestAlternativeClusterName
clusters := []*replicationpb.ClusterReplicationConfig{
{
Expand All @@ -173,7 +169,6 @@ func (s *namespaceHandlerGlobalNamespaceDisabledSuite) TestRegisterGetNamespace_
Description: description,
OwnerEmail: email,
WorkflowExecutionRetentionPeriodDays: retention,
EmitMetric: emitMetric,
Clusters: clusters,
ActiveClusterName: activeClusterName,
Data: data,
Expand Down Expand Up @@ -218,7 +213,6 @@ func (s *namespaceHandlerGlobalNamespaceDisabledSuite) TestRegisterGetNamespace_
}, resp.NamespaceInfo)
s.Equal(&namespacepb.NamespaceConfig{
WorkflowExecutionRetentionPeriodInDays: retention,
EmitMetric: &types.BoolValue{Value: false},
HistoryArchivalState: enumspb.ARCHIVAL_STATE_DISABLED,
HistoryArchivalUri: "",
VisibilityArchivalState: enumspb.ARCHIVAL_STATE_DISABLED,
Expand All @@ -238,7 +232,6 @@ func (s *namespaceHandlerGlobalNamespaceDisabledSuite) TestRegisterGetNamespace_
description := "some random description"
email := "some random email"
retention := int32(7)
emitMetric := true
activeClusterName := cluster.TestCurrentClusterName
clusters := []*replicationpb.ClusterReplicationConfig{
&replicationpb.ClusterReplicationConfig{
Expand All @@ -260,7 +253,6 @@ func (s *namespaceHandlerGlobalNamespaceDisabledSuite) TestRegisterGetNamespace_
Description: description,
OwnerEmail: email,
WorkflowExecutionRetentionPeriodDays: retention,
EmitMetric: emitMetric,
Clusters: clusters,
ActiveClusterName: activeClusterName,
Data: data,
Expand All @@ -286,7 +278,6 @@ func (s *namespaceHandlerGlobalNamespaceDisabledSuite) TestRegisterGetNamespace_
}, resp.NamespaceInfo)
s.Equal(&namespacepb.NamespaceConfig{
WorkflowExecutionRetentionPeriodInDays: retention,
EmitMetric: &types.BoolValue{Value: emitMetric},
HistoryArchivalState: enumspb.ARCHIVAL_STATE_DISABLED,
HistoryArchivalUri: "",
VisibilityArchivalState: enumspb.ARCHIVAL_STATE_DISABLED,
Expand All @@ -306,7 +297,6 @@ func (s *namespaceHandlerGlobalNamespaceDisabledSuite) TestUpdateGetNamespace_No
description := "some random description"
email := "some random email"
retention := int32(7)
emitMetric := true
data := map[string]string{"some random key": "some random value"}
var clusters []*replicationpb.ClusterReplicationConfig
for _, cluster := range persistence.GetOrUseDefaultClusters(s.ClusterMetadata.GetCurrentClusterName(), nil) {
Expand All @@ -320,7 +310,6 @@ func (s *namespaceHandlerGlobalNamespaceDisabledSuite) TestUpdateGetNamespace_No
Description: description,
OwnerEmail: email,
WorkflowExecutionRetentionPeriodDays: retention,
EmitMetric: emitMetric,
Clusters: clusters,
ActiveClusterName: s.ClusterMetadata.GetCurrentClusterName(),
Data: data,
Expand All @@ -342,7 +331,6 @@ func (s *namespaceHandlerGlobalNamespaceDisabledSuite) TestUpdateGetNamespace_No
}, info)
s.Equal(&namespacepb.NamespaceConfig{
WorkflowExecutionRetentionPeriodInDays: retention,
EmitMetric: &types.BoolValue{Value: emitMetric},
HistoryArchivalState: enumspb.ARCHIVAL_STATE_DISABLED,
HistoryArchivalUri: "",
VisibilityArchivalState: enumspb.ARCHIVAL_STATE_DISABLED,
Expand Down Expand Up @@ -394,7 +382,6 @@ func (s *namespaceHandlerGlobalNamespaceDisabledSuite) TestUpdateGetNamespace_Al
description := "some random description"
email := "some random email"
retention := int32(7)
emitMetric := true
activeClusterName := cluster.TestCurrentClusterName
clusters := []*replicationpb.ClusterReplicationConfig{
&replicationpb.ClusterReplicationConfig{
Expand Down Expand Up @@ -424,7 +411,6 @@ func (s *namespaceHandlerGlobalNamespaceDisabledSuite) TestUpdateGetNamespace_Al
}, info)
s.Equal(&namespacepb.NamespaceConfig{
WorkflowExecutionRetentionPeriodInDays: retention,
EmitMetric: &types.BoolValue{Value: emitMetric},
HistoryArchivalState: enumspb.ARCHIVAL_STATE_DISABLED,
HistoryArchivalUri: "",
VisibilityArchivalState: enumspb.ARCHIVAL_STATE_DISABLED,
Expand All @@ -448,7 +434,6 @@ func (s *namespaceHandlerGlobalNamespaceDisabledSuite) TestUpdateGetNamespace_Al
},
Config: &namespacepb.NamespaceConfig{
WorkflowExecutionRetentionPeriodInDays: retention,
EmitMetric: &types.BoolValue{Value: emitMetric},
HistoryArchivalState: enumspb.ARCHIVAL_STATE_DISABLED,
HistoryArchivalUri: "",
VisibilityArchivalState: enumspb.ARCHIVAL_STATE_DISABLED,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ import (
"os"
"testing"

"github.com/gogo/protobuf/types"
"github.com/pborman/uuid"
"github.com/stretchr/testify/mock"
"github.com/stretchr/testify/suite"
Expand Down Expand Up @@ -128,7 +127,6 @@ func (s *namespaceHandlerGlobalNamespaceEnabledMasterClusterSuite) TestRegisterG
description := "some random description"
email := "some random email"
retention := int32(7)
emitMetric := true
activeClusterName := cluster.TestAlternativeClusterName
clusters := []*replicationpb.ClusterReplicationConfig{
{
Expand All @@ -143,7 +141,6 @@ func (s *namespaceHandlerGlobalNamespaceEnabledMasterClusterSuite) TestRegisterG
Description: description,
OwnerEmail: email,
WorkflowExecutionRetentionPeriodDays: retention,
EmitMetric: emitMetric,
Clusters: clusters,
ActiveClusterName: activeClusterName,
Data: data,
Expand Down Expand Up @@ -190,7 +187,6 @@ func (s *namespaceHandlerGlobalNamespaceEnabledMasterClusterSuite) TestRegisterG
}, resp.NamespaceInfo)
s.Equal(&namespacepb.NamespaceConfig{
WorkflowExecutionRetentionPeriodInDays: retention,
EmitMetric: &types.BoolValue{Value: false},
HistoryArchivalState: enumspb.ARCHIVAL_STATE_DISABLED,
HistoryArchivalUri: "",
VisibilityArchivalState: enumspb.ARCHIVAL_STATE_DISABLED,
Expand All @@ -210,7 +206,6 @@ func (s *namespaceHandlerGlobalNamespaceEnabledMasterClusterSuite) TestRegisterG
description := "some random description"
email := "some random email"
retention := int32(7)
emitMetric := true
activeClusterName := cluster.TestCurrentClusterName
clusters := []*replicationpb.ClusterReplicationConfig{
&replicationpb.ClusterReplicationConfig{
Expand All @@ -232,7 +227,6 @@ func (s *namespaceHandlerGlobalNamespaceEnabledMasterClusterSuite) TestRegisterG
Description: description,
OwnerEmail: email,
WorkflowExecutionRetentionPeriodDays: retention,
EmitMetric: emitMetric,
Clusters: clusters,
ActiveClusterName: activeClusterName,
Data: data,
Expand All @@ -258,7 +252,6 @@ func (s *namespaceHandlerGlobalNamespaceEnabledMasterClusterSuite) TestRegisterG
}, resp.NamespaceInfo)
s.Equal(&namespacepb.NamespaceConfig{
WorkflowExecutionRetentionPeriodInDays: retention,
EmitMetric: &types.BoolValue{Value: emitMetric},
HistoryArchivalState: enumspb.ARCHIVAL_STATE_DISABLED,
HistoryArchivalUri: "",
VisibilityArchivalState: enumspb.ARCHIVAL_STATE_DISABLED,
Expand All @@ -278,7 +271,6 @@ func (s *namespaceHandlerGlobalNamespaceEnabledMasterClusterSuite) TestUpdateGet
description := "some random description"
email := "some random email"
retention := int32(7)
emitMetric := true
data := map[string]string{"some random key": "some random value"}
var clusters []*replicationpb.ClusterReplicationConfig
for _, name := range persistence.GetOrUseDefaultClusters(s.ClusterMetadata.GetCurrentClusterName(), nil) {
Expand All @@ -293,7 +285,6 @@ func (s *namespaceHandlerGlobalNamespaceEnabledMasterClusterSuite) TestUpdateGet
Description: description,
OwnerEmail: email,
WorkflowExecutionRetentionPeriodDays: retention,
EmitMetric: emitMetric,
Clusters: clusters,
ActiveClusterName: s.ClusterMetadata.GetCurrentClusterName(),
Data: data,
Expand All @@ -316,7 +307,6 @@ func (s *namespaceHandlerGlobalNamespaceEnabledMasterClusterSuite) TestUpdateGet
}, info)
s.Equal(&namespacepb.NamespaceConfig{
WorkflowExecutionRetentionPeriodInDays: retention,
EmitMetric: &types.BoolValue{Value: emitMetric},
HistoryArchivalState: enumspb.ARCHIVAL_STATE_DISABLED,
HistoryArchivalUri: "",
VisibilityArchivalState: enumspb.ARCHIVAL_STATE_DISABLED,
Expand Down Expand Up @@ -370,7 +360,6 @@ func (s *namespaceHandlerGlobalNamespaceEnabledMasterClusterSuite) TestUpdateGet
description := "some random description"
email := "some random email"
retention := int32(7)
emitMetric := true
data := map[string]string{"some random key": "some random value"}
var clusters []*replicationpb.ClusterReplicationConfig
for _, name := range persistence.GetOrUseDefaultClusters(s.ClusterMetadata.GetCurrentClusterName(), nil) {
Expand All @@ -393,7 +382,6 @@ func (s *namespaceHandlerGlobalNamespaceEnabledMasterClusterSuite) TestUpdateGet
}, info)
s.Equal(&namespacepb.NamespaceConfig{
WorkflowExecutionRetentionPeriodInDays: retention,
EmitMetric: &types.BoolValue{Value: emitMetric},
HistoryArchivalState: enumspb.ARCHIVAL_STATE_DISABLED,
HistoryArchivalUri: "",
VisibilityArchivalState: enumspb.ARCHIVAL_STATE_DISABLED,
Expand All @@ -417,7 +405,6 @@ func (s *namespaceHandlerGlobalNamespaceEnabledMasterClusterSuite) TestUpdateGet
},
Config: &namespacepb.NamespaceConfig{
WorkflowExecutionRetentionPeriodInDays: retention,
EmitMetric: &types.BoolValue{Value: emitMetric},
HistoryArchivalState: enumspb.ARCHIVAL_STATE_DISABLED,
HistoryArchivalUri: "",
VisibilityArchivalState: enumspb.ARCHIVAL_STATE_DISABLED,
Expand Down Expand Up @@ -489,7 +476,6 @@ func (s *namespaceHandlerGlobalNamespaceEnabledMasterClusterSuite) TestRegisterG
}, resp.NamespaceInfo)
s.Equal(&namespacepb.NamespaceConfig{
WorkflowExecutionRetentionPeriodInDays: retention,
EmitMetric: &types.BoolValue{Value: false},
HistoryArchivalState: enumspb.ARCHIVAL_STATE_DISABLED,
HistoryArchivalUri: "",
VisibilityArchivalState: enumspb.ARCHIVAL_STATE_DISABLED,
Expand All @@ -509,7 +495,6 @@ func (s *namespaceHandlerGlobalNamespaceEnabledMasterClusterSuite) TestRegisterG
description := "some random description"
email := "some random email"
retention := int32(7)
emitMetric := true
activeClusterName := ""
clusters := []*replicationpb.ClusterReplicationConfig{}
for clusterName := range s.ClusterMetadata.GetAllClusterInfo() {
Expand All @@ -532,7 +517,6 @@ func (s *namespaceHandlerGlobalNamespaceEnabledMasterClusterSuite) TestRegisterG
Description: description,
OwnerEmail: email,
WorkflowExecutionRetentionPeriodDays: retention,
EmitMetric: emitMetric,
Clusters: clusters,
ActiveClusterName: activeClusterName,
Data: data,
Expand All @@ -558,7 +542,6 @@ func (s *namespaceHandlerGlobalNamespaceEnabledMasterClusterSuite) TestRegisterG
}, resp.NamespaceInfo)
s.Equal(&namespacepb.NamespaceConfig{
WorkflowExecutionRetentionPeriodInDays: retention,
EmitMetric: &types.BoolValue{Value: emitMetric},
HistoryArchivalState: enumspb.ARCHIVAL_STATE_DISABLED,
HistoryArchivalUri: "",
VisibilityArchivalState: enumspb.ARCHIVAL_STATE_DISABLED,
Expand All @@ -578,7 +561,6 @@ func (s *namespaceHandlerGlobalNamespaceEnabledMasterClusterSuite) TestUpdateGet
description := "some random description"
email := "some random email"
retention := int32(7)
emitMetric := true
data := map[string]string{"some random key": "some random value"}
activeClusterName := ""
clusters := []*replicationpb.ClusterReplicationConfig{}
Expand All @@ -601,7 +583,6 @@ func (s *namespaceHandlerGlobalNamespaceEnabledMasterClusterSuite) TestUpdateGet
Description: description,
OwnerEmail: email,
WorkflowExecutionRetentionPeriodDays: retention,
EmitMetric: emitMetric,
Clusters: clusters,
ActiveClusterName: activeClusterName,
Data: data,
Expand All @@ -624,7 +605,6 @@ func (s *namespaceHandlerGlobalNamespaceEnabledMasterClusterSuite) TestUpdateGet
}, info)
s.Equal(&namespacepb.NamespaceConfig{
WorkflowExecutionRetentionPeriodInDays: retention,
EmitMetric: &types.BoolValue{Value: emitMetric},
HistoryArchivalState: enumspb.ARCHIVAL_STATE_DISABLED,
HistoryArchivalUri: "",
VisibilityArchivalState: enumspb.ARCHIVAL_STATE_DISABLED,
Expand Down Expand Up @@ -695,7 +675,6 @@ func (s *namespaceHandlerGlobalNamespaceEnabledMasterClusterSuite) TestUpdateGet
description := "some random description"
email := "some random email"
retention := int32(7)
emitMetric := true
data := map[string]string{"some random key": "some random value"}

fnTest := func(info *namespacepb.NamespaceInfo, config *namespacepb.NamespaceConfig,
Expand All @@ -712,7 +691,6 @@ func (s *namespaceHandlerGlobalNamespaceEnabledMasterClusterSuite) TestUpdateGet
}, info)
s.Equal(&namespacepb.NamespaceConfig{
WorkflowExecutionRetentionPeriodInDays: retention,
EmitMetric: &types.BoolValue{Value: emitMetric},
HistoryArchivalState: enumspb.ARCHIVAL_STATE_DISABLED,
HistoryArchivalUri: "",
VisibilityArchivalState: enumspb.ARCHIVAL_STATE_DISABLED,
Expand All @@ -736,7 +714,6 @@ func (s *namespaceHandlerGlobalNamespaceEnabledMasterClusterSuite) TestUpdateGet
},
Config: &namespacepb.NamespaceConfig{
WorkflowExecutionRetentionPeriodInDays: retention,
EmitMetric: &types.BoolValue{Value: emitMetric},
HistoryArchivalState: enumspb.ARCHIVAL_STATE_DISABLED,
HistoryArchivalUri: "",
VisibilityArchivalState: enumspb.ARCHIVAL_STATE_DISABLED,
Expand Down Expand Up @@ -775,7 +752,6 @@ func (s *namespaceHandlerGlobalNamespaceEnabledMasterClusterSuite) TestUpdateGet
description := "some random description"
email := "some random email"
retention := int32(7)
emitMetric := true
data := map[string]string{"some random key": "some random value"}
prevActiveClusterName := ""
nextActiveClusterName := s.ClusterMetadata.GetCurrentClusterName()
Expand All @@ -799,7 +775,6 @@ func (s *namespaceHandlerGlobalNamespaceEnabledMasterClusterSuite) TestUpdateGet
Description: description,
OwnerEmail: email,
WorkflowExecutionRetentionPeriodDays: retention,
EmitMetric: emitMetric,
Clusters: clusters,
ActiveClusterName: prevActiveClusterName,
Data: data,
Expand All @@ -822,7 +797,6 @@ func (s *namespaceHandlerGlobalNamespaceEnabledMasterClusterSuite) TestUpdateGet
}, info)
s.Equal(&namespacepb.NamespaceConfig{
WorkflowExecutionRetentionPeriodInDays: retention,
EmitMetric: &types.BoolValue{Value: emitMetric},
HistoryArchivalState: enumspb.ARCHIVAL_STATE_DISABLED,
HistoryArchivalUri: "",
VisibilityArchivalState: enumspb.ARCHIVAL_STATE_DISABLED,
Expand Down
Loading