Skip to content

Commit b8066d1

Browse files
authored
Merge branch 'master' into sticky-fix
2 parents 7e55e71 + fd9956a commit b8066d1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+2666
-255
lines changed

.buildkite/pipeline.yml

-20
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,6 @@ container:
3535
agents:
3636
queue: "buildkite-gcp"
3737
steps:
38-
- label: "fossa analyze"
39-
command: ".buildkite/scripts/fossa.sh"
40-
4138
- label: ":golang: unit-test"
4239
artifact_paths:
4340
- ".build/*/coverage/*.out"
@@ -136,20 +133,3 @@ steps:
136133
- docker-compose#v3.0.0:
137134
run: integ-test-grpc
138135
config: docker/buildkite/docker-compose.yml
139-
140-
- wait
141-
142-
- label: ":golang: code-coverage"
143-
plugins:
144-
- kubernetes:
145-
<<: *kubernetes
146-
podSpec:
147-
<<: *podSpec
148-
containers:
149-
- <<: *commandContainer
150-
command:
151-
- |-
152-
.buildkite/scripts/gocov.sh
153-
- docker-compose#v3.0.0:
154-
run: coverage-report
155-
config: docker/buildkite/docker-compose.yml

.buildkite/scripts/gocov.sh

-16
This file was deleted.

.gen/go/shared/shared.go

