Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
eecd408
refactor: migrate user_metadata_test.go from FunctionalTestBase to te…
chaptersix Mar 25, 2026
45cc92b
Merge branch 'main' into user-metadata-test-env
chaptersix Mar 26, 2026
f29c7eb
Cleanup unused WV3 test code paths (#9666)
ShahabT Mar 26, 2026
74b5222
Fix two flaky/broken functional tests (#9660)
spkane31 Mar 26, 2026
dcfa05e
refactor: migrate tests/admin_test.go to testcore.NewEnv pattern (#9675)
chaptersix Mar 26, 2026
0eaac2c
Migrate activity_api_batch_reset_test to testcore.NewEnv (#9676)
chaptersix Mar 26, 2026
5fd9956
fix: handle deleted CHASM schedule lifecycle and V1 fallback routing …
chaptersix Mar 26, 2026
b575a2e
Ensure WD Version properly revives if recreated after deletion (#9382)
ShahabT Mar 26, 2026
dfd9c35
Add IS NULL / IS NOT NULL support to ListWorkers query engine (#9696)
rkannan82 Mar 27, 2026
c28a2ca
Add deployment name and build ID labels to backlog metrics (#9705)
Shivs11 Mar 27, 2026
906accf
Fix fairness migration flaky test (#9715)
dnr Mar 27, 2026
dc7219e
Rename new Deployment Name and Build ID labels to be shorter (#9723)
carlydf Mar 27, 2026
bac1939
Fix data race on nexusEndpointsOwnershipLostCh (#9602)
paulnpdev Mar 27, 2026
ff77b9d
Filter internal Nexus headers from being forwarded to user handlers (…
bergundy Mar 27, 2026
e3b7e90
Write test results reports in between runs to preserve on crash (#9692)
spkane31 Mar 30, 2026
3bb74ae
Add archetype metric tag and logical task processing metrics (#9377)
awln-temporal Mar 30, 2026
85862b1
Define layout engine in d2 file (#9697)
stephanos Mar 30, 2026
f1c3aef
Address deprecation warnings and always generate summary reports (#9743)
spkane31 Mar 30, 2026
810528e
Propagate principal into workflow history (#9582)
simvlad Mar 30, 2026
3c599a3
Updating io.Closer usage to simplify logic and ensure closure (#9493)
bfosberry Mar 30, 2026
0aec195
Exclude polling cases from get apis (#9744)
yux0 Mar 30, 2026
ee41a48
parallelsuite (#9536)
stephanos Mar 30, 2026
9e5dfeb
Update agent code review guidelines flaky test findings (#9669)
spkane31 Mar 30, 2026
090320a
buf format (#9663)
stephanos Mar 30, 2026
c2e58e5
Lazy SdkClient and SdkWorker (#9745)
stephanos Mar 31, 2026
6c4f7c8
Migrate links_test.go to parallelsuite (#9754)
long-nt-tran Mar 31, 2026
497a4c0
Update test shard salt (#9750)
temporal-cicd[bot] Mar 31, 2026
e9a07b8
Migrate activity_api_reset_test.go to parallelsuite (#9758)
spkane31 Apr 1, 2026
e86a4f8
Migrate testEnv suites to use parallelsuites (#9755)
stephanos Apr 1, 2026
78fb068
Check namespaces in batch workflow (#9767)
carlydf Apr 1, 2026
5623932
Remove nil search attributes from history events / mutable state / ch…
awln-temporal Apr 1, 2026
9081c5d
Fix data race in workerdeployment unit tests (#9766)
spkane31 Apr 1, 2026
fb468b6
fix: validate namespace ID in MigrateScheduleToChasm (#9770)
chaptersix Apr 1, 2026
03244c5
Upgrade Go SDK version to 1.41.1 (#9753)
long-nt-tran Apr 1, 2026
9c4d018
Adding ReplicationState to initial ns replication (#9695)
stuart-wells Apr 1, 2026
f466923
Fix expired task handing in fairTaskReader (#9775)
dnr Apr 1, 2026
6d45349
Use original context for non-blocking path in DescribeActivityExecuti…
dandavison Apr 2, 2026
4568121
refactor(tests): migrate user metadata test to parallelsuite
chaptersix Apr 2, 2026
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
3 changes: 3 additions & 0 deletions .github/.golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ linters:
# internal server pbs have their own suffix to avoid naming conflicts
- pkg: go.temporal.io/server/api/(\w+)/v1
alias: ${1}spb
testifylint:
disable:
- suite-method-signature # parallelsuite.Run supports extra args passed to Test* methods
exhaustive:
# Presence of "default" case in switch statements satisfies exhaustiveness,
# even if all enum members are not listed.
Expand Down
12 changes: 11 additions & 1 deletion .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,23 @@ Apply these patterns when reviewing PRs or suggesting code changes.
- Avoid stuttering: don't use `ActivityStatus` in package `activity`, just `Status`
- Use `ok` boolean pattern instead of nil checks where idiomatic

## 3. Testify Suite Correctness
## 3. Testify Suite Correctness and Reliability

- Never use `s.T()` in subtests - use the subtest's `t` parameter
- Never use suite assertion methods (`s.NoError`, `s.Equal`) from goroutines - causes panics
- Use `EventuallyWithT` when you need assertions inside eventually blocks, and use that block's `t`
- Use `require.ErrorAs(t, err, &specificErr)` for specific error type checks
- Prefer `require` over `assert` - it's rarely useful to continue a test after a failed assertion
- Add comments explaining why `Eventually` is needed (e.g., eventual consistency)
- Do not use single-value type assertions on errors (`err.(*T)`); this panics instead of failing the test when the type doesn't match. Use `errors.As` with a guarded return.
- When launching a goroutine to maintain a precondition for later assertions (e.g., keeping pollers active so a deployment version gets registered), loop until context cancellation rather than running once. A single attempt that times out exits silently, leaving downstream Eventually/propagation waits to hang until their own deadline.
- Never call testify assertions (`s.NoError`, `s.Equal`, `require.NoError`, even `assert.NoError`) inside a `go func()` — if the goroutine outlives the test, the assertion panics the binary with `panic: Fail in goroutine after TestXxx has completed`. Move assertions to the test goroutine or use a buffered error channel.
- Any `<-ch` that isn't inside a `select` with `ctx.Done()` will hang indefinitely if the sender never sends. Always provide a context cancellation fallback.
- Never write to package-level or global variables in tests — parallel tests share the same process; thread values through function parameters instead.
- Never use `time.Sleep` or `time.Since(start) > threshold` to enforce ordering — use channels, `sync.WaitGroup`, or `EventuallyWithT` instead.
- When using `EventuallyWithT` (or similar) to wait for a condition driven by a background goroutine, ensure the goroutine's timeout is longer than the `EventuallyWithT` deadline — if the background op times out first, the condition will never be satisfied and the wait will hang until its own deadline.
- Do not silently discard errors from precondition operations with `_, _ = f()` — if `f()` failing invalidates the rest of the test, surface the error or loop until it succeeds.
- Be suspicious of `go s.someHelper(ctx, ...)` calls where the goroutine runs exactly once and the test then immediately waits for something that helper was supposed to cause. If the operation can fail transiently (network, tight deadline, busy CI), the single attempt may fail silently and the wait will never succeed. Either loop the goroutine until `ctx.Done()`, or check that the operation succeeded before proceeding.

## 4. Inline Code / Avoid Abstractions

Expand Down Expand Up @@ -70,3 +79,4 @@ Apply these patterns when reviewing PRs or suggesting code changes.
- Prefer `sync.Mutex` over `sync.RWMutex` almost always, except when reads are much more common than writes (>1000×) or readers hold the lock for significant time
- Don't do IO while holding locks - use side effect tasks
- Clone data before releasing locks if it might be modified
- Proto message fields accessed outside the workflow lock must be cloned, not aliased: use `common.CloneProto(...)` rather than returning the pointer directly.
4 changes: 2 additions & 2 deletions .github/workflows/ci-success-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
steps:
- name: Generate token
id: generate_token
uses: actions/create-github-app-token@v1
uses: actions/create-github-app-token@v2
with:
app-id: ${{ secrets.TEMPORAL_CICD_APP_ID }}
private-key: ${{ secrets.TEMPORAL_CICD_PRIVATE_KEY }}
Expand All @@ -45,7 +45,7 @@ jobs:
token: ${{ steps.generate_token.outputs.token }}

- name: Set up Go
uses: actions/setup-go@v5
uses: actions/setup-go@v6
with:
go-version-file: 'go.mod'

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/features-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
cp ./develop/docker-compose/docker-compose.yml /tmp/docker-compose.yml
- name: Upload Docker artifact
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v6
with:
name: temporal-server-docker
path: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/flaky-tests-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
steps:
- name: Generate token
id: generate_token
uses: actions/create-github-app-token@v1
uses: actions/create-github-app-token@v2
with:
app-id: ${{ secrets.TEMPORAL_CICD_APP_ID }}
private-key: ${{ secrets.TEMPORAL_CICD_PRIVATE_KEY }}
Expand All @@ -41,7 +41,7 @@ jobs:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v5
uses: actions/setup-go@v6
with:
go-version-file: "go.mod"

Expand All @@ -68,7 +68,7 @@ jobs:
--sha "$SHA"

- name: Upload generated reports
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v6
if: steps.process-flaky-tests.outcome == 'success'
with:
name: flaky-tests-reports-${{ github.run_number }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ jobs:
check-latest: true
cache: true

- name: format golang import statements
- name: apply formatters
run: |
make fmt
Expand Down
50 changes: 25 additions & 25 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -228,22 +228,22 @@ jobs:

- name: Restore dependencies
id: restore-deps
uses: actions/cache/restore@v4
uses: actions/cache/restore@v5
with:
path: ~/go/pkg/mod
key: go-${{ runner.os }}${{ runner.arch }}-${{ hashFiles('go.mod') }}-deps-${{ hashFiles('go.sum') }}

- run: make pre-build-functional-test-coverage

- name: Save dependencies
uses: actions/cache/save@v4
uses: actions/cache/save@v5
if: ${{ steps.restore-deps.outputs.cache-hit != 'true' }}
with:
path: ~/go/pkg/mod
key: ${{ steps.restore-deps.outputs.cache-primary-key }}

- name: Save build outputs
uses: actions/cache/save@v4
uses: actions/cache/save@v5
with:
path: ~/.cache/go-build
key: go-${{ runner.os }}${{ runner.arch }}-build-${{ env.COMMIT }}
Expand All @@ -266,13 +266,13 @@ jobs:
cache: false # do our own caching

- name: Restore dependencies
uses: actions/cache/restore@v4
uses: actions/cache/restore@v5
with:
path: ~/go/pkg/mod
key: go-${{ runner.os }}${{ runner.arch }}-${{ hashFiles('go.mod') }}-deps-${{ hashFiles('go.sum') }}

- name: Restore build outputs
uses: actions/cache/restore@v4
uses: actions/cache/restore@v5
with:
path: ~/.cache/go-build
key: go-${{ runner.os }}${{ runner.arch }}-build-${{ env.COMMIT }}
Expand Down Expand Up @@ -303,13 +303,13 @@ jobs:
cache: false # do our own caching

- name: Restore dependencies
uses: actions/cache/restore@v4
uses: actions/cache/restore@v5
with:
path: ~/go/pkg/mod
key: go-${{ runner.os }}${{ runner.arch }}-${{ hashFiles('go.mod') }}-deps-${{ hashFiles('go.sum') }}

- name: Restore build outputs
uses: actions/cache/restore@v4
uses: actions/cache/restore@v5
with:
path: ~/.cache/go-build
key: go-${{ runner.os }}${{ runner.arch }}-build-${{ env.COMMIT }}
Expand All @@ -329,8 +329,8 @@ jobs:
CRASH_REPORT_NAME="$GITHUB_JOB" make report-test-crash

- name: Generate test summary
uses: mikepenz/action-junit-report@v5.0.0-rc01
if: failure()
uses: mikepenz/action-junit-report@v6
if: ${{ !cancelled() }}
with:
report_paths: ./.testoutput/junit.*.xml
detailed_summary: true
Expand Down Expand Up @@ -363,7 +363,7 @@ jobs:

- name: Upload test results to GitHub
# Can't pin to major because the action linter doesn't recognize the include-hidden-files flag.
uses: actions/upload-artifact@v4.4.3
uses: actions/upload-artifact@v6
if: ${{ !cancelled() }}
with:
name: junit-xml--${{ github.run_id }}--${{ steps.get_job_id.outputs.job_id }}--${{ github.run_attempt }}--unit-test
Expand Down Expand Up @@ -397,13 +397,13 @@ jobs:
cache: false # do our own caching

- name: Restore dependencies
uses: actions/cache/restore@v4
uses: actions/cache/restore@v5
with:
path: ~/go/pkg/mod
key: go-${{ runner.os }}${{ runner.arch }}-${{ hashFiles('go.mod') }}-deps-${{ hashFiles('go.sum') }}

- name: Restore build outputs
uses: actions/cache/restore@v4
uses: actions/cache/restore@v5
with:
path: ~/.cache/go-build
key: go-${{ runner.os }}${{ runner.arch }}-build-${{ env.COMMIT }}
Expand All @@ -429,8 +429,8 @@ jobs:
CRASH_REPORT_NAME="$GITHUB_JOB" make report-test-crash

- name: Generate test summary
uses: mikepenz/action-junit-report@v5.0.0-rc01
if: failure()
uses: mikepenz/action-junit-report@v6
if: ${{ !cancelled() }}
with:
report_paths: ./.testoutput/junit.*.xml
detailed_summary: true
Expand Down Expand Up @@ -463,7 +463,7 @@ jobs:

- name: Upload test results to GitHub
# Can't pin to major because the action linter doesn't recognize the include-hidden-files flag.
uses: actions/upload-artifact@v4.4.3
uses: actions/upload-artifact@v6
if: ${{ !cancelled() }}
with:
name: junit-xml--${{ github.run_id }}--${{ steps.get_job_id.outputs.job_id }}--${{ github.run_attempt }}--integration-test
Expand Down Expand Up @@ -515,13 +515,13 @@ jobs:
cache: false # do our own caching

- name: Restore dependencies
uses: actions/cache/restore@v4
uses: actions/cache/restore@v5
with:
path: ~/go/pkg/mod
key: go-${{ runner.os }}${{ runner.arch }}-${{ hashFiles('go.mod') }}-deps-${{ hashFiles('go.sum') }}

- name: Restore build outputs
uses: actions/cache/restore@v4
uses: actions/cache/restore@v5
with:
path: ~/.cache/go-build
key: go-${{ runner.os }}${{ runner.arch }}-build-${{ env.COMMIT }}
Expand Down Expand Up @@ -568,8 +568,8 @@ jobs:
CRASH_REPORT_NAME="$GITHUB_JOB" make report-test-crash

- name: Generate test summary
uses: mikepenz/action-junit-report@v5.0.0-rc01
if: failure()
uses: mikepenz/action-junit-report@v6
if: ${{ !cancelled() }}
with:
report_paths: ./.testoutput/junit.*.xml
detailed_summary: true
Expand All @@ -595,7 +595,7 @@ jobs:

- name: Upload test results to GitHub
# Can't pin to major because the action linter doesn't recognize the include-hidden-files flag.
uses: actions/upload-artifact@v4.4.3
uses: actions/upload-artifact@v6
if: ${{ !cancelled() }}
with:
name: junit-xml--${{ github.run_id }}--${{ steps.get_job_id.outputs.job_id }}--${{ github.run_attempt }}--${{ matrix.name }}--${{ matrix.display_name }}--functional-test
Expand All @@ -604,7 +604,7 @@ jobs:
retention-days: 28

- name: Upload debug logs
uses: actions/upload-artifact@v4.4.3
uses: actions/upload-artifact@v6
if: ${{ !cancelled() }}
with:
name: debug-logs--${{ github.run_id }}--${{ steps.get_job_id.outputs.job_id }}--${{ github.run_attempt }}--${{ matrix.name }}--${{ matrix.display_name }}--functional-test
Expand Down Expand Up @@ -635,13 +635,13 @@ jobs:
cache: false

- name: Restore dependencies
uses: actions/cache/restore@v4
uses: actions/cache/restore@v5
with:
path: ~/go/pkg/mod
key: go-${{ runner.os }}${{ runner.arch }}-${{ hashFiles('go.mod') }}-deps-${{ hashFiles('go.sum') }}

- name: Restore build outputs
uses: actions/cache/restore@v4
uses: actions/cache/restore@v5
with:
path: ~/.cache/go-build
key: go-${{ runner.os }}${{ runner.arch }}-build-${{ env.COMMIT }}
Expand Down Expand Up @@ -705,10 +705,10 @@ jobs:
actions: read
steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Set up Go
uses: actions/setup-go@v5
uses: actions/setup-go@v6
with:
go-version-file: "go.mod"
cache: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/trigger-version-info-service.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
steps:
- name: Generate token
id: generate_token
uses: actions/create-github-app-token@v1
uses: actions/create-github-app-token@v2
with:
app-id: ${{ secrets.TEMPORAL_CICD_APP_ID }}
private-key: ${{ secrets.TEMPORAL_CICD_PRIVATE_KEY }}
Expand Down
2 changes: 2 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ Before starting the implementation of any request, you MUST REVIEW the following
- Run tests after altering code or tests
- Start with unit tests for fastest feedback
- Prefer `require` over `assert`, avoid testify suites in unit tests (functional tests require suites for test cluster setup), use `require.Eventually` instead of `time.Sleep` (forbidden by linter)
- For float comparisons in tests, use `InDelta` or `InEpsilon` instead of `Equal` (enforced by `testifylint`)
- For error assertions in testify suites, use `s.Require().NoError(err)` instead of `s.NoError(err)` (enforced by `testifylint`)

# Primary Workflows
## Software Engineering Tasks
Expand Down
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ lint-protos: $(BUF) $(INTERNAL_BINPB) $(CHASM_BINPB)
@$(BUF) lint $(INTERNAL_BINPB)
@$(BUF) lint --config chasm/lib/buf.yaml $(CHASM_BINPB)

fmt: fmt-gofix fmt-imports fmt-yaml
fmt: fmt-gofix fmt-imports fmt-protos fmt-yaml

# Some fixes enable others (e.g. rangeint may expose minmax opportunities),
# so - as recommended by the Go team - we run go fix in a loop until it reaches
Expand Down Expand Up @@ -438,6 +438,11 @@ parallelize-tests:
@printf $(COLOR) "Add t.Parallel() to tests..."
@go run ./cmd/tools/parallelize $(INTEGRATION_TEST_DIRS)

fmt-protos: $(BUF)
@printf $(COLOR) "Formatting proto files..."
@$(BUF) format -w $(PROTO_ROOT)/internal
@$(BUF) format -w --config chasm/lib/buf.yaml chasm/lib

fmt-yaml: $(YAMLFMT)
@printf $(COLOR) "Formatting YAML files..."
@$(YAMLFMT) -conf .github/.yamlfmt .
Expand Down
2 changes: 1 addition & 1 deletion api/adminservice/v1/request_response.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion api/archiver/v1/message.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion api/batch/v1/request_response.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading