~maas-committers/maas/+git/temporal:snowden/bean

Last commit made on 2023-10-19
Get this branch:
git clone -b snowden/bean https://git.launchpad.net/~maas-committers/maas/+git/temporal

Branch merges

Branch information

Name:
snowden/bean
Repository:
lp:~maas-committers/maas/+git/temporal

Recent commits

31870e2... by Michael

Get rid of persistence/client.Bean

5baf273... by Michael Snowden <email address hidden>

Extract new queues.DLQWriter type (#5002)

<!-- Describe what has changed in this PR -->
**What changed?**
I extracted a `DLQWriter` from our `ExecutableDLQ` type in the `queues`
package.

<!-- Tell your future self why have you made these changes -->
**Why?**
For the replication DLQ, we don't want `ExecutableDLQ` because
replication tasks track their state in a different way, and so they have
an explicit `MarkPoisonPill` method. The `ExecutableDLQ` currently does
2 things:

1. Track whether this executable failed with a terminal error
2. If it did, try sending the task to the DLQ whenever we execute again

So, for replication tasks, I only need the second part. I went ahead and
extracted that to its own type as some preparatory refactoring for the
replication DLQ change.

<!-- How have you verified this change? Tested locally? Added a unit
test? Checked in staging env? -->
**How did you test it?**
This is already fully tested by `executable_dlq_test.go`.

<!-- Assuming the worst case, what can be broken when deploying this
change to production? -->
**Potential risks**

<!-- Is this PR a hotfix candidate or require that a notification be
sent to the broader community? (Yes/No) -->
**Is hotfix candidate?**

f244dcd... by Will Duan <email address hidden>

Fix replication task batching dc config (#5004)

<!-- Describe what has changed in this PR -->
**What changed?**
Fix replication task batching dc config

<!-- Tell your future self why have you made these changes -->
**Why?**
Reverse the logic.

<!-- How have you verified this change? Tested locally? Added a unit
test? Checked in staging env? -->
**How did you test it?**
test in local

<!-- Assuming the worst case, what can be broken when deploying this
change to production? -->
**Potential risks**
n/a

<!-- Is this PR a hotfix candidate or require that a notification be
sent to the broader community? (Yes/No) -->
**Is hotfix candidate?**
n/a

068bd38... by Stephan Behnke <email address hidden>

Single metric for commands in History Service (#4995)

<!-- Describe what has changed in this PR -->
**What changed?**

(1) Added new single metric to track _all_ commands coming into the
History Service.
(2) Marked previous per-command-metrics as deprecated (will be removed
in future release).
(3) Added namespace tag to metric.

<!-- Tell your future self why have you made these changes -->
**Why?**

Fixes https://github.com/temporalio/temporal/issues/4628

<!-- How have you verified this change? Tested locally? Added a unit
test? Checked in staging env? -->
**How did you test it?**

Used the debugger to inspect during a test:

![Screenshot 2023-10-17 at 4 38 25
PM](https://github.com/temporalio/temporal/assets/159852/0eb09b1a-27e3-4189-969e-c613fba4c67b)

Is there a better way?

<!-- Assuming the worst case, what can be broken when deploying this
change to production? -->
**Potential risks**

<!-- Is this PR a hotfix candidate or require that a notification be
sent to the broader community? (Yes/No) -->
**Is hotfix candidate?**

No

b8f2123... by Haifeng He <email address hidden>

Reuse cached RemoteAdminClient in VerifyReplicationTasks (#4997)

<!-- Describe what has changed in this PR -->
**What changed?**
Current code create a new AdminClient for every VerifyReplicationTasks
activity invocation. Since there is no way to close a connection, it
caused a leak. This change uses cached version for creating AdminClient.

<!-- Tell your future self why have you made these changes -->
**Why?**

<!-- How have you verified this change? Tested locally? Added a unit
test? Checked in staging env? -->
**How did you test it?**
unit tests + local cluster tests

<!-- Assuming the worst case, what can be broken when deploying this
change to production? -->
**Potential risks**

<!-- Is this PR a hotfix candidate or require that a notification be
sent to the broader community? (Yes/No) -->
**Is hotfix candidate?**

9b1b6f9... by Yu Xia <email address hidden>

Add refresh task for close workflow (#4999)

<!-- Describe what has changed in this PR -->
**What changed?**
Add refresh task for close workflow

<!-- Tell your future self why have you made these changes -->
**Why?**
Add refresh task for close workflow

<!-- How have you verified this change? Tested locally? Added a unit
test? Checked in staging env? -->
**How did you test it?**
This is a subset of refresh all tasks

<!-- Assuming the worst case, what can be broken when deploying this
change to production? -->
**Potential risks**

<!-- Is this PR a hotfix candidate or require that a notification be
sent to the broader community? (Yes/No) -->
**Is hotfix candidate?**

f65084a... by Yichao Yang <email address hidden>

Lock get current execution for API requests (#4970)

47a900f... by Stephan Behnke <email address hidden>

silence verbose `proto` target (#4988)

<!-- Describe what has changed in this PR -->
**What changed?**

The make target `proto` is quieter now when it succeeds (like most of
our other Makefile targets).

### After

```
$ make proto
Run buf linter...
Run api-linter...
Build proto files...
Run goimports for proto files...
Generate proto mocks...
Update license headers for proto files...
```

### Before

```
$ make proto
Install proto submodule...
git submodule update --init proto/api
Run buf linter...
Run api-linter...
- file_path: temporal/server/api/token/v1/message.proto
  problems: []
- file_path: temporal/server/api/metrics/v1/message.proto
  problems: []
- file_path: temporal/server/api/taskqueue/v1/message.proto
  problems: []
- file_path: temporal/server/api/cluster/v1/message.proto
  problems: []
- file_path: temporal/server/api/schedule/v1/message.proto
  problems: []
- file_path: temporal/server/api/update/v1/message.proto
  problems: []
- file_path: temporal/server/api/matchingservice/v1/service.proto
  problems: []
- file_path: temporal/server/api/matchingservice/v1/request_response.proto
  problems: []
- file_path: temporal/server/api/enums/v1/workflow_task_type.proto
  problems: []
- file_path: temporal/server/api/enums/v1/task.proto
  problems: []
- file_path: temporal/server/api/enums/v1/cluster.proto
  problems: []
- file_path: temporal/server/api/enums/v1/predicate.proto
  problems: []
- file_path: temporal/server/api/enums/v1/replication.proto
  problems: []
- file_path: temporal/server/api/enums/v1/workflow.proto
  problems: []
- file_path: temporal/server/api/enums/v1/common.proto
  problems: []
- file_path: temporal/server/api/archiver/v1/message.proto
  problems: []
- file_path: temporal/server/api/namespace/v1/message.proto
  problems: []
- file_path: temporal/server/api/cli/v1/message.proto
  problems: []
- file_path: temporal/server/api/historyservice/v1/service.proto
  problems: []
- file_path: temporal/server/api/historyservice/v1/request_response.proto
  problems: []
- file_path: temporal/server/api/workflow/v1/message.proto
  problems: []
- file_path: temporal/server/api/persistence/v1/task_queues.proto
  problems: []
- file_path: temporal/server/api/persistence/v1/predicates.proto
  problems: []
- file_path: temporal/server/api/persistence/v1/cluster_metadata.proto
  problems: []
- file_path: temporal/server/api/persistence/v1/tasks.proto
  problems: []
- file_path: temporal/server/api/persistence/v1/executions.proto
  problems: []
- file_path: temporal/server/api/persistence/v1/history_tree.proto
  problems: []
- file_path: temporal/server/api/persistence/v1/namespaces.proto
  problems: []
- file_path: temporal/server/api/persistence/v1/queue_metadata.proto
  problems: []
- file_path: temporal/server/api/persistence/v1/queues.proto
  problems: []
- file_path: temporal/server/api/persistence/v1/workflow_mutable_state.proto
  problems: []
- file_path: temporal/server/api/history/v1/message.proto
  problems: []
- file_path: temporal/server/api/replication/v1/message.proto
  problems: []
- file_path: temporal/server/api/checksum/v1/message.proto
  problems: []
- file_path: temporal/server/api/errordetails/v1/message.proto
  problems: []
- file_path: temporal/server/api/clock/v1/message.proto
  problems: []
- file_path: temporal/server/api/adminservice/v1/service.proto
  problems: []
- file_path: temporal/server/api/adminservice/v1/request_response.proto
  problems: []
Build proto files...
protoc --fatal_warnings -I=proto/internal -I=proto/api -I=../golang<email address hidden>/protobuf --gogoslick_out=Mgoogle/protobuf/descriptor.proto=github.com/golang/protobuf/protoc-gen-go/descriptor,Mgoogle/protobuf/duration.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/wrappers.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/timestamp.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/empty.proto=github.com/gogo/protobuf/types,plugins=grpc,paths=source_relative:api ./proto/internal/temporal/server/api/adminservice/v1/*.proto
protoc --fatal_warnings -I=proto/internal -I=proto/api -I=../golang<email address hidden>/protobuf --gogoslick_out=Mgoogle/protobuf/descriptor.proto=github.com/golang/protobuf/protoc-gen-go/descriptor,Mgoogle/protobuf/duration.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/wrappers.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/timestamp.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/empty.proto=github.com/gogo/protobuf/types,plugins=grpc,paths=source_relative:api ./proto/internal/temporal/server/api/archiver/v1/*.proto
protoc --fatal_warnings -I=proto/internal -I=proto/api -I=../golang<email address hidden>/protobuf --gogoslick_out=Mgoogle/protobuf/descriptor.proto=github.com/golang/protobuf/protoc-gen-go/descriptor,Mgoogle/protobuf/duration.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/wrappers.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/timestamp.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/empty.proto=github.com/gogo/protobuf/types,plugins=grpc,paths=source_relative:api ./proto/internal/temporal/server/api/checksum/v1/*.proto
protoc --fatal_warnings -I=proto/internal -I=proto/api -I=../golang<email address hidden>/protobuf --gogoslick_out=Mgoogle/protobuf/descriptor.proto=github.com/golang/protobuf/protoc-gen-go/descriptor,Mgoogle/protobuf/duration.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/wrappers.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/timestamp.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/empty.proto=github.com/gogo/protobuf/types,plugins=grpc,paths=source_relative:api ./proto/internal/temporal/server/api/cli/v1/*.proto
protoc --fatal_warnings -I=proto/internal -I=proto/api -I=../golang<email address hidden>/protobuf --gogoslick_out=Mgoogle/protobuf/descriptor.proto=github.com/golang/protobuf/protoc-gen-go/descriptor,Mgoogle/protobuf/duration.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/wrappers.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/timestamp.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/empty.proto=github.com/gogo/protobuf/types,plugins=grpc,paths=source_relative:api ./proto/internal/temporal/server/api/clock/v1/*.proto
protoc --fatal_warnings -I=proto/internal -I=proto/api -I=../golang<email address hidden>/protobuf --gogoslick_out=Mgoogle/protobuf/descriptor.proto=github.com/golang/protobuf/protoc-gen-go/descriptor,Mgoogle/protobuf/duration.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/wrappers.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/timestamp.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/empty.proto=github.com/gogo/protobuf/types,plugins=grpc,paths=source_relative:api ./proto/internal/temporal/server/api/cluster/v1/*.proto
protoc --fatal_warnings -I=proto/internal -I=proto/api -I=../golang<email address hidden>/protobuf --gogoslick_out=Mgoogle/protobuf/descriptor.proto=github.com/golang/protobuf/protoc-gen-go/descriptor,Mgoogle/protobuf/duration.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/wrappers.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/timestamp.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/empty.proto=github.com/gogo/protobuf/types,plugins=grpc,paths=source_relative:api ./proto/internal/temporal/server/api/enums/v1/*.proto
protoc --fatal_warnings -I=proto/internal -I=proto/api -I=../golang<email address hidden>/protobuf --gogoslick_out=Mgoogle/protobuf/descriptor.proto=github.com/golang/protobuf/protoc-gen-go/descriptor,Mgoogle/protobuf/duration.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/wrappers.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/timestamp.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/empty.proto=github.com/gogo/protobuf/types,plugins=grpc,paths=source_relative:api ./proto/internal/temporal/server/api/errordetails/v1/*.proto
protoc --fatal_warnings -I=proto/internal -I=proto/api -I=../golang<email address hidden>/protobuf --gogoslick_out=Mgoogle/protobuf/descriptor.proto=github.com/golang/protobuf/protoc-gen-go/descriptor,Mgoogle/protobuf/duration.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/wrappers.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/timestamp.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/empty.proto=github.com/gogo/protobuf/types,plugins=grpc,paths=source_relative:api ./proto/internal/temporal/server/api/history/v1/*.proto
protoc --fatal_warnings -I=proto/internal -I=proto/api -I=../golang<email address hidden>/protobuf --gogoslick_out=Mgoogle/protobuf/descriptor.proto=github.com/golang/protobuf/protoc-gen-go/descriptor,Mgoogle/protobuf/duration.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/wrappers.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/timestamp.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/empty.proto=github.com/gogo/protobuf/types,plugins=grpc,paths=source_relative:api ./proto/internal/temporal/server/api/historyservice/v1/*.proto
protoc --fatal_warnings -I=proto/internal -I=proto/api -I=../golang<email address hidden>/protobuf --gogoslick_out=Mgoogle/protobuf/descriptor.proto=github.com/golang/protobuf/protoc-gen-go/descriptor,Mgoogle/protobuf/duration.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/wrappers.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/timestamp.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/empty.proto=github.com/gogo/protobuf/types,plugins=grpc,paths=source_relative:api ./proto/internal/temporal/server/api/matchingservice/v1/*.proto
protoc --fatal_warnings -I=proto/internal -I=proto/api -I=../golang<email address hidden>/protobuf --gogoslick_out=Mgoogle/protobuf/descriptor.proto=github.com/golang/protobuf/protoc-gen-go/descriptor,Mgoogle/protobuf/duration.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/wrappers.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/timestamp.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/empty.proto=github.com/gogo/protobuf/types,plugins=grpc,paths=source_relative:api ./proto/internal/temporal/server/api/metrics/v1/*.proto
protoc --fatal_warnings -I=proto/internal -I=proto/api -I=../golang<email address hidden>/protobuf --gogoslick_out=Mgoogle/protobuf/descriptor.proto=github.com/golang/protobuf/protoc-gen-go/descriptor,Mgoogle/protobuf/duration.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/wrappers.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/timestamp.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/empty.proto=github.com/gogo/protobuf/types,plugins=grpc,paths=source_relative:api ./proto/internal/temporal/server/api/namespace/v1/*.proto
protoc --fatal_warnings -I=proto/internal -I=proto/api -I=../golang<email address hidden>/protobuf --gogoslick_out=Mgoogle/protobuf/descriptor.proto=github.com/golang/protobuf/protoc-gen-go/descriptor,Mgoogle/protobuf/duration.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/wrappers.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/timestamp.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/empty.proto=github.com/gogo/protobuf/types,plugins=grpc,paths=source_relative:api ./proto/internal/temporal/server/api/persistence/v1/*.proto
protoc --fatal_warnings -I=proto/internal -I=proto/api -I=../golang<email address hidden>/protobuf --gogoslick_out=Mgoogle/protobuf/descriptor.proto=github.com/golang/protobuf/protoc-gen-go/descriptor,Mgoogle/protobuf/duration.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/wrappers.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/timestamp.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/empty.proto=github.com/gogo/protobuf/types,plugins=grpc,paths=source_relative:api ./proto/internal/temporal/server/api/replication/v1/*.proto
protoc --fatal_warnings -I=proto/internal -I=proto/api -I=../golang<email address hidden>/protobuf --gogoslick_out=Mgoogle/protobuf/descriptor.proto=github.com/golang/protobuf/protoc-gen-go/descriptor,Mgoogle/protobuf/duration.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/wrappers.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/timestamp.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/empty.proto=github.com/gogo/protobuf/types,plugins=grpc,paths=source_relative:api ./proto/internal/temporal/server/api/schedule/v1/*.proto
protoc --fatal_warnings -I=proto/internal -I=proto/api -I=../golang<email address hidden>/protobuf --gogoslick_out=Mgoogle/protobuf/descriptor.proto=github.com/golang/protobuf/protoc-gen-go/descriptor,Mgoogle/protobuf/duration.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/wrappers.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/timestamp.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/empty.proto=github.com/gogo/protobuf/types,plugins=grpc,paths=source_relative:api ./proto/internal/temporal/server/api/taskqueue/v1/*.proto
protoc --fatal_warnings -I=proto/internal -I=proto/api -I=../golang<email address hidden>/protobuf --gogoslick_out=Mgoogle/protobuf/descriptor.proto=github.com/golang/protobuf/protoc-gen-go/descriptor,Mgoogle/protobuf/duration.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/wrappers.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/timestamp.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/empty.proto=github.com/gogo/protobuf/types,plugins=grpc,paths=source_relative:api ./proto/internal/temporal/server/api/token/v1/*.proto
protoc --fatal_warnings -I=proto/internal -I=proto/api -I=../golang<email address hidden>/protobuf --gogoslick_out=Mgoogle/protobuf/descriptor.proto=github.com/golang/protobuf/protoc-gen-go/descriptor,Mgoogle/protobuf/duration.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/wrappers.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/timestamp.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/empty.proto=github.com/gogo/protobuf/types,plugins=grpc,paths=source_relative:api ./proto/internal/temporal/server/api/update/v1/*.proto
protoc --fatal_warnings -I=proto/internal -I=proto/api -I=../golang<email address hidden>/protobuf --gogoslick_out=Mgoogle/protobuf/descriptor.proto=github.com/golang/protobuf/protoc-gen-go/descriptor,Mgoogle/protobuf/duration.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/wrappers.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/timestamp.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/empty.proto=github.com/gogo/protobuf/types,plugins=grpc,paths=source_relative:api ./proto/internal/temporal/server/api/workflow/v1/*.proto
mv -f api/temporal/server/api/* api && rm -rf api/temporal
Run goimports for proto files...
Generate proto mocks...
cd api && mockgen -copyright_file ../LICENSE -package matchingservicemock -source matchingservice/v1/service.pb.go -destination matchingservicemock/v1/service.pb.mock.go
cd api && mockgen -copyright_file ../LICENSE -package historyservicemock -source historyservice/v1/service.pb.go -destination historyservicemock/v1/service.pb.mock.go
cd api && mockgen -copyright_file ../LICENSE -package adminservicemock -source adminservice/v1/service.pb.go -destination adminservicemock/v1/service.pb.mock.go
Update license headers for proto files...
```

<!-- Tell your future self why have you made these changes -->
**Why?**

Success output shouldn't be verbose; error output should be.

<!-- How have you verified this change? Tested locally? Added a unit
test? Checked in staging env? -->
**How did you test it?**

- [x] happy case (no errors)
- [x] linter errors: errors are still printed and target fails

<!-- Assuming the worst case, what can be broken when deploying this
change to production? -->
**Potential risks**

Targets silently breaking?

<!-- Is this PR a hotfix candidate or require that a notification be
sent to the broader community? (Yes/No) -->
**Is hotfix candidate?**

No

5ea0c14... by Yu Xia <email address hidden>

Fix misspelled word (#4993)

<!-- Describe what has changed in this PR -->
**What changed?**
apple -> applied

<!-- Tell your future self why have you made these changes -->
**Why?**

<!-- How have you verified this change? Tested locally? Added a unit
test? Checked in staging env? -->
**How did you test it?**

<!-- Assuming the worst case, what can be broken when deploying this
change to production? -->
**Potential risks**

<!-- Is this PR a hotfix candidate or require that a notification be
sent to the broader community? (Yes/No) -->
**Is hotfix candidate?**

eda8e9a... by Jacob LeGrone <email address hidden>

Migrate temporalite & temporaltest packages (#4026)

<!-- Describe what has changed in this PR -->
**What changed?**

Moved `temporalite` and `temporaltest` packages from Temporalite. This
is an alternate version of
https://github.com/temporalio/temporal/pull/4006.

<!-- Tell your future self why have you made these changes -->
**Why?**

Step 1 in the plan to deprecate the Temporalite repository:
https://github.com/temporalio/temporalite/issues/202

<!-- How have you verified this change? Tested locally? Added a unit
test? Checked in staging env? -->
**How did you test it?**

`go test ./temporaltest`

<!-- Assuming the worst case, what can be broken when deploying this
change to production? -->
**Potential risks**

A non-semver-breaking backwards compatibility guarantee is being
included in the new packages which we would need to abide by. For now
only the `temporaltest` package is public, so we are free to perform
additional refactoring on `temporalite` and potentially consolidate it
into a simple set of `temporal.ServerOption` functions.

<!-- Is this PR a hotfix candidate or require that a notification be
sent to the broader community? (Yes/No) -->
**Is hotfix candidate?**

No

---------

Co-authored-by: Yimin Chen <email address hidden>