Skip to content

Commit

Permalink
Merge branch 'master' into drop-task-on-serialization-error
Browse files Browse the repository at this point in the history
  • Loading branch information
yycptt authored Jan 12, 2023
2 parents 414e188 + dc932a1 commit 649eb5c
Show file tree
Hide file tree
Showing 144 changed files with 1,236 additions and 722 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: SDK Features Integration
name: Features Integration

on: # rebuild any PRs and main branch changes
pull_request:
Expand All @@ -19,31 +19,31 @@ jobs:

feature-tests-ts:
needs: build-docker-image
uses: temporalio/sdk-features/.github/workflows/typescript.yaml@main
uses: temporalio/features/.github/workflows/typescript.yaml@main
with:
version: 1.5.2
version-is-repo-ref: false
docker-image-artifact-name: temporal-server-docker

feature-tests-go:
needs: build-docker-image
uses: temporalio/sdk-features/.github/workflows/go.yaml@main
uses: temporalio/features/.github/workflows/go.yaml@main
with:
version: v1.19.0
version-is-repo-ref: false
docker-image-artifact-name: temporal-server-docker

feature-tests-python:
needs: build-docker-image
uses: temporalio/sdk-features/.github/workflows/python.yaml@main
uses: temporalio/features/.github/workflows/python.yaml@main
with:
version: 0.1b4
version-is-repo-ref: false
docker-image-artifact-name: temporal-server-docker

feature-tests-java:
needs: build-docker-image
uses: temporalio/sdk-features/.github/workflows/java.yaml@main
uses: temporalio/features/.github/workflows/java.yaml@main
with:
version: v1.17.0
version-is-repo-ref: false
Expand Down
97 changes: 45 additions & 52 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,6 @@ endef

TEST_TIMEOUT := 20m

# TODO: INTEG_TEST should be functional tests
INTEG_TEST_ROOT := ./host
INTEG_TEST_XDC_ROOT := ./host/xdc
INTEG_TEST_NDC_ROOT := ./host/ndc

PERSISTENCE_INTEGRATION_TEST_ROOT := ./common/persistence/tests
DB_TOOL_INTEGRATION_TEST_ROOT := ./tools/tests

PROTO_ROOT := proto
PROTO_FILES = $(shell find ./$(PROTO_ROOT)/internal -name "*.proto")
Expand All @@ -76,10 +69,15 @@ PROTO_OUT := api
ALL_SRC := $(shell find . -name "*.go")
ALL_SRC += go.mod
ALL_SCRIPTS := $(shell find . -name "*.sh")
# TODO (jeremy): Replace below with build tags and `go test ./...` for targets

TEST_DIRS := $(sort $(dir $(filter %_test.go,$(ALL_SRC))))
INTEG_TEST_DIRS := $(filter $(INTEG_TEST_ROOT)/ $(INTEG_TEST_NDC_ROOT)/,$(TEST_DIRS))
UNIT_TEST_DIRS := $(filter-out $(INTEG_TEST_ROOT)% $(INTEG_TEST_XDC_ROOT)% $(INTEG_TEST_NDC_ROOT)% $(PERSISTENCE_INTEGRATION_TEST_ROOT)% $(DB_TOOL_INTEGRATION_TEST_ROOT)%,$(TEST_DIRS))
FUNCTIONAL_TEST_ROOT := ./tests
FUNCTIONAL_TEST_XDC_ROOT := ./tests/xdc
FUNCTIONAL_TEST_NDC_ROOT := ./tests/ndc
DB_INTEGRATION_TEST_ROOT := ./common/persistence/tests
DB_TOOL_INTEGRATION_TEST_ROOT := ./tools/tests
INTEGRATION_TEST_DIRS := $(DB_INTEGRATION_TEST_ROOT) $(DB_TOOL_INTEGRATION_TEST_ROOT)
UNIT_TEST_DIRS := $(filter-out $(FUNCTIONAL_TEST_ROOT)% $(FUNCTIONAL_TEST_XDC_ROOT)% $(FUNCTIONAL_TEST_NDC_ROOT)% $(DB_INTEGRATION_TEST_ROOT)% $(DB_TOOL_INTEGRATION_TEST_ROOT)%,$(TEST_DIRS))

