Skip to content

enabled token encoding by default - #66

Draft
chaptersix wants to merge 7 commits into
chaptersix:mainfrom
temporalio:callback-encoding
Draft

chaptersix wants to merge 7 commits into
chaptersix:mainfrom
temporalio:callback-encoding

Conversation

@chaptersix

@chaptersix chaptersix commented Sep 8, 2026

Copy link
Copy Markdown
Owner

What changed?

Describe what has changed in this PR.

Why?

Tell your future self why have you made these changes.

How did you test it?

  • built
  • run locally and tested manually
  • covered by existing tests
  • added new unit test(s)
  • added new functional test(s)

Potential risks

Any change is risky. Identify all risks you are aware of. If none, remove this section.

Shivs11 and others added 7 commits September 4, 2026 20:15
## What changed?
- Revert https://github.com/temporalio/temporal/pull/11698/changes since
that had introduced a NDE change
- The NDE change was that we were returning without decrementing a
counter, which controls the CAN'ing rate of a version workflow.
- The NDE could occur if some version workflow had already CAN'ed
earlier and with this change, it would not CAN again.
- Also added some more logs here so that when this does happen, we have
alerts + logs for manual repair.

## Why?
Provide enough context to investigate terminal task-queue deletion
propagation failures without leaving the version workflow open
indefinitely.

## How did you test it?
- [ ] built
- [ ] run locally and tested manually
- [ ] covered by existing tests
- [x] updated unit test
- [ ] added new functional test(s)

Focused test:
env GOWORK=off go test -tags test_dep ./service/worker/workerdeployment
-run
TestVersionWorkflowSuite/Test_DeleteVersion_AsyncPropagationFailureCompletesWorkflow

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Medium Risk**
> Changes terminal-delete failure handling and workflow lifetime; stale
task-queue version data may persist, but metrics/logs are the recovery
path and the prior keep-open behavior risked NDE/CaN issues.
> 
> **Overview**
> Reverts the behavior where a **terminal failure** during async
task-queue delete propagation left the worker deployment **version
workflow running** by skipping `asyncPropagationsInProgress` decrement.
That path now **always decrements** the counter after logging and
emitting the failure metric, so delete can finish and the workflow can
exit—aligned with **`syncTaskQueuesAsync`**.
> 
> Failure logging now includes **`taskQueues`** and **`revision`** for
investigation when task queues may still hold stale version data. The
unit test was updated to expect **workflow completion** (no error)
instead of an indefinitely open workflow.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
b0ad220. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
…11447)

## What changed?
`createFirstWorkflowTask` now emits a counter
(`child_execution_not_found`) and an Error log when
`ScheduleWorkflowTask` returns NotFound for a child. `NamespaceNotFound`
and `ErrWorkflowCompleted` are excluded. No behavior change: the error
is still returned as-is and the task is still acked.

## Why?
Callers arrive only after `ChildWorkflowExecutionStarted` was committed,
so the parent asserts the child exists. A potential NotFound on child
execution would contradict that, and `isInvalidTaskError` would drop the
task, leaving the child created but never scheduled. Publish a metric
and monitor it, in case if it happens.

## How did you test it?
- [X] built
- [X] run locally and tested manually
- [ ] covered by existing tests
- [X] added new unit test(s)
- [X] added new functional test(s)

Also simulated NotFound error thrown from the store, resulting in
corruption. The error was logged.

## Potential risks
There could be some cases I didn't consider. But I explicitly not
changing the behavior to monitor it first.
## What changed?
- Allow a deployment version at `MaxTaskQueues` to register another task
queue type for an existing task queue name.
- Preserve the limit error when registration would add a genuinely new
task queue family.

## Why?
`TaskQueueFamilies` is keyed by task queue name and stores Workflow,
Activity, and Nexus types inside each family. The validator previously
rejected every new type once the family map reached the limit, even
though adding a type to an existing name does not increase the number of
families.

## How did you test it?
- [ ] built
- [ ] run locally and tested manually
- [ ] covered by existing tests
- [x] added new unit test(s)
- [ ] added new functional test(s)

Commands:
- `go test -tags test_dep ./service/worker/workerdeployment -run
'^TestValidateRegisterWorker_AllowsNewTaskQueueTypeAtFamilyLimit$'
-count=1`
- `go test -tags test_dep ./service/worker/workerdeployment -count=1`

The focused test was run before the production change and failed with
`errMaxTaskQueuesInVersion`; it passes with this fix.

## Potential risks
Low. Duplicate registration of the same task queue type is still
rejected, and a new task queue name is still rejected when the family
limit has been reached.

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Narrow validation change in worker registration; duplicate-type and
new-family limits are unchanged, covered by new integration test.
> 
> **Overview**
> **Fixes deployment-version registration** so `MaxTaskQueues` counts
**task queue families** (by name), not every workflow/activity/nexus
type on that name.
> 
> `validateRegisterWorker` in `version_workflow.go` now enforces the cap
only when `!familyExists`—registering another type on an existing task
queue name is allowed even when the family map is already at the limit.
Duplicate type registration and adding a **new** name at the limit still
fail as before.
> 
> Adds **`TestDeploymentVersionTaskQueueFamilyLimitAllowsNewType`**:
with `MatchingMaxTaskQueuesInDeploymentVersion` set to 1, workflow then
activity polls on the same queue succeed (two types, one family); a
second queue name is rejected. **`pollActivityFromDeployment`** is
exported as a package helper for reuse in tests.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
5cac0cc. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
## What changed?
Remove commit and author from notification. Wrap stack trace in code
block.

## Why?
latest commit and author for the CI run can be irrelevant for data race
issues since they are sporadic.

## How did you test it?
- [X] built
- [X] run locally and tested manually
- [X] covered by existing tests
- [X] added new unit test(s)
- [ ] added new functional test(s)
## What changed?
Return no error if child in stale branch

## Why?
Return no error if child in stale branch so the standby task
verification will mark the task as complete and no retry.

## How did you test it?
- [ ] built
- [ ] run locally and tested manually
- [ ] covered by existing tests
- [ ] added new unit test(s)
- [ ] added new functional test(s)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants