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

Add summary to worklow watch #251

Merged
merged 8 commits into from
Dec 19, 2023
Merged

Conversation

sebneira
Copy link
Contributor

@sebneira sebneira commented May 26, 2023

What was changed

Added workflow execution summary to trace command.
Depends on #233.

Example:

Screenshot 2023-05-24 at 18 00 11

Why?

To provide important information about what workflow execution is traced. This could be extended to include other information as StartTime (or a diff with now).

Checklist

  1. Closes texp upstream
  2. How was this tested:
    Running temporal (see example provided above)
  3. Any docs updates needed?
    None

@sebneira sebneira marked this pull request as ready for review May 26, 2023 08:47
trace/summary.go Outdated

_, _ = title.Println("Execution summary:")
tb := NewTable(os.Stdout)
tb.AppendRows(
Copy link
Contributor

Choose a reason for hiding this comment

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

you should be able to accomplish ~same result with an existing API, ex.

return output.PrintItems(c, []interface{}{cluster}, po)

Have you also considered using it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done!

Btw, I found it a bit tricky to implement PrintItems since I didn't find any docs. Am I missing something?

Copy link
Contributor

Choose a reason for hiding this comment

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

yea it was not documented. Designed this way to accept user's input in a simple form
Let me look into documenting this better

@feedmeapples
Copy link
Contributor

pushed few commits to make PrintWorkflowTrace easier to read (and address golangci-lint failing on complexity). There is an issue with execution updates after my commits, addressing these and merging

@sebneira
Copy link
Contributor Author

Hi 👋
Is there any updates on this PR?

Thanks

Copy link
Member

@bergundy bergundy left a comment

Choose a reason for hiding this comment

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

I would consider a flag to skip printing the summary but otherwise LGTM.

Thanks.

@bergundy bergundy merged commit 0a50eac into temporalio:main Dec 19, 2023
17 checks passed
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