+140-8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
**Detailed Description**
2+
[In-depth description of the changes made to the interfaces, specifying new fields, removed fields, or modified data structures]
3+
4+
**Impact Analysis**
5+
- **Backward Compatibility**: [Analysis of backward compatibility]
6+
- **Forward Compatibility**: [Analysis of forward compatibility]
7+
8+
**Testing Plan**
9+
- **Unit Tests**: [Do we have unit test covering the change?]
10+
- **Persistence Tests**: [If the change is related to a data type which is persisted, do we have persistence tests covering the change?]
11+
- **Integration Tests**: [Do we have integration test covering the change?]
12+
- **Compatibility Tests**: [Have we done tests to test the backward and forward compatibility?]
13+
14+
**Rollout Plan**
15+
- What is the rollout plan?
16+
- Does the order of deployment matter?
17+
- Is it safe to rollback? Does the order of rollback matter?
18+
- Is there a kill switch to mitigate the impact immediately?
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Workflow for Breaking Change Reminder
2+
on:
3+
pull_request:
4+
paths:
5+
# below files do not cover all the exposed types/funcs, but it's a good start to detect potentially breaking changes
6+
- activity/activity.go
7+
- client/client.go
8+
- encoded/encoded.go
9+
- interceptors/workflow_interceptor.go
10+
- internal/activity.go
11+
- internal/client.go
12+
- internal/encoded.go
13+
- internal/workflow.go
14+
- internal/interceptors.go
15+
- internal/worker.go
16+
- internal/workflow.go
17+
- worker/worker.go
18+
- workflow/*.go
19+
20+
jobs:
21+
breaking-change-pr-template-reminder:
22+
runs-on: ubuntu-latest
23+
24+
steps:
25+
- name: Checkout
26+
uses: actions/checkout@v4
27+
with:
28+
fetch-depth: 0
29+
30+
- name: Fail if PR description is missing breaking change template
31+
if: steps.pr-changes.outputs.changes != '[]'
32+
run: |
33+
PR_NUMBER=${{ github.event.pull_request.number }}
34+
PR_URL="https://api.github.com/repos/${{ github.repository }}/pulls/${PR_NUMBER}"
35+
BODY=$(curl $PR_URL | jq '.body')
36+
CHECKLIST=(
37+
"Detailed Description"
38+
"Impact Analysis"
39+
"Testing Plan"
40+
"Rollout Plan"
41+
)
42+
TEMPLATE=$(cat .github/workflows/breaking_change_pr_template.md)
43+
44+
for i in "${CHECKLIST[@]}"; do
45+
if [[ "$BODY" == *"$i"* ]]; then
46+
continue
47+
else
48+
echo "Potential breaking changes detected! Please update the PR description to include following template:"
49+
echo "---"
50+
echo "$TEMPLATE"
51+
echo "---"
52+
exit 1
53+
fi
54+
done

.github/workflows/codecov.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
run: make unit_test
2323

2424
- name: Upload coverage reports to Codecov
25-
uses: codecov/codecov-action@v4.0.1 # https://github.com/codecov/codecov-action
25+
uses: codecov/codecov-action@v4.5.0 # https://github.com/codecov/codecov-action
2626
with:
2727
file: .build/cover.out
2828
exclude: ./

.travis.yml

-36
This file was deleted.

CHANGELOG.md

+35
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,41 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

77
## [Unreleased]
8+
## [v1.2.10] - 2024-07-10
9+
### Added
10+
- Revert "Handle panics while polling for tasks (#1352)" (#1357)
11+
- Remove coveralls integration (#1354)
12+
- Change registry Apis signature to return info interface (#1355)
13+
- Adjust startedCount assertion in Test_WorkflowLocalActivityWithMockAndListeners (#1353)
14+
- Handle panics while polling for tasks (#1352)
15+
- Ensure PR description follows a template when potential breaking changes are made (#1351)
16+
- Add tests for replayer utils isDecisionMatchEvent (#1350)
17+
- Adding tests for internal_workflow_client (#1349)
18+
- Extracting domain client to a separate file (#1348)
19+
- Test for GetWorkflowHistory (#1346)
20+
- Added test for TerminateWorkflow in the internal package (#1345)
21+
- Implement the registered workflows and activities APIs in testsuite (#1343)
22+
- Add methods on Worker to get registered workflows and activities (#1342)
23+
- Update compability adapter to support new enum value (#1337)
24+
- Bump x/tools for tools, to support go 1.22 (#1336)
25+
- Added an option to exclude the list of workflows by Type (#1335)
26+
- Migrate CI from AWS queues to Google Kubernetes Engine queues (#1333)
27+
- Internal workflow client test improvements (#1331)
28+
- Update client wrappers with new async APIs (#1327)
29+
- Server-like `make build` and ensuring builds are clean in CI (#1329)
30+
- Pin mockery and regenerate everything (#1328)
31+
- Enforce 85% new line coverage (#1325)
32+
- Add documentation for propagators and how they are executed (#1312)
33+
- Update idl and add wrapper implementaton for async start/signalwithstart APIs (#1321)
34+
- Enable codecov and generate metadata file as artifact (#1320)
35+
- Release v1.2.9 (#1317)
36+
37+
### Fixed
38+
- Partial fix for Continue as new case (#1347)
39+
- Fixing unit_test failure detection, and tests for data converters (#1341)
40+
- Fix coverage metadata commit info (#1323)
41+
42+
843
## [v1.2.9] - 2024-03-01
944
### Added
1045
- retract directive for v1.2.8

Makefile

+4-8
Original file line numberDiff line numberDiff line change
@@ -369,20 +369,19 @@ INTEG_GRPC_COVER_FILE := $(COVER_ROOT)/integ_test_grpc_cover.out
369369

370370
UT_DIRS := $(filter-out $(INTEG_TEST_ROOT)%, $(sort $(dir $(filter %_test.go,$(ALL_SRC)))))
371371

372-
.PHONY: unit_test integ_test_sticky_off integ_test_sticky_on integ_test_grpc cover cover_ci
372+
.PHONY: unit_test integ_test_sticky_off integ_test_sticky_on integ_test_grpc cover
373373
test: unit_test integ_test_sticky_off integ_test_sticky_on ## run all tests (requires a running cadence instance)
374374

375375
unit_test: $(ALL_SRC) ## run all unit tests
376376
$Q mkdir -p $(COVER_ROOT)
377377
$Q echo "mode: atomic" > $(UT_COVER_FILE)
378-
$Q failed=0; \
378+
$Q FAIL=""; \
379379
for dir in $(UT_DIRS); do \
380380
mkdir -p $(COVER_ROOT)/"$$dir"; \
381-
go test "$$dir" $(TEST_ARG) -coverprofile=$(COVER_ROOT)/"$$dir"/cover.out || failed=1; \
381+
go test "$$dir" $(TEST_ARG) -coverprofile=$(COVER_ROOT)/"$$dir"/cover.out || FAIL="$$FAIL $$dir"; \
382382
cat $(COVER_ROOT)/"$$dir"/cover.out | grep -v "mode: atomic" >> $(UT_COVER_FILE); \
383-
done; \
383+
done; test -z "$$FAIL" || (echo "Failed packages; $$FAIL"; exit 1)
384384
cat $(UT_COVER_FILE) > .build/cover.out;
385-
exit $$failed
386385

387386
integ_test_sticky_off: $(ALL_SRC)
388387
$Q mkdir -p $(COVER_ROOT)
@@ -410,6 +409,3 @@ coverage_report: $(COVER_ROOT)/cover.out
410409

411410
cover: $(COVER_ROOT)/cover.out
412411
go tool cover -html=$(COVER_ROOT)/cover.out;
413-
414-
cover_ci: $(COVER_ROOT)/cover.out $(BIN)/goveralls
415-
$(BIN)/goveralls -coverprofile=$(COVER_ROOT)/cover.out -service=buildkite || echo -e "\x1b[31mCoveralls failed\x1b[m";

README.md

+6-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
# Go framework for Cadence [![Build Status](https://badge.buildkite.com/e7241785444519bdfd1defc68839fd19a89c15adb3477c73f7.svg?theme=github&branch=master)](https://buildkite.com/uberopensource/cadence-go-client) [![Coverage Status](https://coveralls.io/repos/uber-go/cadence-client/badge.svg?branch=master&service=github)](https://coveralls.io/github/uber-go/cadence-client?branch=master) [![GoDoc](https://godoc.org/go.uber.org/cadence?status.svg)](https://godoc.org/go.uber.org/cadence)
1+
# Go framework for Cadence
2+
[![Build Status](https://badge.buildkite.com/e7241785444519bdfd1defc68839fd19a89c15adb3477c73f7.svg?theme=github&branch=master)](https://buildkite.com/uberopensource/cadence-go-client)
3+
[![Coverage](https://codecov.io/gh/uber-go/cadence-client/graph/badge.svg?token=iEpqo5HbDe)](https://codecov.io/gh/uber-go/cadence-client)
4+
[![GoDoc](https://godoc.org/go.uber.org/cadence?status.svg)](https://godoc.org/go.uber.org/cadence)
25

36
[Cadence](https://github.com/uber/cadence) is a distributed, scalable, durable, and highly available orchestration engine we developed at Uber Engineering to execute asynchronous long-running business logic in a scalable and resilient way.
47

@@ -18,14 +21,13 @@ or
1821
go get go.uber.org/cadence
1922
```
2023

21-
See [samples](https://github.com/uber-common/cadence-samples) to get started.
24+
See [samples](https://github.com/uber-common/cadence-samples) to get started.
2225

23-
Documentation is available [here](https://cadenceworkflow.io/docs/go-client/).
26+
Documentation is available [here](https://cadenceworkflow.io/docs/go-client/).
2427
You can also find the API documentation [here](https://godoc.org/go.uber.org/cadence).
2528

2629
## Contributing
2730
We'd love your help in making the Cadence Go client great. Please review our [contribution guidelines](CONTRIBUTING.md).
2831

2932
## License
3033
MIT License, please see [LICENSE](LICENSE) for details.
31-

activity/activity.go

+3
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ type (
3838

3939
// RegisterOptions consists of options for registering an activity
4040
RegisterOptions = internal.RegisterActivityOptions
41+
42+
// RegistryInfo
43+
RegistryInfo = internal.RegistryActivityInfo
4144
)
4245

4346
// ErrResultPending is returned from activity's implementation to indicate the activity is not completed when

debug/types.go

+58
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
// Copyright (c) 2017-2021 Uber Technologies Inc.
2+
//
3+
// Permission is hereby granted, free of charge, to any person obtaining a copy
4+
// of this software and associated documentation files (the "Software"), to deal
5+
// in the Software without restriction, including without limitation the rights
6+
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7+
// copies of the Software, and to permit persons to whom the Software is
8+
// furnished to do so, subject to the following conditions:
9+
//
10+
// The above copyright notice and this permission notice shall be included in
11+
// all copies or substantial portions of the Software.
12+
//
13+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19+
// THE SOFTWARE.
20+
21+
package debug
22+
23+
import (
24+
internal "go.uber.org/cadence/internal/common/debug"
25+
)
26+
27+
type (
28+
// PollerTracker is an interface to track running pollers on a worker
29+
// Deprecated: in development and very likely to change
30+
PollerTracker = internal.PollerTracker
31+
32+
// Stopper is an interface for tracking stop events in an ongoing process or goroutine.
33+
// Implementations should ensure that Stop() is used to signal and track the stop event
34+
// and not to clean up any resources opened by worker
35+
// Deprecated: in development and very likely to change
36+
Stopper = internal.Stopper
37+
38+
// WorkerStats provides a set of methods that can be used to collect
39+
// stats on the Worker for debugging purposes.
40+
// Deprecated: in development and very likely to change
41+
WorkerStats = internal.WorkerStats
42+
43+
// ActivityTracker is a worker option to track executing activities on a worker
44+
// Deprecated: in development and very likely to change
45+
ActivityTracker = internal.ActivityTracker
46+
47+
// ActivityInfo contains details on the executing activity
48+
// Deprecated: in development and very likely to change
49+
ActivityInfo = internal.ActivityInfo
50+
51+
// Activities is a list of executing activities on the worker
52+
// Deprecated: in development and very likely to change
53+
Activities = internal.Activities
54+
55+
// Debugger exposes stats collected on a running Worker
56+
// Deprecated: in development and very likely to change
57+
Debugger = internal.Debugger
58+
)

docker/buildkite/docker-compose.yml

-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,6 @@ services:
112112
- BUILDKITE_BUILD_CREATOR_EMAIL
113113
- BUILDKITE_BUILD_CREATOR_TEAMS
114114
- BUILDKITE_PULL_REQUEST_REPO
115-
- COVERALLS_TOKEN
116115
- "GO111MODULE=on"
117116
volumes:
118117
- ../../:/go/src/go.uber.org/cadence

go.mod

+4-4
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ require (
1313
github.com/pborman/uuid v0.0.0-20160209185913-a97ce2ca70fa
1414
github.com/robfig/cron v1.2.0
1515
github.com/shirou/gopsutil v3.21.11+incompatible
16-
github.com/stretchr/testify v1.8.1
16+
github.com/stretchr/testify v1.9.0
1717
github.com/uber-go/tally v3.3.15+incompatible
18-
github.com/uber/cadence-idl v0.0.0-20240416202333-83d5cae7fc51
18+
github.com/uber/cadence-idl v0.0.0-20240723221048-0482c040f91d
1919
github.com/uber/jaeger-client-go v2.22.1+incompatible
2020
github.com/uber/tchannel-go v1.32.1
21-
go.uber.org/atomic v1.9.0
21+
go.uber.org/atomic v1.11.0
2222
go.uber.org/goleak v1.1.12
2323
go.uber.org/multierr v1.6.0
2424
go.uber.org/thriftrw v1.25.0
@@ -45,7 +45,7 @@ require (
4545
github.com/prometheus/client_model v0.2.0 // indirect
4646
github.com/prometheus/common v0.26.0 // indirect
4747
github.com/prometheus/procfs v0.6.0 // indirect
48-
github.com/stretchr/objx v0.5.0 // indirect
48+
github.com/stretchr/objx v0.5.2 // indirect
4949
github.com/tklauser/go-sysconf v0.3.11 // indirect
5050
github.com/tklauser/numcpus v0.6.0 // indirect
5151
github.com/uber-go/mapdecode v1.0.0 // indirect

0 commit comments

Comments
 (0)