Skip to content

Commit

Permalink
Added header to marker (#798)
Browse files Browse the repository at this point in the history
* Added header to marker

* Added marker header copy from the marker decision to the marker event

* Added marker test to historyBuilder unit test

* Changed header fields to map

* update generated files to reflect idl changes

* update generated idl file
  • Loading branch information
mfateev authored Jun 18, 2018
1 parent 1733b61 commit 922b0e6
Show file tree
Hide file tree
Showing 5 changed files with 306 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .gen/go/shared/idl.go

Large diffs are not rendered by default.

249 changes: 245 additions & 4 deletions .gen/go/shared/types.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions idl/github.com/uber/cadence/shared.thrift
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,10 @@ enum TaskListKind {
STICKY,
}

struct Header {
10: optional map<string, binary> fields
}

struct WorkflowType {
10: optional string name
}
Expand Down Expand Up @@ -336,6 +340,7 @@ struct SignalExternalWorkflowExecutionDecisionAttributes {
struct RecordMarkerDecisionAttributes {
10: optional string markerName
20: optional binary details
30: optional Header header
}

struct ContinueAsNewWorkflowExecutionDecisionAttributes {
Expand Down Expand Up @@ -550,6 +555,7 @@ struct MarkerRecordedEventAttributes {
10: optional string markerName
20: optional binary details
30: optional i64 (js.type = "Long") decisionTaskCompletedEventId
40: optional Header header
}

struct WorkflowExecutionSignaledEventAttributes {
Expand Down
1 change: 1 addition & 0 deletions service/history/historyBuilder.go
Original file line number Diff line number Diff line change
Expand Up @@ -689,6 +689,7 @@ func (b *historyBuilder) newMarkerRecordedEventAttributes(decisionTaskCompletedE
attributes.MarkerName = common.StringPtr(common.StringDefault(request.MarkerName))
attributes.Details = request.Details
attributes.DecisionTaskCompletedEventId = common.Int64Ptr(decisionTaskCompletedEventID)
attributes.Header = request.Header
historyEvent.MarkerRecordedEventAttributes = attributes

return historyEvent
Expand Down
Loading

0 comments on commit 922b0e6

Please sign in to comment.