Skip to content

[codex] Evict workflows on external terminal events#1305

Draft
gibbonjj wants to merge 1 commit into
temporalio:mainfrom
gibbonjj:updown_counter_workflow_activity_nexus
Draft

[codex] Evict workflows on external terminal events#1305
gibbonjj wants to merge 1 commit into
temporalio:mainfrom
gibbonjj:updown_counter_workflow_activity_nexus

Conversation

@gibbonjj
Copy link
Copy Markdown
Contributor

What changed

  • Requests workflow cache eviction when replay observes server-side terminal history, including workflow timeout and termination.
  • Adds core coverage for externally terminal histories to assert a RemoveFromCache(WORKFLOW_EXECUTION_ENDING) activation is produced.

Why

Workflow up-down-counter metrics are tracked in memory and cleaned up from TypeScript when the workflow is evicted from the cache. Timeout and termination can end a workflow via history without the normal terminal-command completion path, so cached workflow metric contributions could remain live until another eviction occurred.

Validation

  • cargo +stable test -p temporalio-sdk-core external_terminal_events_request_cache_eviction --lib
  • cargo +stable fmt --all

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.

1 participant