# go.opentelemetry.io/otel/sdk/metric@v0.31.0 - there are breaking changes in v0.32.0.
# github.com/urfave/cli/v2@v2.4.0 - needs to accept comma in values before unlocking https://github.com/urfave/cli/pull/1241.
Expand All @@ -89,26 +87,26 @@ PINNED_DEPENDENCIES := \
github.com/urfave/cli/v2@v2.4.0

# Code coverage output files.
COVER_ROOT := ./.coverage
UNIT_COVER_PROFILE := $(COVER_ROOT)/unit_coverprofile.out
INTEGRATION_COVER_PROFILE := $(COVER_ROOT)/integration_coverprofile.out
DB_TOOL_COVER_PROFILE := $(COVER_ROOT)/db_tool_coverprofile.out
INTEG_COVER_PROFILE := $(COVER_ROOT)/integ_$(PERSISTENCE_DRIVER)_coverprofile.out
INTEG_XDC_COVER_PROFILE := $(COVER_ROOT)/integ_xdc_$(PERSISTENCE_DRIVER)_coverprofile.out
INTEG_NDC_COVER_PROFILE := $(COVER_ROOT)/integ_ndc_$(PERSISTENCE_DRIVER)_coverprofile.out
SUMMARY_COVER_PROFILE := $(COVER_ROOT)/summary.out
COVER_ROOT := ./.coverage
UNIT_COVER_PROFILE := $(COVER_ROOT)/unit_coverprofile.out
INTEGRATION_COVER_PROFILE := $(COVER_ROOT)/integration_coverprofile.out
DB_TOOL_COVER_PROFILE := $(COVER_ROOT)/db_tool_coverprofile.out
FUNCTIONAL_COVER_PROFILE := $(COVER_ROOT)/functional_$(PERSISTENCE_DRIVER)_coverprofile.out
FUNCTIONAL_XDC_COVER_PROFILE := $(COVER_ROOT)/functional_xdc_$(PERSISTENCE_DRIVER)_coverprofile.out
FUNCTIONAL_NDC_COVER_PROFILE := $(COVER_ROOT)/functional_ndc_$(PERSISTENCE_DRIVER)_coverprofile.out
SUMMARY_COVER_PROFILE := $(COVER_ROOT)/summary.out

# DB
SQL_USER ?= temporal
SQL_PASSWORD ?= temporal

# Need the following option to have integration tests count towards coverage. godoc below:
# Need the following option to have integration and functional tests count towards coverage. godoc below:
# -coverpkg pkg1,pkg2,pkg3
# Apply coverage analysis in each test to the given list of packages.
# The default is for each test to analyze only the package being tested.
# Packages are specified as import paths.
INTEG_TEST_COVERPKG := -coverpkg="$(MODULE_ROOT)/client/...,$(MODULE_ROOT)/common/...,$(MODULE_ROOT)/service/..."

INTEGRATION_TEST_COVERPKG := -coverpkg="$(MODULE_ROOT)/common/persistence/...,$(MODULE_ROOT)/tools/..."
FUNCTIONAL_TEST_COVERPKG := -coverpkg="$(MODULE_ROOT)/client/...,$(MODULE_ROOT)/common/...,$(MODULE_ROOT)/service/...,$(MODULE_ROOT)/temporal/...,$(MODULE_ROOT)/tools/..."
##### Tools #####
update-checkers:
@printf $(COLOR) "Install/update check tools..."
Expand Down Expand Up @@ -265,29 +263,28 @@ unit-test: clean-test-results
@go test $(UNIT_TEST_DIRS) -timeout=$(TEST_TIMEOUT) $(TEST_TAG) -race | tee -a test.log
@! grep -q "^--- FAIL" test.log

db-integration-test: clean-test-results
integration-test: clean-test-results
@printf $(COLOR) "Run integration tests..."
@go test $(PERSISTENCE_INTEGRATION_TEST_ROOT) -timeout=$(TEST_TIMEOUT) $(TEST_TAG) | tee -a test.log
@go test $(DB_TOOL_INTEGRATION_TEST_ROOT) -timeout=$(TEST_TIMEOUT) $(TEST_TAG) | tee -a test.log
@go test $(INTEGRATION_TEST_DIRS) -timeout=$(TEST_TIMEOUT) $(TEST_TAG) -race | tee -a test.log
@! grep -q "^--- FAIL" test.log

