Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding executionStartedTimestamp property to ExecutionStartedEvent message #22

Closed
wants to merge 1 commit into from

Conversation

ASHIQUEMD
Copy link

@ASHIQUEMD ASHIQUEMD commented Jan 17, 2024

This PR adds executionStartedTimestamp property to ExecutionStartedEvent, to capture the execution started timestamp for workflow.

We are adding this property to capture workflowExecutionElapsed time, and this needs workflowExecutionStartedTime to be captured and saved.

…ssage

Signed-off-by: MD Ashique <noorani.ashique5@gmail.com>
Copy link
Member

@cgillum cgillum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should not be adding this property here. An indication of when execution started should instead be done on OrchestrationState.

@ASHIQUEMD
Copy link
Author

ASHIQUEMD commented Jan 18, 2024

We should not be adding this property here. An indication of when execution started should instead be done on OrchestrationState.

Hello @cgillum, thank you for your suggestion. I wanted to clarify that we don't directly persist OrchestrationState; it is derived from HistoryEvent. If I understand correctly, you're proposing adding executionStartedTimestamp to OrchestrationState. If that's the case, the challenge lies in persisting this information, as I couldn't find an exposed API in dtf-go to save the OrchestrationState directly. The available API, FetchOrchestrationMetadata, retrieves the state from HistoryEvent. Please correct me if my understanding is not accurate or if there's a different approach you have in mind.

Just FYI: We are adding this property to capture workflowExecutionLatency time (PR), and this needs workflowExecutionStartedTime to be captured and saved. So, WorkflowExecutionStartedEvent struct seemed like a good fit to store executionStartedTimestamp property.

@DeepanshuA
Copy link

Yeah, OrchestrationState is not persisted directly. It is created through workflowState saved by backend. And, this workflowState is being saved in terms of HistoryEvents.
So, I also understand the same thing that we would need to persist in ExecutionStartedEvent and that should be the correct place for it.

@cgillum
Copy link
Member

cgillum commented Jan 19, 2024

You don't need a new property for this. You can use the timestamp on the very first HistoryEvent of type OrchestratorStarted in the history, which gets added only after the orchestration starts executing.

@ASHIQUEMD
Copy link
Author

Closing this PR as it is no longer required.

@ASHIQUEMD ASHIQUEMD closed this Jan 25, 2024
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.

None yet

3 participants