Preserve instance_id and execution_id in OrchestrationFailed events#36
Open
pinodeca wants to merge 1 commit into
Open
Preserve instance_id and execution_id in OrchestrationFailed events#36pinodeca wants to merge 1 commit into
pinodeca wants to merge 1 commit into
Conversation
append_failed hardcoded placeholder identifiers ( and 0) that callers never overwrote, so every terminal OrchestrationFailed event (both the Failed and Cancelled paths, plus the infra-ack-failure and poison paths) serialized an empty instance_id and execution_id=0 into its payload. This broke payload-only correlation for telemetry/diagnostic consumers. Thread the real instance_id/execution_id through append_failed at all four call sites, matching the sibling Completed/ContinueAsNew paths, and add a regression assertion to the cancellation sample. Fixes #35
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
HistoryManager::append_failedhardcoded placeholder identifiers (""forinstance_idand0forexecution_id) that callers never overwrote. As a result, every terminalOrchestrationFailedevent serialized an emptyinstance_idandexecution_id = 0into its payload, breaking payload-only correlation for telemetry/diagnostic consumers.This affected more call sites than just the cancellation path. All four were fixed:
TurnResult::Failedarm —src/runtime/execution.rsTurnResult::Cancelledarm —src/runtime/execution.rssrc/runtime/dispatchers/orchestration.rssrc/runtime/dispatchers/orchestration.rsChanges
append_failednow takesinstance_id: &str, execution_id: u64, matching the siblingCompleted/ContinueAsNewterminal paths, and drops the placeholder comments.instance/execution_id.tests/e2e_samples.rs) verifying the terminalOrchestrationFailedevent carries the realinstance_idand a non-zeroexecution_id.Compatibility
Backward compatible — no event schema change, only correcting values that were always meant to be populated. No rolling-upgrade concern. Existing already-persisted failed events are historical and not rewritten.
Testing
cargo clippy --all-targets --all-featuresis clean.Fixes #35