# TODO: rename it to functional-test
integration-test: clean-test-results
@printf $(COLOR) "Run integration tests..."
@go test $(INTEG_TEST_DIRS) -timeout=$(TEST_TIMEOUT) $(TEST_TAG) -race | tee -a test.log
functional-test: clean-test-results
@printf $(COLOR) "Run functional tests..."
@go test $(FUNCTIONAL_TEST_ROOT) -timeout=$(TEST_TIMEOUT) $(TEST_TAG) -race | tee -a test.log
@go test $(FUNCTIONAL_TEST_NDC_ROOT) -timeout=$(TEST_TIMEOUT) $(TEST_TAG) -race | tee -a test.log
# Need to run xdc tests with race detector off because of ringpop bug causing data race issue.
@go test $(INTEG_TEST_XDC_ROOT) -timeout=$(TEST_TIMEOUT) $(TEST_TAG) | tee -a test.log
@go test $(FUNCTIONAL_TEST_XDC_ROOT) -timeout=$(TEST_TIMEOUT) $(TEST_TAG) | tee -a test.log
@! grep -q "^--- FAIL" test.log

# TODO: rename it to functional-test
integration-with-fault-injection-test: clean-test-results
functional-with-fault-injection-test: clean-test-results
@printf $(COLOR) "Run integration tests with fault injection..."
@go test $(INTEG_TEST_DIRS) -timeout=$(TEST_TIMEOUT) $(TEST_TAG) -race -PersistenceFaultInjectionRate=0.005 | tee -a test.log
@go test $(FUNCTIONAL_TEST_ROOT) -timeout=$(TEST_TIMEOUT) $(TEST_TAG) -race -PersistenceFaultInjectionRate=0.005 | tee -a test.log
@go test $(FUNCTIONAL_TEST_NDC_ROOT) -timeout=$(TEST_TIMEOUT) $(TEST_TAG) -race -PersistenceFaultInjectionRate=0.005 | tee -a test.log
# Need to run xdc tests with race detector off because of ringpop bug causing data race issue.
@go test $(INTEG_TEST_XDC_ROOT) -timeout=$(TEST_TIMEOUT) $(TEST_TAG) -PersistenceFaultInjectionRate=0.005 | tee -a test.log
@go test $(FUNCTIONAL_TEST_XDC_ROOT) -timeout=$(TEST_TIMEOUT) $(TEST_TAG) -PersistenceFaultInjectionRate=0.005 | tee -a test.log
@! grep -q "^--- FAIL" test.log

test: unit-test db-integration-test integration-test integration-with-fault-injection-test
test: unit-test integration-test functional-test functional-with-fault-injection-test

##### Coverage #####
$(COVER_ROOT):
Expand All @@ -296,27 +293,23 @@ $(COVER_ROOT):
unit-test-coverage: $(COVER_ROOT)
@printf $(COLOR) "Run unit tests with coverage..."
@echo "mode: atomic" > $(UNIT_COVER_PROFILE)
@go test ./$(UNIT_TEST_DIRS) -timeout=$(TEST_TIMEOUT) -race -coverprofile=$(UNIT_COVER_PROFILE) || exit 1;
@go test ./$(UNIT_TEST_DIRS) -timeout=$(TEST_TIMEOUT) -race $(TEST_TAG) -coverprofile=$(UNIT_COVER_PROFILE) || exit 1;

db-integration-test-coverage: $(COVER_ROOT)
integration-test-coverage: $(COVER_ROOT)
@printf $(COLOR) "Run integration tests with coverage..."
@go test $(PERSISTENCE_INTEGRATION_TEST_ROOT) -timeout=$(TEST_TIMEOUT) $(TEST_TAG) -coverpkg="./common/..." -coverprofile=$(INTEGRATION_COVER_PROFILE)
@go test $(DB_TOOL_INTEGRATION_TEST_ROOT) -timeout=$(TEST_TIMEOUT) $(TEST_TAG) -coverpkg="./tools/..." -coverprofile=$(DB_TOOL_COVER_PROFILE)
@go test $(INTEGRATION_TEST_DIRS) -timeout=$(TEST_TIMEOUT) $(TEST_TAG) $(INTEGRATION_TEST_COVERPKG) -coverprofile=$(INTEGRATION_COVER_PROFILE)

