Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
### Changed

### Fixed
- [#113](https://github.com/cludden/protoc-gen-go-temporal/pull/113) fix Ensures workflowIdConflictPolicy parameter is properly set when not UNSPECIFIED



Expand Down
7 changes: 7 additions & 0 deletions internal/plugin/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -2382,6 +2382,13 @@ func (m *Manifest) genWorkflowOptions(f *j.File, workflow protoreflect.FullName,
})
}

// set WorkflowIDConflictPolicy
if !child {
g.If(j.Id("v").Op(":=").Id("o").Dot("workflowIdConflictPolicy"), j.Id("v").Op("!=").Qual(enumsPkg, "WORKFLOW_ID_CONFLICT_POLICY_UNSPECIFIED")).Block(
j.Id("opts").Dot("WorkflowIDConflictPolicy").Op("=").Id("v"),
)
}

// set TaskQueue
g.If(j.Id("v").Op(":=").Id("o").Dot("taskQueue"), j.Id("v").Op("!=").Nil()).Block(
j.Id("opts").Dot("TaskQueue").Op("=").Op("*").Id("v"),
Expand Down