-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Labels
enhancementNew feature or requestNew feature or request
Description
- Overview
We are using the temporal worker controller with PINNED versioning strategy for long-running workflows (days-weeks).
However, we're experiencing deployment proliferation because the build_id is
regenerated for ANY pod spec change, including non-workflow code changes.
-
Use Case
- Service: Multiple workflow workers
- Workflow characteristics:
- New workflow starts every ~30 minutes
- Workflows run for days
- Long-running workflows cannot be patched mid-execution (business requirements)
- Deployment frequency:
- Workflow code changes: Infrequent (detected by CI - files ending in .workflow.ts)
- Non-workflow code changes (main.ts, configuration, dependencies): Every ~2 hours
- Versioning strategy: PINNED (required due to long-running workflows and desire to make
breaking changes)
-
The Problem
Current Behavior:
- ComputeBuildID() hashes the entire pod template spec
- ANY change (image tag, env vars, resources, etc.) generates a new build_id
- New build_id → new Kubernetes Deployment → new worker version registered with Temporal
- With PINNED versioning, old deployments stay alive until their workflows complete
-
Result:
- Deploying non-workflow code changes (bug fixes in main.ts, dependency updates, etc.)
creates new deployments - Combined with our timing constraints (new workflow every 30min, workflows run for days), we end up with 10-15 active deployments running simultaneously
- This causes resource waste and operational complexity
- Deploying non-workflow code changes (bug fixes in main.ts, dependency updates, etc.)
-
Expected Behavior
Ideally, we'd like to:
- Workflow code changes → new build_id → new deployment/version (current behavior - this is correct)
- Non-workflow code changes → same build_id → rolling update of existing deployment pods (new behavior)
This would allow us to:
- Deploy bug fixes and non-workflow improvements frequently
- Keep only 1-2 active deployments at any time
- Maintain workflow execution integrity with PINNED versioning
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request