# TODO: rename it to functional-test
integration-test-coverage: $(COVER_ROOT)
@printf $(COLOR) "Run integration tests with coverage with $(PERSISTENCE_DRIVER) driver..."
@go test $(INTEG_TEST_ROOT) -timeout=$(TEST_TIMEOUT) -race $(TEST_TAG) -persistenceType=$(PERSISTENCE_TYPE) -persistenceDriver=$(PERSISTENCE_DRIVER) $(INTEG_TEST_COVERPKG) -coverprofile=$(INTEG_COVER_PROFILE)

# TODO: rename it to functional-test
integration-test-xdc-coverage: $(COVER_ROOT)
@printf $(COLOR) "Run integration test for cross DC with coverage with $(PERSISTENCE_DRIVER) driver..."
@go test $(INTEG_TEST_XDC_ROOT) -timeout=$(TEST_TIMEOUT) $(TEST_TAG) -persistenceType=$(PERSISTENCE_TYPE) -persistenceDriver=$(PERSISTENCE_DRIVER) $(INTEG_TEST_COVERPKG) -coverprofile=$(INTEG_XDC_COVER_PROFILE)

# TODO: rename it to functional-test
integration-test-ndc-coverage: $(COVER_ROOT)
@printf $(COLOR) "Run integration test for NDC with coverage with $(PERSISTENCE_DRIVER) driver..."
@go test $(INTEG_TEST_NDC_ROOT) -timeout=$(TEST_TIMEOUT) -race $(TEST_TAG) -persistenceType=$(PERSISTENCE_TYPE) -persistenceDriver=$(PERSISTENCE_DRIVER) $(INTEG_TEST_COVERPKG) -coverprofile=$(INTEG_NDC_COVER_PROFILE)
functional-test-coverage: $(COVER_ROOT)
@printf $(COLOR) "Run functional tests with coverage with $(PERSISTENCE_DRIVER) driver..."
@go test $(FUNCTIONAL_TEST_ROOT) -timeout=$(TEST_TIMEOUT) -race $(TEST_TAG) -persistenceType=$(PERSISTENCE_TYPE) -persistenceDriver=$(PERSISTENCE_DRIVER) $(FUNCTIONAL_TEST_COVERPKG) -coverprofile=$(FUNCTIONAL_COVER_PROFILE)

functional-test-xdc-coverage: $(COVER_ROOT)
@printf $(COLOR) "Run functional test for cross DC with coverage with $(PERSISTENCE_DRIVER) driver..."
@go test $(FUNCTIONAL_TEST_XDC_ROOT) -timeout=$(TEST_TIMEOUT) $(TEST_TAG) -persistenceType=$(PERSISTENCE_TYPE) -persistenceDriver=$(PERSISTENCE_DRIVER) $(FUNCTIONAL_TEST_COVERPKG) -coverprofile=$(FUNCTIONAL_XDC_COVER_PROFILE)

functional-test-ndc-coverage: $(COVER_ROOT)
@printf $(COLOR) "Run functional test for NDC with coverage with $(PERSISTENCE_DRIVER) driver..."
@go test $(FUNCTIONAL_TEST_NDC_ROOT) -timeout=$(TEST_TIMEOUT) -race $(TEST_TAG) -persistenceType=$(PERSISTENCE_TYPE) -persistenceDriver=$(PERSISTENCE_DRIVER) $(FUNCTIONAL_TEST_COVERPKG) -coverprofile=$(FUNCTIONAL_NDC_COVER_PROFILE)

