Skip to content

Commit

Permalink
Revert "Remove internal-frontend from default services (#3849)"
Browse files Browse the repository at this point in the history
This reverts commit de6f2df.
  • Loading branch information
MichaelSnowden committed Jan 27, 2023
1 parent 2111a65 commit 7a009d1
Show file tree
Hide file tree
Showing 9 changed files with 103 additions and 12 deletions.
2 changes: 1 addition & 1 deletion cmd/server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ func buildCLI() *cli.App {
&cli.StringSliceFlag{
Name: "service",
Aliases: []string{"svc"},
Value: cli.NewStringSlice(temporal.DefaultServices...),
Value: cli.NewStringSlice(temporal.Services...),
Usage: "service(s) to start",
},
},
Expand Down
1 change: 1 addition & 0 deletions service/frontend/adminHandler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ func (s *adminHandlerSuite) SetupTest() {
health.NewServer(),
serialization.NewSerializer(),
clock.NewRealTimeSource(),
s.mockResource.GetTaskCategoryRegistry(),
}
s.mockMetadata.EXPECT().GetCurrentClusterName().Return(uuid.New()).AnyTimes()
s.handler = NewAdminHandler(args)
Expand Down
2 changes: 2 additions & 0 deletions service/history/shard/context_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ import (
"go.temporal.io/server/common/cluster"
"go.temporal.io/server/common/convert"
"go.temporal.io/server/common/definition"
"go.temporal.io/server/common/log"
"go.temporal.io/server/common/namespace"
"go.temporal.io/server/common/persistence"
"go.temporal.io/server/common/primitives/timestamp"
Expand Down Expand Up @@ -87,6 +88,7 @@ func (s *contextSuite) SetupTest() {
s.timeSource,
)
s.mockShard = shardContext
shardContext.contextTaggedLogger = log.NewNoopLogger()

shardContext.MockHostInfoProvider.EXPECT().HostInfo().Return(shardContext.Resource.GetHostInfo()).AnyTimes()

Expand Down
1 change: 1 addition & 0 deletions service/history/shard/controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ func NewTestController(
clusterMetadata: resource.GetClusterMetadata(),
archivalMetadata: resource.GetArchivalMetadata(),
hostInfoProvider: hostInfoProvider,
taskCategoryRegistry: tasks.NewDefaultCategoryRegistry(),

status: common.DaemonStatusInitialized,
membershipUpdateCh: make(chan *membership.ChangedEvent, 10),
Expand Down
24 changes: 24 additions & 0 deletions service/history/tasks/category_registry.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
// The MIT License
//
// Copyright (c) 2020 Temporal Technologies Inc. All rights reserved.
//
// Copyright (c) 2020 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.

package tasks

import (
Expand Down
24 changes: 24 additions & 0 deletions service/history/tasks/category_registry_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
// The MIT License
//
// Copyright (c) 2020 Temporal Technologies Inc. All rights reserved.
//
// Copyright (c) 2020 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.

package tasks

import (
Expand Down
24 changes: 24 additions & 0 deletions service/history/tasks/fx.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
// The MIT License
//
// Copyright (c) 2020 Temporal Technologies Inc. All rights reserved.
//
// Copyright (c) 2020 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.

package tasks

import (
Expand Down
24 changes: 24 additions & 0 deletions service/history/tasks/fx_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
// The MIT License
//
// Copyright (c) 2020 Temporal Technologies Inc. All rights reserved.
//
// Copyright (c) 2020 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.

package tasks

import (
Expand Down
13 changes: 2 additions & 11 deletions temporal/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,25 +43,16 @@ type (
}
)

// Services is the list of all valid temporal services as strings (needs to be strings to keep
// ServerOptions interface stable)
var (
// Services is the set of all valid temporal services as strings (needs to be strings to
// keep ServerOptions interface stable)
Services = []string{
string(primitives.FrontendService),
string(primitives.InternalFrontendService),
string(primitives.HistoryService),
string(primitives.MatchingService),
string(primitives.WorkerService),
}

// DefaultServices is the set of services to start by default if services are not given on
// the command line.
DefaultServices = []string{
string(primitives.FrontendService),
string(primitives.HistoryService),
string(primitives.MatchingService),
string(primitives.WorkerService),
}
)

// NewServer returns a new instance of server that serves one or many services.
Expand Down

0 comments on commit 7a009d1

Please sign in to comment.