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

Attach user metadata from commands to corresponding history events #5857

Merged
merged 5 commits into from May 22, 2024

Conversation

gow
Copy link
Contributor

@gow gow commented May 6, 2024

What changed?

In this PR we are attaching the user metadata if found in the command to the corresponding history events that are being created.

Why?

Users need a way to set arbitrary information on workflows and events. This would be later used in the clients to build custom tooling (ex: UI showing additional information about a timer event etc)

How did you test it?

Added unit tests

Potential risks

N/A. It is backward compatible.

Documentation

N/A

Is hotfix candidate?

No

@gow gow requested a review from a team as a code owner May 6, 2024 19:30
@gow gow marked this pull request as draft May 6, 2024 19:30
@gow gow requested a review from yiminc May 7, 2024 01:41
@gow gow marked this pull request as ready for review May 7, 2024 16:52
@cretz
Copy link
Member

cretz commented May 7, 2024

Will let others more familiar with this repo review. But I want to confirm that some features will be present:

  • Is the user metadata on StartWorkflowExecution and SignalWithStartWorkflowExecutionRequest copied to the start event?
  • Is the user metadata on the child workflow command copied to the workflow start event?
  • Is the user metadata on NewWorkflowExecutionInfo copied to the start event on schedules?
  • Is the user metadata on WorkflowExecutionConfig returned from describe populated with the metadata the workflow was started with?

@gow
Copy link
Contributor Author

gow commented May 8, 2024

Will let others more familiar with this repo review. But I want to confirm that some features will be present:

  • Is the user metadata on StartWorkflowExecution and SignalWithStartWorkflowExecutionRequest copied to the start event?
  • Is the user metadata on the child workflow command copied to the workflow start event?
  • Is the user metadata on NewWorkflowExecutionInfo copied to the start event on schedules?
  • Is the user metadata on WorkflowExecutionConfig returned from describe populated with the metadata the workflow was started with?

This is PR is just for commands only (to keep PRs short). I'm working on another PR to include user metadata in all the other areas you mentioned.

@gow gow requested a review from yycptt May 10, 2024 21:58
Copy link
Member

@yycptt yycptt left a comment

Choose a reason for hiding this comment

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

Workflow task handler logic LGTM

service/history/workflow_task_handler.go Outdated Show resolved Hide resolved
service/history/workflow_task_handler.go Outdated Show resolved Hide resolved
@gow gow enabled auto-merge (squash) May 22, 2024 22:27
@gow gow merged commit af1262e into main May 22, 2024
42 checks passed
@gow gow deleted the cg_user_metadata branch May 22, 2024 23:45
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