.PHONY: $(SUMMARY_COVER_PROFILE)
$(SUMMARY_COVER_PROFILE): $(COVER_ROOT)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ We have a number of [HelloWorld type scenarios](https://github.com/temporalio/sa

### Use CLI

Use [Temporal's command line tool](https://docs.temporal.io/docs/system-tools/tctl) `tctl` to interact with the local Temporal server.
Use [Temporal's command line tool](https://docs.temporal.io/tctl-v1) `tctl` to interact with the local Temporal server.

```bash
alias tctl="docker exec temporal-admin-tools tctl"
Expand Down
6 changes: 3 additions & 3 deletions common/archiver/filestore/historyArchiver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import (

enumspb "go.temporal.io/api/enums/v1"

"go.temporal.io/server/tests/testhelper"
"go.temporal.io/server/tests/testutils"

"github.com/golang/mock/gomock"
"github.com/stretchr/testify/require"
Expand Down Expand Up @@ -355,7 +355,7 @@ func (s *historyArchiverSuite) TestArchive_Success() {
historyIterator.EXPECT().HasNext().Return(false),
)

dir := testhelper.MkdirTemp(s.T(), "", "TestArchiveSingleRead")
dir := testutils.MkdirTemp(s.T(), "", "TestArchiveSingleRead")

historyArchiver := s.newTestHistoryArchiver(historyIterator)
request := &archiver.ArchiveHistoryRequest{
Expand Down Expand Up @@ -538,7 +538,7 @@ func (s *historyArchiverSuite) TestArchiveAndGet() {
historyIterator.EXPECT().HasNext().Return(false),
)

dir := testhelper.MkdirTemp(s.T(), "", "TestArchiveAndGet")
dir := testutils.MkdirTemp(s.T(), "", "TestArchiveAndGet")

historyArchiver := s.newTestHistoryArchiver(historyIterator)
archiveRequest := &archiver.ArchiveHistoryRequest{
Expand Down
17 changes: 8 additions & 9 deletions common/archiver/filestore/util_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ import (
"testing"
"time"

"go.temporal.io/server/tests/testhelper"

"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
enumspb "go.temporal.io/api/enums/v1"
Expand All @@ -40,6 +38,7 @@ import (
"go.temporal.io/server/common"
"go.temporal.io/server/common/archiver"
"go.temporal.io/server/common/codec"
"go.temporal.io/server/tests/testutils"
)

const (
Expand All @@ -61,7 +60,7 @@ func (s *UtilSuite) SetupTest() {
}

func (s *UtilSuite) TestFileExists() {
dir := testhelper.MkdirTemp(s.T(), "", "TestFileExists")
dir := testutils.MkdirTemp(s.T(), "", "TestFileExists")
s.assertDirectoryExists(dir)

exists, err := fileExists(dir)
Expand All @@ -80,7 +79,7 @@ func (s *UtilSuite) TestFileExists() {
}

func (s *UtilSuite) TestDirectoryExists() {
dir := testhelper.MkdirTemp(s.T(), "", "TestDirectoryExists")
dir := testutils.MkdirTemp(s.T(), "", "TestDirectoryExists")
s.assertDirectoryExists(dir)

subdir := "subdir"
Expand All @@ -97,7 +96,7 @@ func (s *UtilSuite) TestDirectoryExists() {
}

func (s *UtilSuite) TestMkdirAll() {
dir := testhelper.MkdirTemp(s.T(), "", "TestMkdirAll")
dir := testutils.MkdirTemp(s.T(), "", "TestMkdirAll")
s.assertDirectoryExists(dir)

s.NoError(mkdirAll(dir, testDirMode))
Expand All @@ -116,7 +115,7 @@ func (s *UtilSuite) TestMkdirAll() {
}

func (s *UtilSuite) TestWriteFile() {
dir := testhelper.MkdirTemp(s.T(), "", "TestWriteFile")
dir := testutils.MkdirTemp(s.T(), "", "TestWriteFile")
s.assertDirectoryExists(dir)

filename := "test-file-name"
Expand All @@ -134,7 +133,7 @@ func (s *UtilSuite) TestWriteFile() {
}

func (s *UtilSuite) TestReadFile() {
dir := testhelper.MkdirTemp(s.T(), "", "TestReadFile")
dir := testutils.MkdirTemp(s.T(), "", "TestReadFile")
s.assertDirectoryExists(dir)

filename := "test-file-name"
Expand All @@ -151,7 +150,7 @@ func (s *UtilSuite) TestReadFile() {
}

func (s *UtilSuite) TestListFilesByPrefix() {
dir := testhelper.MkdirTemp(s.T(), "", "TestListFiles")
dir := testutils.MkdirTemp(s.T(), "", "TestListFiles")
s.assertDirectoryExists(dir)

filename := "test-file-name"
Expand Down Expand Up @@ -214,7 +213,7 @@ func (s *UtilSuite) TestEncodeDecodeHistoryBatches() {
}

func (s *UtilSuite) TestValidateDirPath() {
dir := testhelper.MkdirTemp(s.T(), "", "TestValidateDirPath")
dir := testutils.MkdirTemp(s.T(), "", "TestValidateDirPath")
s.assertDirectoryExists(dir)
filename := "test-file-name"
s.createFile(dir, filename)
Expand Down
7 changes: 3 additions & 4 deletions common/archiver/filestore/visibilityArchiver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ import (
"testing"
"time"

"go.temporal.io/server/tests/testhelper"

"github.com/golang/mock/gomock"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
Expand All @@ -51,6 +49,7 @@ import (
"go.temporal.io/server/common/log"
"go.temporal.io/server/common/payload"
"go.temporal.io/server/common/primitives/timestamp"
"go.temporal.io/server/tests/testutils"
)

const (
Expand Down Expand Up @@ -166,7 +165,7 @@ func (s *visibilityArchiverSuite) TestArchive_Fail_NonRetryableErrorOption() {
}

func (s *visibilityArchiverSuite) TestArchive_Success() {
dir := testhelper.MkdirTemp(s.T(), "", "TestVisibilityArchive")
dir := testutils.MkdirTemp(s.T(), "", "TestVisibilityArchive")

visibilityArchiver := s.newTestVisibilityArchiver()
closeTimestamp := timestamp.TimeNowPtrUtc()
Expand Down Expand Up @@ -472,7 +471,7 @@ func (s *visibilityArchiverSuite) TestQuery_Success_SmallPageSize() {
}

func (s *visibilityArchiverSuite) TestArchiveAndQuery() {
dir := testhelper.MkdirTemp(s.T(), "", "TestArchiveAndQuery")
dir := testutils.MkdirTemp(s.T(), "", "TestArchiveAndQuery")

visibilityArchiver := s.newTestVisibilityArchiver()
mockParser := NewMockQueryParser(s.controller)
Expand Down
2 changes: 1 addition & 1 deletion common/archiver/gcloud/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Google Storage blobstore
## Configuration
See https://cloud.google.com/docs/authentication/production to understand how is made the authentication against google cloud storage
See https://cloud.google.com/docs/authentication#service-accounts to understand how is made the authentication against google cloud storage

Nowdays we support three different ways in order to let Temporal know where your google keyfile credentials are located

Expand Down
2 changes: 1 addition & 1 deletion common/archiver/s3store/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ s3://<bucket-name>/<namespace-id>/
```

## Using localstack for local development
1. Install awscli from [here](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-install.html)
1. Install awscli from [here](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html)
2. Install localstack from [here](https://github.com/localstack/localstack#installing)
3. Launch localstack with `SERVICES=s3 localstack start`
4. Create a bucket using `aws --endpoint-url=http://localhost:4572 s3 mb s3://temporal-development`
Expand Down
8 changes: 0 additions & 8 deletions common/authorization/default_authorizer.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,6 @@ var resultDeny = Result{Decision: DecisionDeny}

func (a *defaultAuthorizer) Authorize(_ context.Context, claims *Claims, target *CallTarget) (Result, error) {

// TODO: This is a temporary workaround to allow calls to system namespace and
// calls with no namespace to pass through. When handling of mTLS data is added,
// we should remove "temporal-system" from here. Handling of call with
// no namespace will need to be performed at the API level, so that data would
// be filtered based of caller's permissions to namespaces and system.
if target.Namespace == "temporal-system" || target.Namespace == "" {
return resultAllow, nil
}
if claims == nil {
return resultDeny, nil
}
Expand Down
Loading

0 comments on commit 649eb5c

Please # to comment.