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

Introduce debug snapshotting like Swift has #612

Merged
merged 3 commits into from
Sep 20, 2019

Conversation

zach-klippenstein
Copy link
Collaborator

@zach-klippenstein zach-klippenstein commented Sep 14, 2019

3 commits, recommend reviewing individually. First one cleans up the launchWorkflowIn API to prepare to add another stream, then state snapshots are introduced, and finally update info.

This PR introduces a new stream to the function passed to launchWorkflowIn, one that emits a tuple of two things on every render pass:

  • WorkflowHierarchyDebugInfo – A simple tree data structure that mirrors the workflow tree and, at each node, describes the type of the workflow at that node and the state of that workflow at the time of that render pass.
  • WorkflowUpdateDebugInfo – A description of a path down the tree that indicates which workflow triggered the render pass and why. Includes information about which nodes up the tree executed WorkflowActions as part of the update. Null for the first render pass, since it is not triggered by any update.

See the kdoc on those types for more information.

Closes #343.

@zach-klippenstein zach-klippenstein changed the title Zachklipp/debug snapshots Introduce debug snapshotting like Swift has Sep 14, 2019
@zach-klippenstein zach-klippenstein added this to In progress in Workflow (Kotlin) via automation Sep 14, 2019
@zach-klippenstein zach-klippenstein added the enhancement New feature or request label Sep 14, 2019
@zach-klippenstein zach-klippenstein added this to the kotlin v0.21.0 milestone Sep 14, 2019
@zach-klippenstein zach-klippenstein force-pushed the zachklipp/debug-snapshots branch 4 times, most recently from 3ef7590 to 40e7e73 Compare September 16, 2019 23:25
@zach-klippenstein zach-klippenstein marked this pull request as ready for review September 16, 2019 23:25
@zach-klippenstein
Copy link
Collaborator Author

Pushed to address some of my own comments.

@zach-klippenstein zach-klippenstein force-pushed the zachklipp/debug-snapshots branch 2 times, most recently from 7f05f31 to 5976800 Compare September 20, 2019 16:32
@zach-klippenstein
Copy link
Collaborator Author

All feedback addressed, merging on green.

@zach-klippenstein zach-klippenstein merged commit 23957eb into master Sep 20, 2019
Workflow (Kotlin) automation moved this from In progress to Done Sep 20, 2019
zach-klippenstein added a commit that referenced this pull request Sep 27, 2019
The workflow runtime supports registering a single `WorkflowDiagnosticListener`
at initialization that will receive events for all kinds of significant
events in the runtime.

This still supports the debug snapshotting and update information that Swift
currently has, but also supports reporting much finer-grained profiling data.

This supersedes #612.
zach-klippenstein added a commit that referenced this pull request Sep 27, 2019
The workflow runtime supports registering a single `WorkflowDiagnosticListener`
at initialization that will receive events for all kinds of significant
events in the runtime.

This still supports the debug snapshotting and update information that Swift
currently has, but also supports reporting much finer-grained profiling data.

This supersedes #612.
zach-klippenstein added a commit that referenced this pull request Sep 27, 2019
The workflow runtime supports registering a single `WorkflowDiagnosticListener`
at initialization that will receive events for all kinds of significant
events in the runtime.

This still supports the debug snapshotting and update information that Swift
currently has, but also supports reporting much finer-grained profiling data.

This supersedes #612, and closes #343 again.
@zach-klippenstein zach-klippenstein deleted the zachklipp/debug-snapshots branch September 27, 2019 00:40
zach-klippenstein added a commit that referenced this pull request Oct 1, 2019
The workflow runtime supports registering a single `WorkflowDiagnosticListener`
at initialization that will receive events for all kinds of significant
events in the runtime.

This still supports the debug snapshotting and update information that Swift
currently has, but also supports reporting much finer-grained profiling data.

This supersedes #612, and closes #343 again.
@zach-klippenstein zach-klippenstein added the kotlin Affects the Kotlin library. label Mar 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request kotlin Affects the Kotlin library.
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

Copy Swift's debug snapshots mechanism for tracing workflows
2 participants