Files
Carly de FrondevilleandVladyslav Simonenko 25f26e9a0b Fix bug that occurs when re-adding version metadata after removing all keys (#8887)
## What changed?
Fix bug that occurs when re-adding version metadata after removing all
keys

## Why?
Because otherwise, users could break their version workflow.
Luckily, this won't happen to users of the worker controller, because
there are certain metadata keys added to all versions managed by the
worker controller.

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

## Potential risks
- None

---

> [!NOTE]
> Ensure version metadata can be re-added after removing all keys by
reinitializing maps and using nil-safe deletes, with new test coverage.
> 
> - **Backend (worker deployment)**:
> - In `service/worker/workerdeployment/version_workflow.go`, initialize
`VersionState.Metadata` and `Metadata.Entries` when `UpsertEntries` is
provided, and use `Metadata.GetEntries()` for deletes to be nil-safe.
> - **Tests**:
> - Extend `TestUpdateVersionMetadata` to remove all entries then
re-upsert and validate; minor assertion update to `s.Len`.
> 
> <sup>Written by [Cursor
Bugbot]() for commit
47680a720b17b5c50f6214d5cb82c86e3eb63739. This will update automatically
on new commits. Configure
[here]().</sup>
2026-02-02 15:02:18 -08:00
..

Temporal Worker

Temporal Worker is a role for Temporal service used for hosting any components responsible for performing background processing on the Temporal cluster.

Replicator

Replicator is a background worker responsible for consuming replication tasks generated by remote Temporal clusters and pass it down to processor, so they can be applied to local Temporal cluster.

Quickstart for localhost development

  1. Start Temporal development server for active zone:

    make start-cdc-active
    
  2. Start Temporal development server for standby(passive) zone:

    make start-cdc-standby
    
  3. Connect two Temporal clusters:

    tctl --ad 127.0.0.1:7233 adm cl upsert-remote-cluster --frontend_address "localhost:8233"
    tctl --ad 127.0.0.1:8233 adm cl upsert-remote-cluster --frontend_address "localhost:7233"
    
  4. Create global namespaces

    tctl --ns sample namespace register --gd true --ac active --cl active standby
    
  5. Failover between zones:

    Failover to standby:

    tctl --ns sample namespace update --ac standby
    

    Failback to active:

    tctl --ns sample namespace update --ac active